-
Notifications
You must be signed in to change notification settings - Fork 478
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
Fix metrics-server lookup order #4884
Conversation
Signed-off-by: vasu1124 <vasu1124@actvirtual.com>
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.
/cc @vpnachev @timuthy @MartinWeindel @jia-jerry
Any concerns/comments?
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.
/lgtm
A was thinking the same in #4626 (comment)
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.
/lgtm
Signed-off-by: vasu1124 <vasu1124@actvirtual.com>
Signed-off-by: vasu1124 <vasu1124@actvirtual.com>
After gardener/gardener#4884 it should no longer be required to have the mutation of the metrics-server Deployment.
After gardener/gardener#4884 it should no longer be required to have the mutation of the metrics-server Deployment.
After gardener/gardener#4884 it should no longer be required to have the mutation of the metrics-server Deployment.
After gardener/gardener#4884 it should no longer be required to have the mutation of the metrics-server Deployment.
) * Drop obsolete code for the vpn-shoot Service mutation After ReversedVPN feature is unconditionally enabled, there is no longer a Service kube-system/vpn-shoot in the Shoot cluster * Drop obsolete code for the metrics-server Deployment mutation After gardener/gardener#4884 it should no longer be required to have the mutation of the metrics-server Deployment. * Add object selector to the shoot webhook
Signed-off-by: vasu1124 vasu1124@actvirtual.com
How to categorize this PR?
/area control-plane
/kind bug
What this PR does / why we need it:
The metrics-server with the current rule will always use
Hostname
to resolve the scraping target. TheHostname
can only be resolved in infrastructure environments where automatically DNS entries are provisioned. In many environments, like OpenStack, metal, equinix, etc. there is no such DNS entry.The setting ensures that the metric-server picks one of the keys (type in the given rule order) from the
node
resource, e.g.The
type: Hostname
will always be available (no node w/o hostname!), but is not always resolveable. Hence, the metric-server in such cases will always fail to scrape the node.This PR fixes the rule to choose
InternalIP
first, which should be a correct selection for allmost all environments, and skip to other the alternatives only if that type is not set:InternalIP,InternalDNS,ExternalDNS,ExternalIP,Hostname
Which issue(s) this PR fixes:
Fixes #4626 #2455 #2019 and probably more
Special notes for your reviewer:
We have been arguing over this rule change over many issues (overlayed by a notation/typo fix with/without bracket).
The proposed rule should be safe. But please run via test matrix.
Release note: