Sfoglia il codice sorgente

Add support for specifying liveness probe

Waqar Ahmed 4 anni fa
parent
commit
7ca337a5f8

+ 35 - 0
charts/ix-chart/2009.0.1/questions.yaml

@@ -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

+ 8 - 0
charts/ix-chart/2009.0.1/templates/deployment.yaml

@@ -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 }}

+ 4 - 0
charts/ix-chart/2009.0.1/values.yaml

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