kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
8.78k stars 2.9k forks source link

GRPC Handler is not enabled in Probe healthCheck #1276

Closed shivamnarula closed 1 year ago

shivamnarula commented 1 year ago

Liveness probe defined with GRPC is not read by probe Handler. Probe Handler can only have following options:

Exec *[ExecAction](https://pkg.go.dev/k8s.io/client-go/pkg/api/v1#ExecAction) `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
// HTTPGet specifies the http request to perform.
// +optional
HTTPGet *[HTTPGetAction](https://pkg.go.dev/k8s.io/client-go/pkg/api/v1#HTTPGetAction) `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
// TCPSocket specifies an action involving a TCP port.
// TCP hooks not yet supported
// TODO: implement a realistic TCP lifecycle hook
// +optional
TCPSocket *[TCPSocketAction](https://pkg.go.dev/k8s.io/client-go/pkg/api/v1#TCPSocketAction) `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`

Can we please enable grpc option as well?

### Tasks
liggitt commented 1 year ago

these fields are present in current versions... make sure you are using the v0.24.0+ version of k8s.io/client-go and k8s.io/api

shivamnarula commented 1 year ago

Thankyou @liggitt