Skip to content
Snippets Groups Projects
Unverified Commit d447bcc7 authored by Göran Pöhner's avatar Göran Pöhner Committed by GitHub
Browse files

Add startup probe for postgres (#763)

parent cea0d3ee
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,6 @@ type: application
maintainers:
- name: groundhog2k
version: 0.3.1
version: 0.3.2
appVersion: "14.1"
# PostgreSQL
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 14.1](https://img.shields.io/badge/AppVersion-14.1-informational?style=flat-square)
![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 14.1](https://img.shields.io/badge/AppVersion-14.1-informational?style=flat-square)
A Helm chart for PostgreSQL on Kubernetes
......@@ -59,8 +59,10 @@ $ helm uninstall my-release
| image.repository | string | `"postgres"` | Image name |
| image.tag | string | `""` | Image tag |
| imagePullSecrets | list | `[]` | Image pull secrets |
| startupProbe | object | `see values.yaml` | Startup probe configuration |
| livenessProbe | object | `see values.yaml` | Liveness probe configuration |
| readinessProbe | object | `see values.yaml` | Readiness probe configuration |
| customStartupProbe | object | `{}` | Custom startup probe (overwrites default startup probe configuration) |
| customLivenessProbe | object | `{}` | Custom liveness probe (overwrites default liveness probe configuration) |
| customReadinessProbe | object | `{}` | Custom readiness probe (overwrites default readiness probe configuration) |
| resources | object | `{}` | Resource limits and requests |
......
......@@ -64,6 +64,26 @@ spec:
envFrom:
- secretRef:
name: {{ include "postgres.fullname" . }}
{{- if .Values.customStartupProbe }}
startupProbe:
{{- toYaml .Values.customStartupProbe | nindent 12 }}
{{- else }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
exec:
command:
- sh
- -c
- pg_isready -h localhost
{{- with .Values.startupProbe }}
initialDelaySeconds: {{ .initialDelaySeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
failureThreshold: {{ .failureThreshold }}
successThreshold: {{ .successThreshold }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.customLivenessProbe }}
livenessProbe:
{{- toYaml .Values.customLivenessProbe | nindent 12 }}
......
......@@ -73,6 +73,18 @@ affinity: {}
## Maximum number of revisions maintained in revision history
revisionHistoryLimit:
## Custom startup probe (overwrites default startup probe)
customStartupProbe: {}
## Default startup check
startupProbe:
enabled: true
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 30
successThreshold: 1
periodSeconds: 10
## Custom liveness probe (overwrites default liveness probe)
customLivenessProbe: {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment