From d72d2680575731f3312c8e9f637fd80bd8f5e630 Mon Sep 17 00:00:00 2001 From: Koichiro Den Date: Tue, 4 Dec 2018 20:32:16 +0900 Subject: [PATCH] Add readiness/liveness probes to vizier-core Signed-off-by: Koichiro Den --- cmd/manager/Dockerfile | 3 +++ manifests/vizier/core/deployment.yaml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/cmd/manager/Dockerfile b/cmd/manager/Dockerfile index a25a0310d07..67197a08f33 100644 --- a/cmd/manager/Dockerfile +++ b/cmd/manager/Dockerfile @@ -6,6 +6,9 @@ RUN go build -o vizier-manager FROM alpine:3.7 WORKDIR /app +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/manager/vizier-manager /app/ COPY --from=build-env /go/src/github.com/kubeflow/katib/pkg/manager/visualise / ENTRYPOINT ["./vizier-manager"] diff --git a/manifests/vizier/core/deployment.yaml b/manifests/vizier/core/deployment.yaml index 1a50b8997b1..f42c4b84ed2 100644 --- a/manifests/vizier/core/deployment.yaml +++ b/manifests/vizier/core/deployment.yaml @@ -30,6 +30,14 @@ spec: ports: - name: api containerPort: 6789 + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:6789"] + initialDelaySeconds: 5 + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:6789"] + initialDelaySeconds: 10 # resources: # requests: # cpu: 500m