Allow configuration of armada-api/tiller probes

Allows to configure the probes via values.yaml in both
the armada charts, which includes armada and tiller
containers, and in the standalone tiller chart

Also bumps the osh sha in tools/helm_tk.sh to latest
22ef25ab295d6b7c6797cfffaa77cf181c673e9b

Change-Id: I0bb0acf00ecc0b61f8d324fe9b6a8507c361e9fc
This commit is contained in:
Itxaka 2019-10-02 16:22:26 +02:00
parent d593bdbffe
commit d90eb125ed
No known key found for this signature in database
GPG Key ID: 0FFB0E56C3539E24
5 changed files with 90 additions and 54 deletions

View File

@ -14,6 +14,26 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "armadaApiProbeTemplate" }}
httpGet:
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- define "tillerReadinessProbeTemplate" }}
httpGet:
path: /readiness
port: 44135
scheme: HTTP
{{- end }}
{{- define "tillerLivenessProbeTemplate" }}
httpGet:
path: /liveness
port: 44135
scheme: HTTP
{{- end }}
{{- if .Values.manifests.deployment_api }}
{{- $envAll := . }}
{{- $mounts_armada_api := .Values.pod.mounts.armada_api.armada_api }}
@ -109,19 +129,8 @@ spec:
ports:
- name: armada-api
containerPort: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
httpGet:
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
readinessProbe:
httpGet:
scheme: HTTP
path: /api/v1.0/health
port: {{ tuple "armada" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
{{ dict "envAll" $envAll "component" "armada" "container" "api" "type" "readiness" "probeTemplate" (include "armadaApiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "armada" "container" "api" "type" "liveness" "probeTemplate" (include "armadaApiProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp
@ -175,26 +184,8 @@ spec:
- name: tiller
containerPort: {{ .Values.conf.tiller.port }}
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "readiness" "probeTemplate" (include "tillerReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "liveness" "probeTemplate" (include "tillerLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{- end }}
{{ if $mounts_armada_api.volumeMounts }}{{ toYaml $mounts_armada_api.volumeMounts | indent 12 }}{{ end }}
volumes:

View File

@ -225,6 +225,36 @@ monitoring:
port: 8000
pod:
probes:
armada:
api:
readiness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 10
liveness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 10
tiller:
readiness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
liveness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
security_context:
armada:
pod:

View File

@ -14,6 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "tillerReadinessProbeTemplate" }}
httpGet:
scheme: HTTP
path: /readiness
port: 44135
{{- end }}
{{- define "tillerLivenessProbeTemplate" }}
httpGet:
scheme: HTTP
path: /liveness
port: 44135
{{- end }}
{{- if .Values.manifests.deployment_tiller }}
{{- $envAll := . }}
{{- $serviceAccountName := "tiller-deploy" }}
@ -98,25 +112,7 @@ spec:
- name: tiller
containerPort: 44134
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
{{ dict "envAll" $envAll "component" "tiller" "container" "tiller" "type" "readiness" "probeTemplate" (include "tillerReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" $envAll "component" "tiller" "container" "tiller" "type" "liveness" "probeTemplate" (include "tillerLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
status: {}
{{- end }}

View File

@ -51,6 +51,25 @@ conf:
prestop_sleep: 30
pod:
probes:
tiller:
tiller:
readiness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
liveness:
enabled: true
params:
failureThreshold: 3
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
enabled: false
tiller:

View File

@ -22,7 +22,7 @@ HELM=${1}
HELM_PIDFILE=${2}
SERVE_DIR=$(mktemp -d)
HTK_STABLE_COMMIT=${HTK_COMMIT:-"200b5e902b3a176fbfbe669b6a10a254c9b50f5d"}
HTK_STABLE_COMMIT=${HTK_COMMIT:-"22ef25ab295d6b7c6797cfffaa77cf181c673e9b"}
${HELM} init --client-only