Use secret for glance config

Change-Id: I73ff4d946b24ee14550f4bd49c875b5a8955ff79
This commit is contained in:
okozachenko 2020-07-27 19:25:14 +03:00
parent 7363de01ab
commit ee381618a3
2 changed files with 16 additions and 7 deletions

View File

@ -36,7 +36,18 @@ elif [[ "$1" == "stack" && "$2" == "install" ]]; then
:
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
:
# After ceph devstack plugin
kubectl create secret generic glance-config -n openstack \
--from-file=/etc/glance/glance-api.conf \
--from-file=/etc/glance/glance-api-paste.ini \
--from-file=/etc/glance/glance-cache.conf \
--from-file=/etc/glance/glance-swift-store.conf
# NOTE(Alex): Permissions here are bad but it's temporary so we don't care as much.
sudo chmod -Rv 777 /etc/ceph
kubectl create secret generic ceph-config -n openstack \
--from-file=/etc/ceph/ceph.conf \
--from-file=/etc/ceph/ceph.client.glance.keyring
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
:

View File

@ -87,13 +87,11 @@ spec:
mountPath: /etc/uwsgi
volumes:
- name: ceph
hostPath:
path: /etc/ceph
type: Directory
secret:
secretName: ceph-config
- name: config
hostPath:
path: {{ spec['configDir'] }}
type: Directory
secret:
secretName: glance-config
- name: data
hostPath:
path: {{ spec['dataDir'] }}