mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 21:34:30 +00:00
Prefer infra-managed manifests for bootstrap; reconcile CNPG instances based on Ready+schedulable labeled db nodes; update manifests to use node-role affinity + anti-affinity; add policy/tests and config touch-ups (incl. prole.cfg).
86 lines
3.3 KiB
YAML
86 lines
3.3 KiB
YAML
{{- if .Values.deployment.imgproxy.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "supabase.imgproxy.fullname" . }}
|
|
labels:
|
|
{{- include "supabase.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.imgproxy.enabled }}
|
|
replicas: {{ .Values.deployment.imgproxy.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "supabase.imgproxy.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.deployment.imgproxy.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "supabase.imgproxy.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.image.imgproxy.pullSecrets}}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "supabase.imgproxy.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.imgproxy.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ include "supabase.imgproxy.name" $ }}
|
|
securityContext:
|
|
{{- toYaml .Values.deployment.imgproxy.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.imgproxy.repository }}:{{ .Values.image.imgproxy.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.imgproxy.pullPolicy }}
|
|
env:
|
|
{{- range $key, $value := .Values.environment.imgproxy }}
|
|
- name: {{ $key }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.imgproxy.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.imgproxy.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
{{- if or (.Values.persistence.imgproxy.enabled) (.Values.deployment.imgproxy.volumes) }}
|
|
volumeMounts:
|
|
{{- with .Values.deployment.imgproxy.volumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.imgproxy.enabled }}
|
|
- mountPath: /var/lib/storage
|
|
name: imgproxy-volume
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.deployment.imgproxy.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if or (.Values.persistence.imgproxy.enabled) (.Values.deployment.imgproxy.volumes) }}
|
|
volumes:
|
|
{{- with .Values.deployment.imgproxy.volumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.imgproxy.enabled }}
|
|
- name: imgproxy-volume
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "supabase.pvc.name" (dict "root" $ "name" "imgproxy") }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- include "supabase.enforcedGeneralNodeSelector" (dict "nodeSelector" .Values.deployment.imgproxy.nodeSelector) | nindent 6 }}
|
|
{{- include "supabase.enforcedGeneralAffinity" (dict "affinity" .Values.deployment.imgproxy.affinity) | nindent 6 }}
|
|
{{- with .Values.deployment.imgproxy.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|