Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Overwriting of Certificate Keystore Password Secret via Sealed Secrets #131

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/gxf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: gxf
description: Generic GXF Helm chart
version: '1.8.1'
version: '1.8.2'
icon: https://artwork.lfenergy.org/projects/grid-exchange-fabric/abbrev/color/grid-exchange-fabric-abbrev-color.png
maintainers:
- name: OSGP
Expand Down
8 changes: 7 additions & 1 deletion charts/gxf/templates/certificate-keystore-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{{- if .Values.keystore.generateSecret -}}
apiVersion: v1
kind: Secret
kind: Secret
metadata:
name: {{ .Release.Name }}-keystore-password
annotations:
{{- if .Values.keystore.managedBySealedSecrets }}
sealedsecrets.bitnami.com/managed: "true"
{{- end }}
type: Opaque
data:
keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }}
Expand All @@ -10,3 +15,4 @@ data:
{{- else -}}
{{- randAlphaNum 32 | b64enc | quote -}}
{{- end -}}
{{- end }}
2 changes: 1 addition & 1 deletion charts/gxf/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
pkcs12:
create: true
passwordSecretRef:
name: {{ $.Release.Name }}-keystore-password
name: {{ $.Values.keystore.secretName | default (printf "%s-keystore-password" $.Release.Name) }}
key: keystore-password
---
{{- end }}
4 changes: 4 additions & 0 deletions charts/gxf/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,7 @@ certificates: []
# commonName: example.com
# dnsNames:
# - example.com
keystore:
generateSecret: false # Set to true if you want to generate a new secret
sealedSecretsManaged: false # Set to false if the annotation should not be added
keystoreSecretName: ""
Loading