From 6cc838941ddc74338154dc6c2870072b72f8a3d7 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 28 Sep 2021 16:16:17 -0700 Subject: [PATCH] Readiness probe (#352) * add back port 80 for registry * add readinessProbe --- helm/charts/engine/templates/deployment.yaml | 7 +++++++ helm/charts/registry/templates/deployment.yaml | 13 +++++++++++-- helm/charts/registry/values.yaml | 5 ++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/helm/charts/engine/templates/deployment.yaml b/helm/charts/engine/templates/deployment.yaml index 66d1a6f6fc..30568ca08d 100644 --- a/helm/charts/engine/templates/deployment.yaml +++ b/helm/charts/engine/templates/deployment.yaml @@ -55,6 +55,13 @@ spec: readOnly: true - name: data mountPath: /var/run/infra/data + readinessProbe: + httpGet: + scheme: HTTPS + path: /healthz + {{- with first .Values.service.ports }} + port: {{ .targetPort }} + {{- end }} livenessProbe: httpGet: scheme: HTTPS diff --git a/helm/charts/registry/templates/deployment.yaml b/helm/charts/registry/templates/deployment.yaml index 683b32480b..da8fcbe55a 100644 --- a/helm/charts/registry/templates/deployment.yaml +++ b/helm/charts/registry/templates/deployment.yaml @@ -48,11 +48,20 @@ spec: mountPath: /var/run/infra/data - name: config mountPath: /var/run/infra/config + readinessProbe: + httpGet: + {{- with first .Values.service.ports }} + scheme: {{ .name | upper }} + path: /healthz + port: {{ .targetPort }} + {{- end }} livenessProbe: httpGet: + {{- with first .Values.service.ports }} + scheme: {{ .name | upper }} path: /healthz - scheme: HTTPS - port: 443 + port: {{ .targetPort }} + {{- end }} periodSeconds: 3 affinity: podAffinity: diff --git a/helm/charts/registry/values.yaml b/helm/charts/registry/values.yaml index 7687769e4e..2326c6c1ab 100644 --- a/helm/charts/registry/values.yaml +++ b/helm/charts/registry/values.yaml @@ -12,6 +12,9 @@ service: labels: {} annotations: {} ports: + - name: http + port: 80 + targetPort: 80 - name: https port: 443 targetPort: 443 @@ -20,6 +23,6 @@ ingress: enabled: false labels: {} annotations: {} - servicePort: 443 + servicePort: 80 hosts: [] tls: []