helm: add existingRpcSecret option

This commit is contained in:
rkevin
2025-11-10 20:30:41 -08:00
parent 2e7a6fccba
commit 4dee3e6e04
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ If release name contains chart name it will be used as a full name.
Create the name of the rpc secret Create the name of the rpc secret
*/}} */}}
{{- define "garage.rpcSecretName" -}} {{- define "garage.rpcSecretName" -}}
{{- printf "%s-rpc-secret" (include "garage.fullname" .) -}} {{- .Values.garage.existingRpcSecret | default (printf "%s-rpc-secret" (include "garage.fullname" .)) -}}
{{- end }} {{- end }}
{{/* {{/*
+2
View File
@@ -1,3 +1,4 @@
{{- if not .Values.garage.existingRpcSecret }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -12,3 +13,4 @@ data:
{{- $prevRpcSecret := $prevSecretData.rpcSecret | default "" | b64dec }} {{- $prevRpcSecret := $prevSecretData.rpcSecret | default "" | b64dec }}
{{/* Priority is: 1. from values, 2. previous value, 3. generate random */}} {{/* Priority is: 1. from values, 2. previous value, 3. generate random */}}
rpcSecret: {{ .Values.garage.rpcSecret | default $prevRpcSecret | default (include "jupyterhub.randHex" 64) | b64enc | quote }} rpcSecret: {{ .Values.garage.rpcSecret | default $prevRpcSecret | default (include "jupyterhub.randHex" 64) | b64enc | quote }}
{{- end }}
+4
View File
@@ -37,6 +37,10 @@ garage:
rpcBindAddr: "[::]:3901" rpcBindAddr: "[::]:3901"
# -- If not given, a random secret will be generated and stored in a Secret object # -- If not given, a random secret will be generated and stored in a Secret object
rpcSecret: "" rpcSecret: ""
# -- If you want to provide an rpcSecret within an existing k8s secret,
# specify the secret name here, and store the value under the secret key `rpcSecret`
# the default secret will not be created
existingRpcSecret: ""
# -- This is not required if you use the integrated kubernetes discovery # -- This is not required if you use the integrated kubernetes discovery
bootstrapPeers: [] bootstrapPeers: []
# -- Set to true if you want to use k8s discovery but install the CRDs manually outside # -- Set to true if you want to use k8s discovery but install the CRDs manually outside