-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Avoid ws-manager-mk2 metrics duplication #18625
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
Conversation
2dd72c0
to
45e8cf8
Compare
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.
What would be the cost/implication to extend the metrics to include leader=true/false
instead of this change? It would allow us to observe the non-master as well as the master, and avoids surprises for future changes.
Only the leader process reconciles objects. Not sure that change makes sense. That said, that will introduce an undesired behavior; the leader will set leader=true, and the N standby replicas leader=false. When a new leader is elected (previously a standby replica), it will contain both leader true and false metrics. |
ab068dc
to
001bcc1
Compare
Yep, it would contain the metrics again. But dashboards/alerts could use |
We already have non-leader replica metrics that make sense for the generic parts (provided by controller-runtime) |
001bcc1
to
3f9c16e
Compare
Description
Only the leader replica maintains the workspace metrics.
Summary generated by Copilot
🤖 Generated by Copilot at 2e1c129
Improve leader election and workspace reconciler logic in
ws-manager-mk2
. Delay the reconciler initialization until the leader is elected and run it in a separate goroutine.Related Issue(s)
Fixes #
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold