Skip to content

Commit b5a3aff

Browse files
committed
fix(keystone): avoid resetting keys on each deploy
Due to the way OpenStack Helm sets the helm.sh/hook annotation on the secrets always it causes a removal and re-apply of the secrets but dropping all the generated data every time the keystone chart is deployed. We do not want this behavior so disable OpenStack Helm creating this secret for us and instead switch to just loading the secret ourselves. ref:PUC-1118
1 parent 64a8b7e commit b5a3aff

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

components/keystone/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

55
resources:
6+
- secret-keystone-keys.yaml
67
- keystone-mariadb-db.yaml
78
- keystone-rabbitmq-queue.yaml
89
- external-secret-keystone-sso.yaml
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Explicitly define this secret as empty so that OpenStack Helm does not
2+
# create it for us because it will put helm hook annotations on the one
3+
# it generates. This causes the secret to get re-generated by subsequent
4+
# helm runs. Specifically ArgoCD cleans up anything with a helm hook
5+
# before applying the chart again. We do not want this to go away and
6+
# instead allow other jobs to update it so it should persist.
7+
# TODO: remove after https://review.opendev.org/c/openstack/openstack-helm/+/959251 is released.
8+
---
9+
apiVersion: v1
10+
kind: Secret
11+
metadata:
12+
name: keystone-fernet-keys
13+
---
14+
apiVersion: v1
15+
kind: Secret
16+
metadata:
17+
name: keystone-credential-keys

components/keystone/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ manifests:
306306
secret_db: false
307307
secret_keystone: true
308308
service_ingress_api: false
309+
# these next two we create ourselves to avoid helm hooks issues
310+
secret_credential_keys: false
311+
secret_fernet_keys: false
309312

310313
annotations:
311314
# we need to modify the annotations on OpenStack Helm

0 commit comments

Comments
 (0)