mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 08:44:29 +00:00
Three Junie briefs landed in one commit: #07 — Wire cnpg-backup-sa into CNPG cluster spec (drift R8) deploy/gcp/gke/knoe-db.yaml: add spec.serviceAccountName: cnpg-backup-sa (requires CNPG v1.29+, which is the live operator version). etc/init_cnpg_gke.sh: operator install URL now uses CNPG_OPERATOR_VERSION variable (default 1.29.0); new §11 patches knoe-db and knoe-db-barman-cloud RoleBindings to add cnpg-backup-sa as a subject if not already present — matching the 2026-04-29 live stabilization. #13 — Migrate off deprecated enablePodMonitor + podMonitorRelabelings Both deprecated fields removed from deploy/gcp/gke/knoe-db.yaml spec.monitoring. New deploy/gcp/gke/knoe-db-podmonitor.yaml carries the PodMonitor with the cluster relabeling rule (cnpg.io/cluster pod label → cluster label; required for all 85 CNPG Grafana panels). Apply alongside knoe-db.yaml on next cluster patch. #15 — Remove dead DASHBOARD consumer + basicauth_credentials supabase/helm/knoe-supabase: - wrapper.sh: drop DASHBOARD_USERNAME / DASHBOARD_PASSWORD envsubst lines - config.yaml: drop DASHBOARD consumer + basicauth_credentials block - kong/deployment.yaml: drop both DASHBOARD env-var secret refs - values.yaml: rename secret.dashboard → secret.openai (apiKey only; username/password dropped — no enforcer since commit 25f1b2e) - secrets/dashboard.yaml + _helpers.tpl: renamed to openai / supabase.secret.openai - studio/deployment.yaml: reads from secret.openai.apiKey - ci/example.yaml: updated to secret.openai.apiKey helm template confirms knoe-supabase-openai secret referenced; no DASHBOARD output. docs/TODO.md: queue items #7, #13, #15 + drift row R8 archived to Done. Co-authored-by: Junie <junie@jetbrains.com>
221 lines
9.2 KiB
YAML
221 lines
9.2 KiB
YAML
{{- if .Values.deployment.studio.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "supabase.studio.fullname" . }}
|
|
labels:
|
|
{{- include "supabase.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.studio.enabled }}
|
|
replicas: {{ .Values.deployment.studio.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "supabase.studio.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.deployment.studio.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "supabase.studio.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.image.studio.pullSecrets}}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "supabase.studio.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.studio.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ include "supabase.studio.name" $ }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.studio.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.studio.repository }}:{{ .Values.image.studio.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.studio.pullPolicy }}
|
|
env:
|
|
{{- range $key, $value := .Values.environment.studio }}
|
|
{{- if and (ne $key "POSTGRES_HOST") (ne $key "POSTGRES_PORT") }}
|
|
- name: {{ $key }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.deployment.kong.enabled }}
|
|
- name: SUPABASE_URL
|
|
value: {{ printf "http://%s:%v" (include "supabase.kong.fullname" .) .Values.service.kong.port | quote }}
|
|
{{- end }}
|
|
{{- if .Values.deployment.meta.enabled }}
|
|
- name: STUDIO_PG_META_URL
|
|
value: {{ printf "http://%s:%v" (include "supabase.meta.fullname" .) .Values.service.meta.port | quote }}
|
|
{{- end }}
|
|
|
|
- name: POSTGRES_HOST
|
|
value: {{ include "supabase.database.host" . | quote }}
|
|
- name: POSTGRES_PORT
|
|
value: {{ include "supabase.database.port" . | quote }}
|
|
|
|
- name: POSTGRES_DB
|
|
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: POSTGRES_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: PG_META_CRYPTO_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.meta.secretRef }}
|
|
name: {{ .Values.secret.meta.secretRef }}
|
|
key: {{ .Values.secret.meta.secretRefKey.cryptoKey | default "cryptoKey" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.meta" . }}
|
|
key: cryptoKey
|
|
{{- end }}
|
|
|
|
|
|
- name: OPENAI_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.openai.secretRef }}
|
|
name: {{ .Values.secret.openai.secretRef }}
|
|
key: {{ .Values.secret.openai.secretRefKey.apiKey | default "apiKey" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.openai" . }}
|
|
key: apiKey
|
|
{{- end }}
|
|
|
|
- name: SUPABASE_ANON_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.jwt.secretRef }}
|
|
name: {{ .Values.secret.jwt.secretRef }}
|
|
key: {{ .Values.secret.jwt.secretRefKey.anonKey | default "anonKey" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.jwt" . }}
|
|
key: anonKey
|
|
{{- end }}
|
|
|
|
- name: SUPABASE_SERVICE_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.jwt.secretRef }}
|
|
name: {{ .Values.secret.jwt.secretRef }}
|
|
key: {{ .Values.secret.jwt.secretRefKey.serviceKey | default "serviceKey" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.jwt" . }}
|
|
key: serviceKey
|
|
{{- end }}
|
|
|
|
- name: AUTH_JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.jwt.secretRef }}
|
|
name: {{ .Values.secret.jwt.secretRef }}
|
|
key: {{ .Values.secret.jwt.secretRefKey.secret | default "secret" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.jwt" . }}
|
|
key: secret
|
|
{{- end }}
|
|
|
|
{{- if .Values.deployment.analytics.enabled }}
|
|
- name: LOGFLARE_URL
|
|
value: {{ printf "http://%s:%v" (include "supabase.analytics.fullname" .) .Values.service.analytics.port | quote }}
|
|
- name: LOGFLARE_PUBLIC_ACCESS_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.analytics.secretRef }}
|
|
name: {{ .Values.secret.analytics.secretRef }}
|
|
key: {{ .Values.secret.analytics.secretRefKey.publicAccessToken | default "publicAccessToken" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.analytics" . }}
|
|
key: publicAccessToken
|
|
{{- end }}
|
|
- name: LOGFLARE_PRIVATE_ACCESS_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.secret.analytics.secretRef }}
|
|
name: {{ .Values.secret.analytics.secretRef }}
|
|
key: {{ .Values.secret.analytics.secretRefKey.privateAccessToken | default "privateAccessToken" }}
|
|
{{- else }}
|
|
name: {{ include "supabase.secret.analytics" . }}
|
|
key: privateAccessToken
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.functions.enabled }}
|
|
- name: EDGE_FUNCTIONS_MANAGEMENT_FOLDER
|
|
value: /home/deno/functions
|
|
{{- end }}
|
|
{{- if .Values.persistence.snippets.enabled }}
|
|
- name: SNIPPETS_MANAGEMENT_FOLDER
|
|
value: /app/snippets
|
|
{{- end }}
|
|
{{- with .Values.deployment.studio.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.studio.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
{{- with .Values.deployment.studio.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if or .Values.deployment.studio.volumeMounts .Values.persistence.functions.enabled }}
|
|
volumeMounts:
|
|
{{- with .Values.deployment.studio.volumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.functions.enabled }}
|
|
- name: functions-storage
|
|
mountPath: /home/deno/functions
|
|
{{- end }}
|
|
{{- if .Values.persistence.snippets.enabled }}
|
|
- name: snippets-storage
|
|
mountPath: /app/snippets
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if or .Values.deployment.studio.volumes .Values.persistence.functions.enabled }}
|
|
volumes:
|
|
{{- with .Values.deployment.studio.volumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.functions.enabled }}
|
|
- name: functions-storage
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "supabase.pvc.name" (dict "root" $ "name" "functions") }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.snippets.enabled }}
|
|
- name: snippets-storage
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "supabase.pvc.name" (dict "root" $ "name" "snippets") }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- include "supabase.enforcedGeneralNodeSelector" (dict "nodeSelector" .Values.deployment.studio.nodeSelector "enforceGeneralNodeRole" .Values.scheduling.enforceGeneralNodeRole) | nindent 6 }}
|
|
{{- include "supabase.enforcedGeneralAffinity" (dict "affinity" .Values.deployment.studio.affinity "enforceGeneralNodeRole" .Values.scheduling.enforceGeneralNodeRole) | nindent 6 }}
|
|
{{- with .Values.deployment.studio.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|