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

API server startup does not timeout #608

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

benmoss
Copy link
Contributor

@benmoss benmoss commented Apr 12, 2022

What this PR does / why we need it:

This prevents the confusing situation of kapp-controller crashing because the k8s apiserver can't reach us. kapp-controller has a dependency on its own apiserver for the packaging API reconcilers, so if the apiserver fails to come up we will be stuck in a degraded state.

We can't use readiness probes or anything like that to signal this degraded state since Kubernetes Services wont route traffic to pods until they are ready.

Which issue(s) this PR fixes:

Fixes #607

Does this PR introduce a user-facing change?

The aggregated API server will now wait forever if it is not registered with the Kubernetes API server instead of exiting after 60 seconds.

This prevents the confusing situation of kapp-controller crashing
because the k8s apiserver can't reach us. kapp-controller has a
dependency on its own apiserver for the packaging API reconcilers, so if
the apiserver fails to come up we will be stuck in a degraded state.

We can't use readiness probes or anything like that to signal this
degraded state since Kubernetes Services wont route traffic to pods
until they are ready.
@cppforlife cppforlife merged commit 2833f23 into carvel-dev:develop Apr 12, 2022
@benmoss benmoss deleted the no-apiserver-crashloops branch April 12, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kapp-controller shouldn't exit if the packaging API is unavailable
3 participants