OSH-Patch: Fixing keystone helm release hooks

This patch adds a helm hook/hook-weight to two Keystone secrets that
weren't being correctly replaced during the stx-openstack application
update.

As a result, other jobs/pods that depended on these secrets failed, and
ultimately the Keystone helm release wasn't upgraded by Helm.

Test plan:
PASS - Build openstack-helm package
PASS - Build stx-openstack-helm-fluxcd package
PASS - Build stx-openstack helm charts
PASS - Upload/apply/remove stx-openstack

Closes-Bug: 2000172

Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
Change-Id: I4cd39bc0326b2af2c5d1a9c2c2a68198035bd300
This commit is contained in:
Luan Nunes Utimura 2022-12-20 14:15:10 -03:00
parent 38e6cf641f
commit 8e45c65c7d
4 changed files with 85 additions and 0 deletions

View File

@ -37,6 +37,7 @@ Patch16: 0016-Update-RBAC-authorization-api-to-v1.patch
Patch17: 0017-Fixing-cinder-helm-release-hooks-weights-helmv3.patch
Patch18: 0018-Fixing-placement-helm-release-hooks.patch
Patch19: 0019-Fixing-nova-helm-release-hooks-and-weights.patch
Patch20: 0020-Fixing-keystone-helm-release-hooks-and-weights.patch
BuildRequires: helm
BuildRequires: openstack-helm-infra
@ -66,6 +67,7 @@ Openstack Helm charts
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%build
# Stage helm-toolkit in the local repo

View File

@ -0,0 +1,41 @@
From a381ce34a6d16cb6df7497503d7b7ae2ee8de316 Mon Sep 17 00:00:00 2001
From: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
Date: Tue, 20 Dec 2022 14:07:19 -0300
Subject: [PATCH] Fixing keystone helm release hooks and weights
---
keystone/templates/secret-credential-keys.yaml | 3 ++-
keystone/templates/secret-fernet-keys.yaml | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/keystone/templates/secret-credential-keys.yaml b/keystone/templates/secret-credential-keys.yaml
index 8a2c5eb5..307bb72b 100644
--- a/keystone/templates/secret-credential-keys.yaml
+++ b/keystone/templates/secret-credential-keys.yaml
@@ -21,7 +21,8 @@ metadata:
name: keystone-credential-keys
{{- if .Values.helm3_hook }}
annotations:
- "helm.sh/hook": pre-install
+ "helm.sh/hook": pre-install,post-upgrade
+ "helm.sh/hook-weight": "-6"
{{- end }}
type: Opaque
data:
diff --git a/keystone/templates/secret-fernet-keys.yaml b/keystone/templates/secret-fernet-keys.yaml
index 8af09730..a7eddd14 100644
--- a/keystone/templates/secret-fernet-keys.yaml
+++ b/keystone/templates/secret-fernet-keys.yaml
@@ -22,7 +22,8 @@ metadata:
name: keystone-fernet-keys
{{- if .Values.helm3_hook }}
annotations:
- "helm.sh/hook": pre-install
+ "helm.sh/hook": pre-install,post-upgrade
+ "helm.sh/hook-weight": "-6"
{{- end }}
type: Opaque
data:
--
2.25.1

View File

@ -16,3 +16,4 @@
0017-Fixing-cinder-helm-release-hooks-weights-helmv3.patch
0018-Fixing-placement-helm-release-hooks.patch
0019-Fixing-nova-helm-release-hooks-and-weights.patch
0020-Fixing-keystone-helm-release-hooks-and-weights.patch

View File

@ -0,0 +1,41 @@
From a381ce34a6d16cb6df7497503d7b7ae2ee8de316 Mon Sep 17 00:00:00 2001
From: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
Date: Tue, 20 Dec 2022 14:07:19 -0300
Subject: [PATCH] Fixing keystone helm release hooks and weights
---
keystone/templates/secret-credential-keys.yaml | 3 ++-
keystone/templates/secret-fernet-keys.yaml | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/keystone/templates/secret-credential-keys.yaml b/keystone/templates/secret-credential-keys.yaml
index 8a2c5eb5..307bb72b 100644
--- a/keystone/templates/secret-credential-keys.yaml
+++ b/keystone/templates/secret-credential-keys.yaml
@@ -21,7 +21,8 @@ metadata:
name: keystone-credential-keys
{{- if .Values.helm3_hook }}
annotations:
- "helm.sh/hook": pre-install
+ "helm.sh/hook": pre-install,post-upgrade
+ "helm.sh/hook-weight": "-6"
{{- end }}
type: Opaque
data:
diff --git a/keystone/templates/secret-fernet-keys.yaml b/keystone/templates/secret-fernet-keys.yaml
index 8af09730..a7eddd14 100644
--- a/keystone/templates/secret-fernet-keys.yaml
+++ b/keystone/templates/secret-fernet-keys.yaml
@@ -22,7 +22,8 @@ metadata:
name: keystone-fernet-keys
{{- if .Values.helm3_hook }}
annotations:
- "helm.sh/hook": pre-install
+ "helm.sh/hook": pre-install,post-upgrade
+ "helm.sh/hook-weight": "-6"
{{- end }}
type: Opaque
data:
--
2.25.1