add APP_KEY generation and parameter

This commit is contained in:
jessebot
2025-01-19 14:53:44 +01:00
parent 2996d0bf43
commit 5ebff144fc
4 changed files with 37 additions and 1 deletions
+12
View File
@@ -67,6 +67,18 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
# pixelfed app key
- name: APP_KEY
valueFrom:
secretKeyRef:
{{- if and .Values.pixelfed.app.existingSecret .Values.pixelfed.app.existingSecretKey }}
name: {{ .Values.pixelfed.app.existingSecret }}
key: {{ .Values.pixelfed.app.existingSecretKey }}
{{- else }}
name: {{ include "pixelfed.fullname" . }}-app-key
key: key
{{- end }}
# valkey AKA redis
{{- if and .Values.externalValkey.enabled .Values.externalValkey.existingSecretKeys.host }}
- name: REDIS_HOST
@@ -0,0 +1,13 @@
{{- if not .Values.pixelfed.app.existingSecret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pixelfed.fullname" . }}-app-key
data:
{{ if .Values.pixelfed.app.key }}
key: {{ .Values.pixelfed.app.key | b64enc }}
{{- else }}
key: {{ randAlphaNum 32 | b64enc }}
{{- end }}
{{- end }}