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

Adding readinessProbe and livenessProbe probes to porch #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mansoor17syed
Copy link

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks good.

@mansoor17syed
Copy link
Author

Hi Team,

@liamfallon @efiacor can you review these changes
and share your feedback

Copy link
Member

@liamfallon liamfallon left a comment

Choose a reason for hiding this comment

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

/approve

@nephio-prow nephio-prow bot added the approved label Jan 15, 2025
@mansoor17syed
Copy link
Author

Hi Team,
Could you please share your feedback or advise on the next steps to move forward?

@kushnaidu
Copy link
Contributor

/approve

Copy link
Contributor

nephio-prow bot commented Jan 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Catalin-Stratulat-Ericsson, kushnaidu, liamfallon, mansoor17syed

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@liamfallon
Copy link
Member

I wanted @efiacor to take a quick look.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @mansoor17syed , thank you for adding some best practice elements to the deployments.
The changes for the controllers should be fine as they are served by these - https://github.com/nephio-project/porch/blob/d7839690ca85fbb64669ae4158d5679c9ee29713/controllers/main.go#L174
but I am not 100% sure on the probes for the porch api server.

@@ -80,6 +80,28 @@ spec:
- --repo-sync-frequency=3m
- --disable-validating-admissions-policy=true
- --max-request-body-size=6291456 # Keep this in sync with function-runner's corresponding argument

#adding livenessProbes and readinessProbes for porch server
livenessProbe:
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are useful to meet best practices but may need some more investigation.
As the porch api server is a k8s aggregated api server, I am not 100% sure if we need to implement our own probe endpoints.
Also, the docs mention that /healthz is now deprecated and to use /livez instead.
https://kubernetes.io/docs/reference/using-api/health-checks/#individual-health-checks

Finally, unfortunately, the changes here are not "tested" on each PR commit so and breaking change only gets picked up when it gets deployed to the sandbox by the test-infra project. This is something we plan to address.
The configs here would need to be tailored to that env, and potentially monitored and updated if necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We may need to add something to the server config to handle the checks, such as - https://github.com/kubernetes/apiserver/blob/master/pkg/server/healthz.go#L91

Somewhere here maybe - https://github.com/nephio-project/porch/blob/main/pkg/apiserver/apiserver.go#L275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants