diff --git a/keystone/Chart.yaml b/keystone/Chart.yaml index 08fccf108d..fb152510b3 100644 --- a/keystone/Chart.yaml +++ b/keystone/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Keystone name: keystone -version: 0.1.11 +version: 0.1.12 home: https://docs.openstack.org/keystone/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png sources: diff --git a/keystone/templates/job-credential-setup.yaml b/keystone/templates/job-credential-setup.yaml index 1543d8a6bf..2a2c13db7f 100644 --- a/keystone/templates/job-credential-setup.yaml +++ b/keystone/templates/job-credential-setup.yaml @@ -54,9 +54,11 @@ kind: Job metadata: name: keystone-credential-setup annotations: +{{- if .Values.helm3_hook }} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-5" "helm.sh/hook-delete-policy": before-hook-creation +{{- end }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: diff --git a/keystone/templates/job-fernet-setup.yaml b/keystone/templates/job-fernet-setup.yaml index 6a39daf3e7..8042543352 100644 --- a/keystone/templates/job-fernet-setup.yaml +++ b/keystone/templates/job-fernet-setup.yaml @@ -54,10 +54,12 @@ apiVersion: batch/v1 kind: Job metadata: name: keystone-fernet-setup +{{- if .Values.helm3_hook }} annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-5" "helm.sh/hook-delete-policy": before-hook-creation +{{- end }} spec: template: metadata: diff --git a/keystone/templates/secret-credential-keys.yaml b/keystone/templates/secret-credential-keys.yaml index 4fbd1ae589..8a2c5eb5b3 100644 --- a/keystone/templates/secret-credential-keys.yaml +++ b/keystone/templates/secret-credential-keys.yaml @@ -19,8 +19,10 @@ apiVersion: v1 kind: Secret metadata: name: keystone-credential-keys +{{- if .Values.helm3_hook }} annotations: "helm.sh/hook": pre-install +{{- end }} type: Opaque data: {{- end }} diff --git a/keystone/templates/secret-fernet-keys.yaml b/keystone/templates/secret-fernet-keys.yaml index 8979b47a27..8af0973098 100644 --- a/keystone/templates/secret-fernet-keys.yaml +++ b/keystone/templates/secret-fernet-keys.yaml @@ -20,8 +20,10 @@ apiVersion: v1 kind: Secret metadata: name: keystone-fernet-keys +{{- if .Values.helm3_hook }} annotations: "helm.sh/hook": pre-install +{{- end }} type: Opaque data: {{- end }} diff --git a/keystone/values.yaml b/keystone/values.yaml index 2d4327ed73..dd3155c941 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -29,6 +29,10 @@ labels: release_group: null +# NOTE(gagehugo): the pre-install hook breaks upgrade for helm2 +# Set to false to upgrade using helm2 +helm3_hook: true + images: tags: bootstrap: docker.io/openstackhelm/heat:stein-ubuntu_bionic diff --git a/releasenotes/notes/keystone.yaml b/releasenotes/notes/keystone.yaml index 8d1b25895e..bad3be4adb 100644 --- a/releasenotes/notes/keystone.yaml +++ b/releasenotes/notes/keystone.yaml @@ -12,4 +12,5 @@ keystone: - 0.1.9 Add helm.sh/hook related annotations - 0.1.10 Update RBAC apiVersion from /v1beta1 to /v1 - 0.1.11 Remove congress residue + - 0.1.12 Add helm hook conditional ...