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

Adds liveness/readiness probes. Removes unused manifest. #3314

Merged

Conversation

absoludity
Copy link
Contributor

Description of the change

This PR enables the liveness and readiness checks so that they are used to mark the pod as ready and/or restart the pod when it's not responding.

I've just re-used the http version of the configured plugins endpoint, since it is cheap and a good candidate.

I also removed the now unused developer manifest for the kubeapps apis setup (since it was overwriting the changes in the main values :) ).

Benefits

The pod can be restarted by Kubernetes as needed.

Possible drawbacks

None.

Applicable issues

Additional information

We should add proper logging - I'll create an issue for that.

Signed-off-by: Michael Nelson <minelson@vmware.com>
commit.

Signed-off-by: Michael Nelson <minelson@vmware.com>
Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for removing the unused files. I just have a question on the livenessProbe, but not a big deal, +1-ing!

httpGet:
path: /live
path: /core/plugins/v1alpha1/configured-plugins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering: if no plugin is enabled, wouldn't it rather return a 404-alike, so k8s'd say: "it's not live" ?

I mean, for the readiness probe I think this behavior is ok, but for the liveness, I'm not sure, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configured-plugins endpoint returns a list of configured plugins, so there's no 404 when none are configured:

curl http://localhost:8080/core/plugins/v1alpha1/configured-plugins -v
*   Trying 127.0.0.1:8080...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /core/plugins/v1alpha1/configured-plugins HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Grpc-Metadata-Content-Type: application/grpc
< Date: Fri, 27 Aug 2021 07:51:03 GMT
< Content-Length: 2
< 
* Connection #0 to host localhost left intact
{}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for checking!

@absoludity absoludity merged commit 725fb09 into vmware-tanzu:master Aug 27, 2021
@absoludity absoludity deleted the 3284-apis-liveness-readiness branch August 27, 2021 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add liveness and readiness probes for kubeapps-apis
2 participants