Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR suggests two changes to tigera-apiserver probes. I feel fairly confident that the first change is the correct way forward, but I am less sure about the second change.
Remove the liveness probe.
Liveness probes should be used when we can detect a condition that a restart has the potential to fix. I do not believe we are aware of such a condition within the API server so I am suggesting we remove this probe. The current liveness probe fails under conditions that a restart likely cannot fix (issues connecting to kube-apiserver, CPU contention)
Update the readiness probe to better reflect readiness throughout the lifetime of the container.
Currently, the probe checks whether the API server logged a successful started up. I am proposing that we embed this check within the /readyz endpoint and enable authorization checks (from tigera-apiserver to kube-apiserver) for that endpoint. This takes the readiness check from one that will always pass after successful startup, to one that is responsive to issues that may arise in requests between tigera-apiserver and kube-apiserver. Additionally, by installing our current check into /readyz, the execution of our check flows through the same middlewares as typical requests to the tigera-apiserver.
Point 2 relies on changes to our API server. See the linked PR for those changes.
For PR author
make gen-files
make gen-versions
For PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bug
if this is a bugfix.kind/enhancement
if this is a a new feature.enterprise
if this PR applies to Calico Enterprise only.