Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion charts/wytui/templates/config/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{{- if not .Values.secret.existing }}
{{- $authSecret := .Values.secret.authSecret -}}
{{- if not $authSecret -}}
{{- $existingSecret := (lookup "v1" "Secret" .Release.Namespace .Values.secret.name) -}}
{{- if $existingSecret -}}
{{- $authSecret = index $existingSecret.data .Values.secret.authSecretKey | b64dec -}}
{{- else -}}
{{- $authSecret = randAlphaNum 64 -}}
{{- end -}}
{{- end -}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -7,7 +16,7 @@ metadata:
type: Opaque
stringData:
{{ .Values.postgresql.secret.urlKey }}: {{ include "wytui.databaseUrl" . | quote }}
{{ .Values.secret.authSecretKey }}: {{ .Values.secret.authSecret | quote }}
{{ .Values.secret.authSecretKey }}: {{ $authSecret | quote }}
{{- end }}
---
{{- if and .Values.oidc.enabled (not .Values.oidc.secret.existing) }}
Expand Down
5 changes: 4 additions & 1 deletion charts/wytui/templates/deployment/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ spec:
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/postgresql/data
{{- if .Values.postgresql.persistent.subPath }}
subPath: {{ .Values.postgresql.persistent.subPath }}
{{- end }}
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: wytui-postgresql
claimName: {{ .Values.postgresql.persistent.existingClaim | default "wytui-postgresql" }}
{{- end }}
10 changes: 8 additions & 2 deletions charts/wytui/templates/deployment/wytui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ spec:
volumeMounts:
- name: downloads
mountPath: /downloads
{{- if .Values.downloads.persistent.subPath }}
subPath: {{ .Values.downloads.persistent.subPath }}
{{- end }}
- name: library
mountPath: /media
{{- if .Values.library.persistent.subPath }}
subPath: {{ .Values.library.persistent.subPath }}
{{- end }}
volumes:
- name: downloads
persistentVolumeClaim:
claimName: wytui-downloads
claimName: {{ .Values.downloads.persistent.existingClaim | default "wytui-downloads" }}
- name: library
persistentVolumeClaim:
claimName: wytui-library
claimName: {{ .Values.library.persistent.existingClaim | default "wytui-library" }}
2 changes: 2 additions & 0 deletions charts/wytui/templates/volumes/downloads.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.downloads.persistent.existingClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -12,3 +13,4 @@ spec:
resources:
requests:
storage: {{ .Values.downloads.persistent.size }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/wytui/templates/volumes/library.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.library.persistent.existingClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -12,3 +13,4 @@ spec:
resources:
requests:
storage: {{ .Values.library.persistent.size }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/wytui/templates/volumes/postgresql.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.postgresql.enabled }}
{{- if and .Values.postgresql.enabled (not .Values.postgresql.persistent.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down
6 changes: 6 additions & 0 deletions charts/wytui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,26 @@ postgresql:
password: ""
passwordKey: POSTGRES_PASSWORD
persistent:
existingClaim: ""
subPath: ""
size: 5Gi
storageClass: ""
accessModes:
- ReadWriteOnce

downloads:
persistent:
existingClaim: ""
subPath: ""
size: 5Gi
storageClass: ""
accessModes:
- ReadWriteOnce

library:
persistent:
existingClaim: ""
subPath: ""
size: 10Gi
storageClass: ""
accessModes:
Expand Down
Loading