From 38d57346bcba94507262ecc8d45e6130a031fc7d Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Nava Date: Mon, 10 Jun 2024 12:30:14 +0200 Subject: [PATCH] Add a global flag to enable preserveJobs in all svcs --- automation/vars/default.yaml | 2 ++ dt/uni05epsilon/kustomization.yaml | 12 --------- .../control-plane/service-values.yaml | 1 + .../dt/bgp/control-plane/service-values.yaml | 1 + .../control-plane/service-values.yaml | 1 + .../control-plane/service-values.yaml | 2 +- .../control-plane/service-values.yaml | 1 + .../control-plane/service-values.yaml | 2 +- .../control-plane/service-values.yaml | 1 + .../control-plane/service-values.yaml | 1 + .../va/hci/control-plane/kustomization.yaml | 1 + .../va/hci/control-plane/service-values.yaml | 9 +++++++ examples/va/hci/service-values.yaml | 1 + .../va/nfv/ovs-dpdk-sriov/service-values.yaml | 1 + examples/va/nfv/ovs-dpdk/service-values.yaml | 1 + examples/va/nfv/sriov/service-values.yaml | 1 + examples/va/pidone/service-values.yaml | 1 + lib/control-plane/kustomization.yaml | 27 +++++++++++++++++++ 18 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 examples/va/hci/control-plane/service-values.yaml diff --git a/automation/vars/default.yaml b/automation/vars/default.yaml index 605acb1f5..0212fb17b 100644 --- a/automation/vars/default.yaml +++ b/automation/vars/default.yaml @@ -20,6 +20,8 @@ vas: oc -n openstack wait osctlplane controlplane --for condition=Ready --timeout=60m values: + - name: service-values + src_file: service-values.yaml - name: network-values src_file: nncp/values.yaml build_output: ../control-plane.yaml diff --git a/dt/uni05epsilon/kustomization.yaml b/dt/uni05epsilon/kustomization.yaml index e08dd700c..d3b09b32c 100644 --- a/dt/uni05epsilon/kustomization.yaml +++ b/dt/uni05epsilon/kustomization.yaml @@ -187,18 +187,6 @@ replacements: options: create: true - - source: - kind: ConfigMap - name: service-values - fieldPath: data.glance.glanceAPIs.default.preserveJobs - targets: - - select: - kind: OpenStackControlPlane - fieldPaths: - - spec.glance.template.glanceAPIs.default.preserveJobs - options: - create: true - - source: kind: ConfigMap name: service-values diff --git a/examples/dt/bgp/bgp_dt01/control-plane/service-values.yaml b/examples/dt/bgp/bgp_dt01/control-plane/service-values.yaml index 38210a21f..e551db664 100644 --- a/examples/dt/bgp/bgp_dt01/control-plane/service-values.yaml +++ b/examples/dt/bgp/bgp_dt01/control-plane/service-values.yaml @@ -6,6 +6,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false glance: customServiceConfig: | [DEFAULT] diff --git a/examples/dt/bgp/control-plane/service-values.yaml b/examples/dt/bgp/control-plane/service-values.yaml index 7b9ae40a5..cdacea216 100644 --- a/examples/dt/bgp/control-plane/service-values.yaml +++ b/examples/dt/bgp/control-plane/service-values.yaml @@ -6,6 +6,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false glance: customServiceConfig: | [DEFAULT] diff --git a/examples/dt/uni01alpha/control-plane/service-values.yaml b/examples/dt/uni01alpha/control-plane/service-values.yaml index 6328503e9..507208092 100644 --- a/examples/dt/uni01alpha/control-plane/service-values.yaml +++ b/examples/dt/uni01alpha/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderVolumes: lvm-iscsi: replicas: 1 diff --git a/examples/dt/uni02beta/control-plane/service-values.yaml b/examples/dt/uni02beta/control-plane/service-values.yaml index 95350bd29..b7bdf58d8 100644 --- a/examples/dt/uni02beta/control-plane/service-values.yaml +++ b/examples/dt/uni02beta/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderVolumes: ontap-nfs: customServiceConfig: | @@ -86,6 +87,5 @@ data: databaseInstance: openstack glanceAPIs: default: - preserveJobs: false replicas: 1 type: single diff --git a/examples/dt/uni04delta/control-plane/service-values.yaml b/examples/dt/uni04delta/control-plane/service-values.yaml index 603f6b433..dc9592345 100644 --- a/examples/dt/uni04delta/control-plane/service-values.yaml +++ b/examples/dt/uni04delta/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderBackup: customServiceConfig: | [DEFAULT] diff --git a/examples/dt/uni05epsilon/control-plane/service-values.yaml b/examples/dt/uni05epsilon/control-plane/service-values.yaml index 813b1b57c..22b003c0c 100644 --- a/examples/dt/uni05epsilon/control-plane/service-values.yaml +++ b/examples/dt/uni05epsilon/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderBackup: customServiceConfig: | [DEFAULT] @@ -82,7 +83,6 @@ data: databaseInstance: openstack glanceAPIs: default: - preserveJobs: false replicas: 1 type: split diff --git a/examples/dt/uni06zeta/control-plane/service-values.yaml b/examples/dt/uni06zeta/control-plane/service-values.yaml index b6cec813f..d84bb3abe 100644 --- a/examples/dt/uni06zeta/control-plane/service-values.yaml +++ b/examples/dt/uni06zeta/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderVolumes: lvm-nvme-tcp: replicas: 1 diff --git a/examples/dt/uni07eta/control-plane/service-values.yaml b/examples/dt/uni07eta/control-plane/service-values.yaml index 722549fa3..f607f427c 100644 --- a/examples/dt/uni07eta/control-plane/service-values.yaml +++ b/examples/dt/uni07eta/control-plane/service-values.yaml @@ -8,6 +8,7 @@ metadata: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderVolumes: ontap-iscsi: customServiceConfig: | diff --git a/examples/va/hci/control-plane/kustomization.yaml b/examples/va/hci/control-plane/kustomization.yaml index f172a15af..7ffc945be 100644 --- a/examples/va/hci/control-plane/kustomization.yaml +++ b/examples/va/hci/control-plane/kustomization.yaml @@ -10,3 +10,4 @@ components: resources: - nncp/values.yaml + - service-values.yaml diff --git a/examples/va/hci/control-plane/service-values.yaml b/examples/va/hci/control-plane/service-values.yaml new file mode 100644 index 000000000..7d79a5db9 --- /dev/null +++ b/examples/va/hci/control-plane/service-values.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" +data: + preserveJobs: false diff --git a/examples/va/hci/service-values.yaml b/examples/va/hci/service-values.yaml index f5a9780fc..2f863de6d 100644 --- a/examples/va/hci/service-values.yaml +++ b/examples/va/hci/service-values.yaml @@ -7,6 +7,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false cinderAPI: replicas: 3 cinderBackup: diff --git a/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml b/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml index b93632348..64ac87d3a 100644 --- a/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml +++ b/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml @@ -14,6 +14,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false neutron: customServiceConfig: | [DEFAULT] diff --git a/examples/va/nfv/ovs-dpdk/service-values.yaml b/examples/va/nfv/ovs-dpdk/service-values.yaml index 5506b08e3..a3e8ef896 100644 --- a/examples/va/nfv/ovs-dpdk/service-values.yaml +++ b/examples/va/nfv/ovs-dpdk/service-values.yaml @@ -14,6 +14,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false neutron: customServiceConfig: | [DEFAULT] diff --git a/examples/va/nfv/sriov/service-values.yaml b/examples/va/nfv/sriov/service-values.yaml index 8178b563f..ed02a4c4c 100644 --- a/examples/va/nfv/sriov/service-values.yaml +++ b/examples/va/nfv/sriov/service-values.yaml @@ -7,6 +7,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false neutron: customServiceConfig: | [ml2] diff --git a/examples/va/pidone/service-values.yaml b/examples/va/pidone/service-values.yaml index 529c6e09f..c7dbe2351 100644 --- a/examples/va/pidone/service-values.yaml +++ b/examples/va/pidone/service-values.yaml @@ -7,6 +7,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" data: + preserveJobs: false glance: customServiceConfig: | [DEFAULT] diff --git a/lib/control-plane/kustomization.yaml b/lib/control-plane/kustomization.yaml index 98bd6791a..28ac83f6b 100644 --- a/lib/control-plane/kustomization.yaml +++ b/lib/control-plane/kustomization.yaml @@ -123,3 +123,30 @@ replacements: kind: OpenStackControlPlane fieldPaths: - spec.ovn.template.ovnController.nicMappings.datacentre + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.preserveJobs + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.barbican.template.preserveJobs + - spec.cinder.template.preserveJobs + - spec.designate.template.preserveJobs + - spec.glance.template.preserveJobs + - spec.heat.template.preserveJobs + - spec.horizon.template.preserveJobs + - spec.ironic.template.ironicInspector.preserveJobs + - spec.ironic.template.preserveJobs + - spec.keystone.template.preserveJobs + - spec.manila.template.preserveJobs + - spec.neutron.template.preserveJobs + - spec.nova.template.preserveJobs + - spec.octavia.template.octaviaAPI.preserveJobs + - spec.octavia.template.preserveJobs + - spec.placement.template.preserveJobs + - spec.telemetry.template.autoscaling.aodh.preserveJobs + options: + create: true