mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 20:24:40 +00:00
- align app/db cluster defaults for knoe-dev-0 + knoe-dev-cnpg-0 on e2-standard-2\n- harden Supabase deploy flow for cross-cluster DB ILB, GKE storage class, and node selector fallback\n- migrate Helm chart path to knoe-supabase and make external DB host rendering IP-safe\n- disable Kerberos in prod unattended config to prevent Supabase GSS auth failures\n- add Supabase port-forward mappings and DB backup context handling improvements\n\nBuild status: k8s stable Co-authored-by: Junie <junie@jetbrains.com>
60 lines
1.7 KiB
Smarty
60 lines
1.7 KiB
Smarty
{{/*
|
|
Return the PVC name for a given workload.
|
|
If persistence.existingClaim is set, use it.
|
|
Otherwise generate the default name.
|
|
Usage: {{ include "supabase.pvc.name" (dict "root" $ "name" "alias") }}
|
|
*/}}
|
|
{{- define "supabase.pvc.name" -}}
|
|
{{- $root := .root -}}
|
|
{{- $name := .name -}}
|
|
{{- $persistence := index $root.Values.persistence $name -}}
|
|
|
|
{{- if $persistence.existingClaim -}}
|
|
{{- $persistence.existingClaim -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" (include "supabase.fullname" $root) $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create a PVC for a given workload name.
|
|
Usage: {{ include "supabase.pvc" (dict "root" $ "name" "workload" "enabled": "true") }}
|
|
*/}}
|
|
{{- define "supabase.pvc" -}}
|
|
{{- $root := .root -}}
|
|
{{- $name := .name -}}
|
|
{{- $enabled := .enabled -}}
|
|
{{- $persistence := index $root.Values.persistence $name -}}
|
|
{{- $pvcName := include "supabase.pvc.name" (dict "root" $root "name" $name) -}}
|
|
|
|
{{- if and $enabled $persistence.enabled (not $persistence.existingClaim) -}}
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ $pvcName }}
|
|
labels:
|
|
{{- include "supabase.labels" $root | nindent 4 }}
|
|
synology.storage/pvc: {{ $pvcName | quote }}
|
|
{{- with $persistence.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if $persistence.storageClassName }}
|
|
storageClassName: {{ $persistence.storageClassName }}
|
|
{{- end }}
|
|
{{- if eq ($persistence.storageClassName | default "") "synology-iscsi" }}
|
|
selector:
|
|
matchLabels:
|
|
synology.storage/pvc: {{ $pvcName | quote }}
|
|
{{- end }}
|
|
accessModes:
|
|
{{- range $persistence.accessModes }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ $persistence.size | quote }}
|
|
{{- end }}
|
|
{{- end }}
|