Skip to content

Commit

Permalink
Merge pull request #56 from bancey/feat/external-secrets-for-pterodactyl
Browse files Browse the repository at this point in the history
feat: support providing your own secret
  • Loading branch information
bancey authored Jan 4, 2025
2 parents e9a5e44 + dd7a9d7 commit 05e4667
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/pterodactyl-panel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: pterodactyl-panel
description: A Helm chart for pterodactyl.io
type: application
icon: "https://cdn.pterodactyl.io/logos/new/pterodactyl_logo_transparent.png"
version: 0.4.13
version: 0.4.14
dependencies:
- name: mariadb
version: "20.2.1"
Expand Down
4 changes: 3 additions & 1 deletion charts/pterodactyl-panel/templates/app-key-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if not .Values.appConfig.secretName -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pterodactyl-panel.fullname" . }}-{{ .Values.appConfig.appKey.secretName }}
type: Opaque
stringData:
APP_KEY: {{ include "pterodactyl-panel.appKey" . }}
APP_KEY: {{ include "pterodactyl-panel.appKey" . }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/pterodactyl-panel/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data:
DB_DATABASE: {{ .Values.mariadb.auth.database }}
DB_USERNAME: {{ .Values.mariadb.auth.username }}
DB_PASSWORD: {{ .Values.mariadb.auth.password }}
{{- if .Values.appConfig.mailSecretRef }}
{{- if not .Values.appConfig.mailSecretRef }}
MAIL_DRIVER: {{ .Values.appConfig.mail.driver }}
MAIL_HOST: {{ .Values.appConfig.mail.host }}
MAIL_PORT: {{ .Values.appConfig.mail.port | quote }}
Expand Down
4 changes: 4 additions & 0 deletions charts/pterodactyl-panel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ spec:
- secretRef:
name: {{ .Values.appConfig.mailSecretRef }}
{{- end }}
{{- if .Values.appConfig.secretName }}
- secretRef:
name: {{ .Values.appConfig.secretName }}
{{- end }}
volumeMounts:
- mountPath: /app/var/
name: pterodactyl-panel-storage
Expand Down
4 changes: 3 additions & 1 deletion charts/pterodactyl-panel/templates/hashid-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- if not .Values.appConfig.secretName -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pterodactyl-panel.fullname" . }}-{{ .Values.appConfig.hashIds.secretName }}
type: Opaque
stringData:
HASHIDS_SALT: {{ include "pterodactyl-panel.appHashSalt" . }}
HASHIDS_LENGTH: {{ .Values.appConfig.hashLength | quote }}
HASHIDS_LENGTH: {{ .Values.appConfig.hashLength | quote }}
{{- end }}
1 change: 1 addition & 0 deletions charts/pterodactyl-panel/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
appConfig:
url: "http://pterodactyl.local"
secretName:
key:
hashSalt:
hashLength: 8
Expand Down

0 comments on commit 05e4667

Please sign in to comment.