Skip to content

Commit 5ebff14

Browse files
committed
add APP_KEY generation and parameter
1 parent 2996d0b commit 5ebff14

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

charts/pixelfed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.11.1
18+
version: 0.12.0
1919

2020
# This is the version number of the application being deployed.
2121
# renovate:image=ghcr.io/mattlqx/docker-pixelfed

charts/pixelfed/templates/deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ spec:
6767
{{- toYaml . | nindent 12 }}
6868
{{- end }}
6969

70+
# pixelfed app key
71+
- name: APP_KEY
72+
valueFrom:
73+
secretKeyRef:
74+
{{- if and .Values.pixelfed.app.existingSecret .Values.pixelfed.app.existingSecretKey }}
75+
name: {{ .Values.pixelfed.app.existingSecret }}
76+
key: {{ .Values.pixelfed.app.existingSecretKey }}
77+
{{- else }}
78+
name: {{ include "pixelfed.fullname" . }}-app-key
79+
key: key
80+
{{- end }}
81+
7082
# valkey AKA redis
7183
{{- if and .Values.externalValkey.enabled .Values.externalValkey.existingSecretKeys.host }}
7284
- name: REDIS_HOST
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if not .Values.pixelfed.app.existingSecret }}
2+
---
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: {{ include "pixelfed.fullname" . }}-app-key
7+
data:
8+
{{ if .Values.pixelfed.app.key }}
9+
key: {{ .Values.pixelfed.app.key | b64enc }}
10+
{{- else }}
11+
key: {{ randAlphaNum 32 | b64enc }}
12+
{{- end }}
13+
{{- end }}

charts/pixelfed/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,17 @@ pixelfed:
305305

306306
# app specific settings
307307
app:
308+
# -- This key is used by the Illuminate encrypter service and should
309+
# be set to a random, 32 character string, otherwise these encrypted strings
310+
# will not be safe. If you don't generate one, we'll generate one for you
311+
# however it will change everytime you upgrade the helm chart, so it should
312+
# only be used for testing. In production, please set this, or pixelfed.app.existingSecret
313+
key: ""
314+
# -- use an existing Kuberentes Secret to store the app key
315+
# If set, ignores pixelfed.app.key
316+
existingSecret: ""
317+
# -- key in pixelfed.app.existingSecret to use for the app key
318+
existingSecretKey: ""
308319
# -- The name of your server/instance
309320
name: "Pixelfed"
310321
# -- The app environment, keep it set to "production"

0 commit comments

Comments
 (0)