From bfd35f6cc02cddff76d99c5d7a91441ac76402c2 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 7 Sep 2018 13:38:18 +0300 Subject: [PATCH] Make health checks compatible with Istio mTLS --- .../templates/blue-deployment.yaml | 24 +++++++++---------- .../templates/green-deployment.yaml | 24 +++++++++---------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/charts/podinfo-istio/templates/blue-deployment.yaml b/charts/podinfo-istio/templates/blue-deployment.yaml index ccb15dc..6b55aea 100644 --- a/charts/podinfo-istio/templates/blue-deployment.yaml +++ b/charts/podinfo-istio/templates/blue-deployment.yaml @@ -54,20 +54,18 @@ spec: - name: http containerPort: {{ .Values.containerPort }} protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 9898 - initialDelaySeconds: 1 - periodSeconds: 2 - failureThreshold: 1 livenessProbe: - httpGet: - path: /healthz - port: 9898 - initialDelaySeconds: 1 - periodSeconds: 10 - failureThreshold: 2 + exec: + command: + - /bin/sh + - -c + - wget --quiet --tries=1 --spider http://localhost:{{ .Values.containerPort }}/healthz || exit 1 + readinessProbe: + exec: + command: + - /bin/sh + - -c + - wget --quiet --tries=1 --spider http://localhost:{{ .Values.containerPort }}/readyz || exit 1 volumeMounts: - name: data mountPath: /data diff --git a/charts/podinfo-istio/templates/green-deployment.yaml b/charts/podinfo-istio/templates/green-deployment.yaml index f8c3c86..efcb6fe 100644 --- a/charts/podinfo-istio/templates/green-deployment.yaml +++ b/charts/podinfo-istio/templates/green-deployment.yaml @@ -55,20 +55,18 @@ spec: - name: http containerPort: {{ .Values.containerPort }} protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 9898 - initialDelaySeconds: 1 - periodSeconds: 2 - failureThreshold: 1 livenessProbe: - httpGet: - path: /healthz - port: 9898 - initialDelaySeconds: 1 - periodSeconds: 10 - failureThreshold: 2 + exec: + command: + - /bin/sh + - -c + - wget --quiet --tries=1 --spider http://localhost:{{ .Values.containerPort }}/healthz || exit 1 + readinessProbe: + exec: + command: + - /bin/sh + - -c + - wget --quiet --tries=1 --spider http://localhost:{{ .Values.containerPort }}/readyz || exit 1 volumeMounts: - name: data mountPath: /data