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
cluster: monitor K8s livez/readyz after initialization #5623
Conversation
After initializing a connection, start a monitor goroutine to poll the `/livez` and `/readyz` endpoints of the cluster and update the Tilt `Cluster` object status accordingly. Additionally, if the client cannot be initialized in the first place, the reconciler will requeue itself in the future and attempt re-initialization.
var annotations map[string]string | ||
if tlr.FeatureFlags[feature.ClusterRefresh] { | ||
annotations = map[string]string{ | ||
"features.tilt.dev/cluster-refresh": "true", | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This felt like a reasonably clean way to propagate feature flag information to an individual resource, and there's sorta precedent here because we conditionally create disable buttons in a sibling function based on feature flags
Reason I'd been holding off on merging this is because of the issues it exposes that I mentioned during demo in company meeting. Requested a new review (cc @nicksieger) because I added a feature flag to gate the problematic part of the functionality (existing logic remains as-is), so we can continue to address the underlying issues safely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable use of annotations to me.
After initializing a connection, start a monitor goroutine to
poll the
/livez
and/readyz
endpoints of the cluster andupdate the Tilt
Cluster
object status accordingly.Additionally, if the client cannot be initialized in the first
place, the reconciler will requeue itself in the future and
attempt re-initialization.