From b6ca29bc45e4d3ade6aa917c83714621e3753058 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 4 Sep 2024 13:11:55 +0200 Subject: [PATCH] [delta-ipv6] Shared control plane vars There is two stage with control plane config, the shared options moved to a shared file which used by both stages. --- .../control-plane/kustomization.yaml | 145 ++++++++++++++++++ .../edpm/nodeset/kustomization.yaml | 2 +- dt/uni04delta-ipv6/kustomization.yaml | 114 +------------- 3 files changed, 147 insertions(+), 114 deletions(-) create mode 100644 dt/uni04delta-ipv6/control-plane/kustomization.yaml diff --git a/dt/uni04delta-ipv6/control-plane/kustomization.yaml b/dt/uni04delta-ipv6/control-plane/kustomization.yaml new file mode 100644 index 000000000..73b1e86c8 --- /dev/null +++ b/dt/uni04delta-ipv6/control-plane/kustomization.yaml @@ -0,0 +1,145 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../lib/control-plane + +replacements: + - source: + kind: ConfigMap + name: service-values + fieldPath: data.neutron.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.neutron.template.customServiceConfig + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.enabled + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.rpcTransport + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.rpcTransport + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.endpoint_annotations + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicAPI.override.service.internal.metadata.annotations + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.endpoint_annotations + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicInspector.override.service.internal.metadata.annotations + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.lbServiceType + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicAPI.override.service.internal.spec.type + - spec.ironic.template.ironicInspector.override.service.internal.spec.type + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.iface + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicConductors.0.networkAttachments.0 + - spec.ironic.template.ironicConductors.0.provisionNetwork + - spec.ironic.template.ironicInspector.inspectionNetwork + - spec.ironic.template.ironicInspector.networkAttachments.0 + - spec.ovn.template.ovnController.nicMappings.ironic + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.ironicConductors.0.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicConductors.0.customServiceConfig + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.ironicInspector.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicInspector.customServiceConfig + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.cellTemplates + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates + options: + create: true diff --git a/dt/uni04delta-ipv6/edpm/nodeset/kustomization.yaml b/dt/uni04delta-ipv6/edpm/nodeset/kustomization.yaml index 075978235..3e3e8a4e1 100644 --- a/dt/uni04delta-ipv6/edpm/nodeset/kustomization.yaml +++ b/dt/uni04delta-ipv6/edpm/nodeset/kustomization.yaml @@ -17,7 +17,7 @@ transformers: create: true components: - - ../../../../lib/control-plane + - ../../control-plane - ../../../../lib/dataplane/nodeset resources: diff --git a/dt/uni04delta-ipv6/kustomization.yaml b/dt/uni04delta-ipv6/kustomization.yaml index 77b1348cd..49c55b4f6 100644 --- a/dt/uni04delta-ipv6/kustomization.yaml +++ b/dt/uni04delta-ipv6/kustomization.yaml @@ -20,7 +20,7 @@ components: - ../../lib/networking/metallb - ../../lib/networking/netconfig - ../../lib/networking/nad - - ../../lib/control-plane + - control-plane resources: - nad.yaml @@ -82,17 +82,6 @@ replacements: - spec.neutron.template.customServiceConfig options: create: true - - source: - kind: ConfigMap - name: service-values - fieldPath: data.ironic.enabled - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.enabled - options: - create: true - source: kind: ConfigMap name: network-values @@ -103,104 +92,3 @@ replacements: name: ironic fieldPaths: - spec.config - - - source: - kind: ConfigMap - name: service-values - fieldPath: data.ironic.rpcTransport - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.rpcTransport - options: - create: true - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.ctlplane.endpoint_annotations - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicAPI.override.service.internal.metadata.annotations - options: - create: true - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.ctlplane.endpoint_annotations - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicInspector.override.service.internal.metadata.annotations - options: - create: true - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.lbServiceType - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicAPI.override.service.internal.spec.type - - spec.ironic.template.ironicInspector.override.service.internal.spec.type - options: - create: true - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.ironic.iface - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicConductors.0.networkAttachments.0 - - spec.ironic.template.ironicConductors.0.provisionNetwork - - spec.ironic.template.ironicInspector.inspectionNetwork - - spec.ironic.template.ironicInspector.networkAttachments.0 - - spec.ovn.template.ovnController.nicMappings.ironic - options: - create: true - - - source: - kind: ConfigMap - name: service-values - fieldPath: data.ironic.ironicConductors.0.customServiceConfig - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicConductors.0.customServiceConfig - options: - create: true - - - source: - kind: ConfigMap - name: service-values - fieldPath: data.ironic.ironicInspector.customServiceConfig - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.ironic.template.ironicInspector.customServiceConfig - options: - create: true - - - source: - kind: ConfigMap - name: service-values - fieldPath: data.nova.cellTemplates - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.nova.template.cellTemplates - options: - create: true