mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 12:34:30 +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>
125 lines
4.9 KiB
YAML
125 lines
4.9 KiB
YAML
{{- if .Values.deployment.meta.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "supabase.meta.fullname" . }}
|
|
labels:
|
|
{{- include "supabase.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.meta.enabled }}
|
|
replicas: {{ .Values.deployment.meta.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "supabase.meta.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.deployment.meta.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "supabase.meta.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.image.meta.pullSecrets}}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "supabase.meta.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.meta.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ include "supabase.meta.name" $ }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.meta.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.meta.repository }}:{{ .Values.image.meta.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.meta.pullPolicy }}
|
|
env:
|
|
{{- range $key, $value := .Values.environment.meta }}
|
|
{{- if and (ne $key "DB_HOST") (ne $key "DB_PORT") (ne $key "DB_SSL") }}
|
|
- name: {{ $key }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
- name: DB_HOST
|
|
value: {{ include "supabase.database.host" . | quote }}
|
|
- name: DB_PORT
|
|
value: {{ include "supabase.database.port" . | quote }}
|
|
- name: DB_SSL
|
|
value: {{ include "supabase.database.ssl" . | quote }}
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.db.secretRef }}
|
|
name: {{ .Values.secret.db.secretRef }}
|
|
key: {{ .Values.secret.db.secretRefKey.password | default "password" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.db" . }}
|
|
key: password
|
|
{{- end }}
|
|
- name: DB_NAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.db.secretRef }}
|
|
name: {{ .Values.secret.db.secretRef }}
|
|
key: {{ .Values.secret.db.secretRefKey.database | default "database" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.db" . }}
|
|
key: database
|
|
{{- end }}
|
|
- name: PG_META_DB_HOST
|
|
value: {{ include "supabase.database.host" . | quote }}
|
|
- name: PG_META_DB_PORT
|
|
value: {{ include "supabase.database.port" . | quote }}
|
|
- name: PG_META_DB_NAME
|
|
value: {{ include "supabase.database.name" . | quote }}
|
|
- name: PG_META_DB_USER
|
|
value: $(DB_USER)
|
|
- name: PG_META_DB_PASSWORD
|
|
value: $(DB_PASSWORD)
|
|
- name: PG_META_DB_SSL_MODE
|
|
value: {{ include "supabase.database.ssl" . | quote }}
|
|
- name: CRYPTO_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.meta.secretRef }}
|
|
name: {{ .Values.secret.meta.secretRef }}
|
|
key: {{ .Values.secret.meta.secretRefKey.cryptoKey }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.meta" . }}
|
|
key: cryptoKey
|
|
{{- end }}
|
|
|
|
|
|
{{- with .Values.deployment.meta.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.meta.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
{{- with .Values.deployment.meta.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.meta.volumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.meta.volumes }}
|
|
volumes:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- include "supabase.enforcedGeneralNodeSelector" (dict "nodeSelector" .Values.deployment.meta.nodeSelector) | nindent 6 }}
|
|
{{- include "supabase.enforcedGeneralAffinity" (dict "affinity" .Values.deployment.meta.affinity) | nindent 6 }}
|
|
{{- with .Values.deployment.meta.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|