Skip to content

Agent Mesh

charts: add pg_isready probes to the db statefulset

Tomas Tormo8cf6ff4e5341
diff --git a/charts/sam-mesh/templates/db-statefulset.yaml b/charts/sam-mesh/templates/db-statefulset.yaml
index 9a585a8e..5a75e891 100644
--- a/charts/sam-mesh/templates/db-statefulset.yaml
+++ b/charts/sam-mesh/templates/db-statefulset.yaml
@@ -34,6 +34,14 @@ spec:
- containerPort: 5432
name: postgres
protocol: TCP
+ readinessProbe:
+ exec:
+ command: ["pg_isready", "-U", {{ .Values.database.postgres.user | quote }}, "-d", {{ .Values.database.postgres.database | quote }}]
+ periodSeconds: 5
+ livenessProbe:
+ exec:
+ command: ["pg_isready", "-U", {{ .Values.database.postgres.user | quote }}, "-d", {{ .Values.database.postgres.database | quote }}]
+ periodSeconds: 15
resources:
{{- toYaml .Values.database.postgres.resources | nindent 10 }}
volumeMounts: