Add support for specifying liveness probe

This commit is contained in:
Waqar Ahmed 2020-10-07 05:34:47 +05:00
parent d9c1000ab8
commit 7ca337a5f8
3 changed files with 47 additions and 0 deletions

View File

@ -234,3 +234,38 @@
schema:
type: int
required: true
# Pod Probes
# Liveness Probe
- variable: livenessProbe
label: "Liveness Probe"
description: "Configure Liveness Probe"
group: "Probes"
schema:
type: dict
default: null
"null": true
attrs:
- variable: command
label: "Liveness command"
description: "Specify a command to determine liveness of pod"
schema:
type: list
required: true
items:
- variable: commandArg
label: "Command Arg"
schema:
type: string
- variable: initialDelaySeconds
label: "Seconds Delay"
description: "Seconds to delay the first liveness probe"
schema:
type: int
default: 5
- variable: periodSeconds
label: "Period Seconds"
description: "Specify number of seconds to run liveness probe"
schema:
type: int
default: 10

View File

@ -58,6 +58,14 @@ spec:
value: {{ .value | quote }}
{{- end }}
{{- end }}
{{- if .Values.livenessProbe }}
livenessProbe:
exec:
command:
{{ toYaml .Values.livenessProbe.command | indent 16 }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
{{- end }}
{{- if or .Values.persistentVolumeClaims .Values.hostPathVolumes }}
volumes:
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}

View File

@ -24,3 +24,7 @@ externalInterfaces: []
# Storage related configuration
hostPathVolumes: []
persistentVolumeClaims: []
# Probes
# Liveness Probe
livenessProbe: null