From 4285571a7211ca76aa764f89efe970cac7b43da3 Mon Sep 17 00:00:00 2001 From: Kamil Sambor Date: Tue, 6 Feb 2024 11:02:23 +0100 Subject: [PATCH] Change secret mounting path to allign with nova-operator --- pkg/placement/volumes.go | 2 +- .../placementapi/config/placement-api-config.json | 8 ++++---- .../config/placement-dbsync-config.json | 4 ++-- tests/kuttl/common/assert_sample_deployment.yaml | 13 ++++++++++++- .../kuttl/tests/placement_deploy_tls/03-assert.yaml | 2 +- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/pkg/placement/volumes.go b/pkg/placement/volumes.go index 578186ca..fa60ef15 100644 --- a/pkg/placement/volumes.go +++ b/pkg/placement/volumes.go @@ -68,7 +68,7 @@ func getVolumeMounts(serviceName string) []corev1.VolumeMount { }, { Name: "config-data", - MountPath: "/var/lib/config-data/merged", + MountPath: "/var/lib/openstack/config", ReadOnly: false, }, { diff --git a/templates/placementapi/config/placement-api-config.json b/templates/placementapi/config/placement-api-config.json index d9bfe9b7..210cc117 100644 --- a/templates/placementapi/config/placement-api-config.json +++ b/templates/placementapi/config/placement-api-config.json @@ -2,25 +2,25 @@ "command": "/usr/sbin/httpd -DFOREGROUND", "config_files": [ { - "source": "/var/lib/config-data/merged/placement.conf", + "source": "/var/lib/openstack/config/placement.conf", "dest": "/etc/placement/placement.conf", "owner": "placement", "perm": "0600" }, { - "source": "/var/lib/config-data/merged/httpd.conf", + "source": "/var/lib/openstack/config/httpd.conf", "dest": "/etc/httpd/conf/httpd.conf", "owner": "apache", "perm": "0644" }, { - "source": "/var/lib/config-data/merged/custom.conf", + "source": "/var/lib/openstack/config/custom.conf", "dest": "/etc/placement/placement.conf.d/custom.conf", "owner": "placement", "perm": "0600" }, { - "source": "/var/lib/config-data/merged/ssl.conf", + "source": "/var/lib/openstack/config/ssl.conf", "dest": "/etc/httpd/conf.d/ssl.conf", "owner": "apache", "perm": "0644" diff --git a/templates/placementapi/config/placement-dbsync-config.json b/templates/placementapi/config/placement-dbsync-config.json index 4a7ea0d6..fd7a407b 100644 --- a/templates/placementapi/config/placement-dbsync-config.json +++ b/templates/placementapi/config/placement-dbsync-config.json @@ -2,13 +2,13 @@ "command": "placement-manage db sync", "config_files": [ { - "source": "/var/lib/config-data/merged/placement.conf", + "source": "/var/lib/openstack/config/placement.conf", "dest": "/etc/placement/placement.conf", "owner": "placement", "perm": "0600" }, { - "source": "/var/lib/config-data/merged/custom.conf", + "source": "/var/lib/openstack/config/custom.conf", "dest": "/etc/placement/placement.conf.d/custom.conf", "owner": "placement", "perm": "0600" diff --git a/tests/kuttl/common/assert_sample_deployment.yaml b/tests/kuttl/common/assert_sample_deployment.yaml index 5824c140..cc80074f 100644 --- a/tests/kuttl/common/assert_sample_deployment.yaml +++ b/tests/kuttl/common/assert_sample_deployment.yaml @@ -144,7 +144,7 @@ spec: readOnly: true - mountPath: /var/log/placement name: logs - - mountPath: /var/lib/config-data/merged + - mountPath: /var/lib/openstack/config name: config-data - mountPath: /var/lib/kolla/config_files/config.json name: config-data @@ -186,6 +186,17 @@ status: availableReplicas: 1 replicas: 1 --- +# the openshift annotations can't be checked through the deployment above +apiVersion: v1 +kind: Pod +metadata: + annotations: + openshift.io/scc: anyuid + labels: + service: placement +status: + phase: Running +--- apiVersion: v1 kind: Service metadata: diff --git a/tests/kuttl/tests/placement_deploy_tls/03-assert.yaml b/tests/kuttl/tests/placement_deploy_tls/03-assert.yaml index 9c9b9b3f..0935f8be 100644 --- a/tests/kuttl/tests/placement_deploy_tls/03-assert.yaml +++ b/tests/kuttl/tests/placement_deploy_tls/03-assert.yaml @@ -151,7 +151,7 @@ spec: readOnly: true - mountPath: /var/log/placement name: logs - - mountPath: /var/lib/config-data/merged + - mountPath: /var/lib/openstack/config name: config-data - mountPath: /var/lib/kolla/config_files/config.json name: config-data