Add an easy way to configure the health probes(all 3 are default
enabled, and call /status, which isn't totally working).
Showing
3 changed files
with
33 additions
and
14 deletions
... | @@ -175,3 +175,11 @@ spec: | ... | @@ -175,3 +175,11 @@ spec: |
175 | {{- end }} | 175 | {{- end }} |
176 | {{- end }} | 176 | {{- end }} |
177 | 177 | ||
178 | {{ define "moqui.health-probe" }} | ||
179 | {{- $name := index . 0 }} | ||
180 | {{- $probe := index . 1 }} | ||
181 | {{- if $probe.enabled }} | ||
182 | {{ $name }}:{{ $probe.probe | toYaml | nindent 2 }} | ||
183 | {{- end }} | ||
184 | {{- end }} | ||
185 | ... | ... |
... | @@ -135,20 +135,9 @@ spec: | ... | @@ -135,20 +135,9 @@ spec: |
135 | - name: http-moqui | 135 | - name: http-moqui |
136 | containerPort: 8080 | 136 | containerPort: 8080 |
137 | protocol: TCP | 137 | protocol: TCP |
138 | livenessProbe: | 138 | {{ include "moqui.health-probe" (list "livenessProbe" .Values.health.liveness) | nindent 10 }} |
139 | httpGet: | 139 | {{ include "moqui.health-probe" (list "readinessProbe" .Values.health.readiness) | nindent 10 }} |
140 | path: /status | 140 | {{ include "moqui.health-probe" (list "startupProbe" .Values.health.startup) | nindent 10 }} |
141 | port: http-moqui | ||
142 | readinessProbe: | ||
143 | httpGet: | ||
144 | path: /status | ||
145 | port: http-moqui | ||
146 | startupProbe: | ||
147 | httpGet: | ||
148 | path: /status | ||
149 | port: http-moqui | ||
150 | periodSeconds: 10 | ||
151 | failureThreshold: 3 | ||
152 | resources: | 141 | resources: |
153 | {{- toYaml .Values.resources | nindent 12 }} | 142 | {{- toYaml .Values.resources | nindent 12 }} |
154 | {{- with .Values.nodeSelector }} | 143 | {{- with .Values.nodeSelector }} | ... | ... |
... | @@ -49,6 +49,28 @@ persistence: | ... | @@ -49,6 +49,28 @@ persistence: |
49 | storage: 8Gi | 49 | storage: 8Gi |
50 | annotations: {} | 50 | annotations: {} |
51 | 51 | ||
52 | health: | ||
53 | liveness: | ||
54 | enabled: true | ||
55 | probe: | ||
56 | httpGet: | ||
57 | path: /status | ||
58 | port: http-moqui | ||
59 | readiness: | ||
60 | enabled: true | ||
61 | probe: | ||
62 | httpGet: | ||
63 | path: /status | ||
64 | port: http-moqui | ||
65 | startup: | ||
66 | enabled: true | ||
67 | probe: | ||
68 | httpGet: | ||
69 | path: /status | ||
70 | port: http-moqui | ||
71 | periodSeconds: 10 | ||
72 | failureThreshold: 3 | ||
73 | |||
52 | secret: | 74 | secret: |
53 | entity_ds_password: "iuqom" | 75 | entity_ds_password: "iuqom" |
54 | 76 | ... | ... |
-
Please register or sign in to post a comment