Skip to content

Commit

Permalink
fix: properly setup secrits file
Browse files Browse the repository at this point in the history
  • Loading branch information
djtecha committed Jan 3, 2025
1 parent a4aa7ac commit 5ca216c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Helm Charts for Hiddennode Cluster

Location for all custom charts and custom helm repos
[.gitmodules](.gitmodules)
4 changes: 2 additions & 2 deletions charts/open-plaato-keg/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $barhelper_api_key := default (randAlphaNum 64) .Values.barhelperPassword.value | b64enc | quote }}
{{- $mqtt_password := default (randAlphaNum 64) .Values.mqttPassword.value | b64enc | quote }}
{{- $secretName := default "plaato" .Values.existingSecrets }}
{{- $secretName := default .Chart.Name .Values.existingSecrets -}}

{{- if .Values.existingSecrets }}
{{- $existingSecret := (lookup "v1" "Secret" .Release.Namespace $secretName ) }}
Expand All @@ -13,7 +13,7 @@
apiVersion: v1
kind: Secret
metadata:
name: "plaato"
name: {{ $secretName }}
annotations:
"helm.sh/resource-policy": "keep"
type: Opaque
Expand Down
6 changes: 3 additions & 3 deletions charts/open-plaato-keg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ affinity:
values:
- amd64

existingSecrets: "{{ .Release.Name }}-app"
existingSecrets: "open-plaato-keg"

barhelperPassword:
value: ""
Expand Down Expand Up @@ -111,10 +111,10 @@ env:
- name: MQTT_PASSWORD
valueFrom:
secretKeyRef:
name: plaato-open-plaato-keg
name: open-plaato-keg
key: MQTT_PASSWORD
- name: BARHELPER_API_KEY
valueFrom:
secretKeyRef:
name: plaato-open-plaato-keg
name: open-plaato-keg
key: BARHELPER_API_KEY

0 comments on commit 5ca216c

Please sign in to comment.