-
Notifications
You must be signed in to change notification settings - Fork 9
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
Don't get Cluster API resource metrics in workload cluster #2372
Don't get Cluster API resource metrics in workload cluster #2372
Conversation
@@ -91,6 +93,7 @@ templates: | |||
kube-state-metrics-extra-resources: | |||
inherit: [ template: prometheus ] | |||
installed: {{ .Values | get "clusterApi.enabled" "false" }} | |||
condition: ck8sManagementCluster.enabled |
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.
Curious if both conditions are needed?
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.
Yes I would say so, the condition
is so that this should only be released for the management cluster, while the installed
part is dependent on whether or not it is a Cluster API environment which depends on configuration. I see we do this for some other releases as well, e.g. see this.
0d1d0eb
to
f925d30
Compare
f925d30
to
17466d0
Compare
17466d0
to
ee1d821
Compare
Warning
This is a public repository, ensure not to disclose:
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Important
Breaking changes should be marked
kind/admin-change
orkind/dev-change
depending on typeCritical security fixes should be marked with
kind/security
What does this PR do / why do we need this PR?
Noticed a bunch of error logs in my Cluster API workload cluster from kube-state-metrics pod:
E1217 14:47:13.509297 1 reflector.go:158] "Unhandled Error" err="pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:243: Failed to watch cluster.x-k8s.io/v1beta1, Kind=Machine: failed to list cluster.x-k8s.io/v1beta1, Kind=Machine: the server could not find the requested resource" logger="UnhandledError"
I do not believe we ever have Cluster API resources in the workload clusters so this PR removes the configuration for getting metrics for Cluster API resources in the workload cluster.
Information to reviewers
Checklist
NetworkPolicy Dashboard