Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gRPC probes for Kubernetes, Openshift and Knative #857

Closed
Sgitario opened this issue Feb 4, 2022 · 1 comment · Fixed by #882
Closed

Support gRPC probes for Kubernetes, Openshift and Knative #857

Sgitario opened this issue Feb 4, 2022 · 1 comment · Fixed by #882
Assignees
Labels
enhancement New feature or request

Comments

@Sgitario
Copy link
Collaborator

Sgitario commented Feb 4, 2022

Description

Apart from the existing probes protocols HTTP, TCP and unix commands, in Kubernetes v1.23 the gRPC protocol can also be used. More context in kubernetes.io/define-a-grpc-liveness-probe.

If your application implements gRPC Health Checking Protocol, kubelet can be configured to use it for application liveness checks. You must enable the GRPCContainerProbe feature gate in order to configure checks that rely on gRPC.

Here is an example manifest:

apiVersion: v1
kind: Pod
metadata:
  name: etcd-with-grpc
spec:
  containers:
  - name: etcd
    image: k8s.gcr.io/etcd:3.5.1-0
    command: [ "/usr/local/bin/etcd", "--data-dir",  "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
    ports:
    - containerPort: 2379
    livenessProbe:
      grpc:
        port: 2379
      initialDelaySeconds: 10

User story

Given an user who configures the new `dekorate.kubernetes.liveness-probe.grpcPort` property
When dekorate generates the kubernetes or openshift or Knative or other relevant manifests
Then the liveness probes should be generated using the new `grpc` section
Given an user who does NOT configure the new `dekorate.kubernetes.liveness-probe.grpcPort` property
When dekorate generates the kubernetes or openshift or other relevant manifests
Then the liveness probes should NOT be generated using the new `grpc` section

The new field grpcPort should be added in the Probe java class which is also used for readiness, startup (when implemented in #854) probes.

Acceptance criteria

  • Add integration tests for K8s, Knative and Openshift
  • Update documentation with new configuration
@Sgitario Sgitario added the enhancement New feature or request label Feb 8, 2022
@Sgitario
Copy link
Collaborator Author

Update: it seems that the gRPC probe will be available also in readiness, startup and liveness, not only in liveness: https://www.infoq.com/news/2021/12/kubernetes-1-23/

Description updated accordingly.

@Sgitario Sgitario self-assigned this Feb 25, 2022
Sgitario added a commit to Sgitario/dekorate that referenced this issue Feb 28, 2022
All changes: fabric8io/kubernetes-client@v5.10.0...v5.12.1

We need to bump the Kubernetes Client to the most recent version to support gRPC actions (see dekorateio#857)
Sgitario added a commit to Sgitario/dekorate that referenced this issue Feb 28, 2022
All changes: fabric8io/kubernetes-client@v5.10.0...v5.12.1

We need to bump the Kubernetes Client to the most recent version to support gRPC actions (see dekorateio#857)
Sgitario added a commit that referenced this issue Feb 28, 2022
All changes: fabric8io/kubernetes-client@v5.10.0...v5.12.1

We need to bump the Kubernetes Client to the most recent version to support gRPC actions (see #857)
@Sgitario Sgitario changed the title Support gRPC liveness probe for Kubernetes, Openshift and Knative Support gRPC probes for Kubernetes, Openshift and Knative Feb 28, 2022
Sgitario added a commit to Sgitario/dekorate that referenced this issue Feb 28, 2022
Sgitario added a commit to Sgitario/dekorate that referenced this issue Mar 1, 2022
Sgitario added a commit that referenced this issue Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant