From a99c826a6c4c32241f9c98daf31866c6cdd4efce Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 10:45:15 +0200 Subject: [PATCH 1/7] add generated keystore password Signed-off-by: Angelo Sleebos --- .../gxf/templates/certificate-keystore-secret.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 charts/gxf/templates/certificate-keystore-secret.yaml diff --git a/charts/gxf/templates/certificate-keystore-secret.yaml b/charts/gxf/templates/certificate-keystore-secret.yaml new file mode 100644 index 0000000..70c80c1 --- /dev/null +++ b/charts/gxf/templates/certificate-keystore-secret.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Secret +metadata: + name: keystore-password +type: Opaque +data: + keystore-password: {{ $secret := (lookup "v1" "Secret" .Release.Namespace "keystore-password") }} + {{- if $secret -}} + {{- index $secret "data" "keystore-password-test" -}} + {{- else -}} + {{- randAlphaNum 32 | b64enc | quote -}} + {{- end -}} From cb54ed2f2edf8b1a722a5a8f11cf0dbddd1d5ef5 Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 10:47:00 +0200 Subject: [PATCH 2/7] remove test Signed-off-by: Angelo Sleebos --- charts/gxf/templates/certificate-keystore-secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gxf/templates/certificate-keystore-secret.yaml b/charts/gxf/templates/certificate-keystore-secret.yaml index 70c80c1..3f28814 100644 --- a/charts/gxf/templates/certificate-keystore-secret.yaml +++ b/charts/gxf/templates/certificate-keystore-secret.yaml @@ -6,7 +6,7 @@ type: Opaque data: keystore-password: {{ $secret := (lookup "v1" "Secret" .Release.Namespace "keystore-password") }} {{- if $secret -}} - {{- index $secret "data" "keystore-password-test" -}} + {{- index $secret "data" "keystore-password" -}} {{- else -}} {{- randAlphaNum 32 | b64enc | quote -}} {{- end -}} From cc71b1eff4540a6ba58ad4a7830072e2d8491738 Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 10:59:47 +0200 Subject: [PATCH 3/7] add .Release.Name Signed-off-by: Angelo Sleebos --- charts/gxf/templates/certificate-keystore-secret.yaml | 4 ++-- charts/gxf/templates/certificate.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/gxf/templates/certificate-keystore-secret.yaml b/charts/gxf/templates/certificate-keystore-secret.yaml index 3f28814..1e1cc47 100644 --- a/charts/gxf/templates/certificate-keystore-secret.yaml +++ b/charts/gxf/templates/certificate-keystore-secret.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: Secret metadata: - name: keystore-password + name: {{ .Release.Name }}-keystore-password type: Opaque data: - keystore-password: {{ $secret := (lookup "v1" "Secret" .Release.Namespace "keystore-password") }} + keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }} {{- if $secret -}} {{- index $secret "data" "keystore-password" -}} {{- else -}} diff --git a/charts/gxf/templates/certificate.yaml b/charts/gxf/templates/certificate.yaml index 6d412bb..e47c565 100644 --- a/charts/gxf/templates/certificate.yaml +++ b/charts/gxf/templates/certificate.yaml @@ -33,7 +33,7 @@ spec: pkcs12: create: true passwordSecretRef: - name: keystore-password + name: {{ $.Release.Name }}-keystore-password key: password --- {{- end }} From 64f47faba18e18314087cb434fc205e4f5446f7c Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 11:45:11 +0200 Subject: [PATCH 4/7] upgrade to v1.8.1 Signed-off-by: Angelo Sleebos --- charts/gxf/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gxf/Chart.yaml b/charts/gxf/Chart.yaml index 352c211..9cab780 100644 --- a/charts/gxf/Chart.yaml +++ b/charts/gxf/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: gxf description: Generic GXF Helm chart -version: '1.8.0' +version: '1.8.1' icon: https://artwork.lfenergy.org/projects/grid-exchange-fabric/abbrev/color/grid-exchange-fabric-abbrev-color.png maintainers: - name: OSGP From 54803789430acced8cdb1f33b4bfc31c6230d27f Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 12:51:11 +0200 Subject: [PATCH 5/7] append release name to secret password Signed-off-by: Angelo Sleebos --- charts/gxf/templates/certificate-keystore-secret.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/gxf/templates/certificate-keystore-secret.yaml b/charts/gxf/templates/certificate-keystore-secret.yaml index 1e1cc47..4f16e7a 100644 --- a/charts/gxf/templates/certificate-keystore-secret.yaml +++ b/charts/gxf/templates/certificate-keystore-secret.yaml @@ -1,10 +1,10 @@ apiVersion: v1 -kind: Secret +kind: Secret metadata: name: {{ .Release.Name }}-keystore-password type: Opaque data: - keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }} + {{ .Release.Name }}-keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }} {{- if $secret -}} {{- index $secret "data" "keystore-password" -}} {{- else -}} From a006aa676151b538f20ec950c70af7c3f4197523 Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 16:49:10 +0200 Subject: [PATCH 6/7] disable httpdsidecar Signed-off-by: Angelo Sleebos --- charts/gxf/config/tomcat/server.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gxf/config/tomcat/server.xml b/charts/gxf/config/tomcat/server.xml index 8b4b9ed..4564952 100644 --- a/charts/gxf/config/tomcat/server.xml +++ b/charts/gxf/config/tomcat/server.xml @@ -46,7 +46,7 @@ SPDX-License-Identifier: Apache-2.0 prestartminSpareThreads="true" secretRequired="false" /> {{- end }} - {{- if .Values.httpsConnector.enabled }} + {{- if and .Values.httpsConnector.enabled (not .Values.httpdSidecar.enabled) }} From 0a345b43bcd2327fa84b5a9465318f269023c167 Mon Sep 17 00:00:00 2001 From: Angelo Sleebos Date: Tue, 13 Aug 2024 16:57:31 +0200 Subject: [PATCH 7/7] change secret name Signed-off-by: Angelo Sleebos --- charts/gxf/templates/certificate-keystore-secret.yaml | 2 +- charts/gxf/templates/certificate.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/gxf/templates/certificate-keystore-secret.yaml b/charts/gxf/templates/certificate-keystore-secret.yaml index 4f16e7a..693231f 100644 --- a/charts/gxf/templates/certificate-keystore-secret.yaml +++ b/charts/gxf/templates/certificate-keystore-secret.yaml @@ -4,7 +4,7 @@ metadata: name: {{ .Release.Name }}-keystore-password type: Opaque data: - {{ .Release.Name }}-keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }} + keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }} {{- if $secret -}} {{- index $secret "data" "keystore-password" -}} {{- else -}} diff --git a/charts/gxf/templates/certificate.yaml b/charts/gxf/templates/certificate.yaml index e47c565..53ae544 100644 --- a/charts/gxf/templates/certificate.yaml +++ b/charts/gxf/templates/certificate.yaml @@ -34,6 +34,6 @@ spec: create: true passwordSecretRef: name: {{ $.Release.Name }}-keystore-password - key: password + key: keystore-password --- {{- end }}