Skip to content

Commit

Permalink
Add liveliness/readiness probe for all deployments
Browse files Browse the repository at this point in the history
* update ingress TLS secret name and hosts
  • Loading branch information
luqman-visualt committed Oct 21, 2023
1 parent c94b511 commit e8d66af
Show file tree
Hide file tree
Showing 14 changed files with 160 additions and 2 deletions.
8 changes: 8 additions & 0 deletions charts/supabase/templates/analytics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ spec:
- name: LOGFLARE_FEATURE_FLAG_OVERRIDE
value: $(FEATURE_FLAG_OVERRIDE)
{{- end }}
{{- with .Values.analytics.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.analytics.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.analytics.service.port }}
protocol: TCP
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/auth/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.smtp" . }}
key: password
{{- with .Values.auth.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.auth.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 9999
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/db/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.db" . }}
key: database
{{- with .Values.db.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.db.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 9999
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/functions/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ spec:
key: serviceKey
- name: POSTGRES_BACKEND_URL
value: $(DB_DRIVER)://$(DB_USERNAME):$(DB_PASSWORD)@$(DB_HOSTNAME):$(DB_PORT)/$(DB_DATABASE)?search_path=auth&sslmode=$(DB_SSL)
{{- with .Values.functions.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.functions.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- with .Values.functions.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/imgproxy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ spec:
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- with .Values.imgproxy.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.imgproxy.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/kong/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.dashboard" . }}
key: password
{{- with .Values.kong.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.kong.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8000
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/meta/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ spec:
value: $(DB_PASSWORD)
- name: PG_META_DB_SSL_MODE
value: $(DB_SSL)
{{- with .Values.meta.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.meta.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/realtime/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.jwt" . }}
key: secret
{{- with .Values.realtime.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.realtime.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 4000
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/rest/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.jwt" . }}
key: secret
{{- with .Values.rest.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.rest.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 3000
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/storage/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ spec:
- name: IMGPROXY_URL
value: http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port | int }}
{{- end }}
{{- with .Values.storage.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.storage.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 5000
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/studio/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ spec:
secretKeyRef:
name: {{ include "supabase.secret.jwt" . }}
key: serviceKey
{{- with .Values.studio.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.studio.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 3000
Expand Down
8 changes: 8 additions & 0 deletions charts/supabase/templates/vector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ spec:
name: {{ include "supabase.secret.analytics" . }}
key: apiKey
{{- end }}
{{- with .Values.vector.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.vector.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.vector.service.port }}
protocol: TCP
Expand Down
42 changes: 40 additions & 2 deletions charts/supabase/values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ db:
image:
repository: supabase/postgres
tag: 15.1.0.117
livenessProbe:
exec:
command:
- pg_isready
- -U
- $POSTGRES_USER
initialDelaySeconds: 3
persistence:
enabled: false
size: 20Gi
Expand All @@ -37,6 +44,11 @@ studio:
STUDIO_DEFAULT_PROJECT: "My Project"
SUPABASE_PUBLIC_URL: http://example.com/
NEXT_PUBLIC_ENABLE_LOGS: "true"
livenessProbe:
httpGet:
path: /api/profile
port: 3000
initialDelaySeconds: 3

auth:
image:
Expand Down Expand Up @@ -87,6 +99,11 @@ realtime:
ERL_AFLAGS: -proto_dist inet_tcp
ENABLE_TAILSCALE: "false"
DNS_NODES: "''"
livenessProbe:
httpGet:
path: /
port: 4000
initialDelaySeconds: 3

meta:
image:
Expand All @@ -106,6 +123,11 @@ storage:
TENANT_ID: stub
REGION: stub
GLOBAL_S3_BUCKET: stub
livenessProbe:
httpGet:
path: /status
port: 5000
initialDelaySeconds: 3
persistence:
enabled: false
accessModes:
Expand All @@ -123,6 +145,12 @@ imgproxy:
IMGPROXY_LOCAL_FILESYSTEM_ROOT: /
IMGPROXY_USE_ETAG: "true"
IMGPROXY_ENABLE_WEBP_DETECTION: "true"
livenessProbe:
exec:
command:
- imgproxy
- health
initialDelaySeconds: 3
persistence:
enabled: false
accessModes:
Expand Down Expand Up @@ -150,9 +178,9 @@ kong:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
tls: []
# - secretName: localhost
# - secretName: example-ingress-tls
# hosts:
# - localhost
# - example.com
hosts:
- host: example.com
paths:
Expand All @@ -171,10 +199,20 @@ analytics:
LOGFLARE_MIN_CLUSTER_SIZE: "1"
FEATURE_FLAG_OVERRIDE: multibackend=true
RELEASE_COOKIE: cookie
livenessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 3

vector:
image:
tag: 0.28.1-alpine
livenessProbe:
httpGet:
path: /health
port: 9001
initialDelaySeconds: 3

functions:
image:
Expand Down
24 changes: 24 additions & 0 deletions charts/supabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ db:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -141,6 +143,8 @@ studio:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -211,6 +215,8 @@ auth:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -302,6 +308,8 @@ rest:
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -374,6 +382,8 @@ realtime:
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -449,6 +459,8 @@ meta:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -520,6 +532,8 @@ storage:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -607,6 +621,8 @@ imgproxy:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -684,6 +700,8 @@ kong:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -773,6 +791,8 @@ analytics:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -856,6 +876,8 @@ vector:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -920,6 +942,8 @@ functions:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
livenessProbe: {}
readinessProbe: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit e8d66af

Please sign in to comment.