Anyone has idea? How to implement it? Thanks, Abhay
On Monday, October 7, 2019 at 12:35:28 PM UTC-5, abhay paroha wrote: > > Hi, > > I am writing one grpc service and using gRPC health checking on Kubernetes > (https://github.com/grpc-ecosystem/grpc-health-probe). In my server, I > added different implementation (one for liveness and other for readiness) > of endpoints. I am wondering how this probe utility binary differentiates > between liveness check vs readiness check? There should be some other way > to define it in yaml, not just ["bin/grpc_health_probe", "-addr=:8801"] > > server = ServerBuilder.forPort(port) > .addService(new GrpcModuleHealthCheck()) > .addService(new GrpcModuleReadinessCheck()) > .addService(ProtoReflectionService.newInstance()) > .build.start > > In kubernetes deployment yaml, I am using below configurations > > livenessProbe: > failureThreshold: 3 > exec: > command: ["bin/grpc_health_probe", "-addr=:8801"] > initialDelaySeconds: 240 > periodSeconds: 20 > successThreshold: 1 > timeoutSeconds: 15 > readinessProbe: > failureThreshold: 3 > exec: > command: ["bin/grpc_health_probe", "-addr=:8801"] > initialDelaySeconds: 20 > periodSeconds: 20 > successThreshold: 1 > timeoutSeconds: 15 > > I just tested and found "GrpcModuleReadinessCheck" (the health class which > I added last) implementation is taking effect when I just exec my > kubernetes pod > > kubectl exec -it <MY_POD_NAME> -- /bin/bash > > bash-4.4$ ./grpc_health_probe -addr=localhost:8801 > status: SERVING > > I want to execute different logics for liveness and readiness probes but > right now the health implementation added at last in grpc server is taking > effect. How to achieve it? > > Thanks & regards, > Abhay Dutt Paroha > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d5987300-84fb-4b1d-9c5a-db9b5e8a2f0a%40googlegroups.com.