-
Notifications
You must be signed in to change notification settings - Fork 383
MON-4115: expose label metrics for jobs and cronjobs #2553
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
base: main
Are you sure you want to change the base?
Conversation
|
@rexagod: This pull request references MON-4115 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@rexagod: This pull request references MON-4115 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@rexagod: This pull request references MON-4115 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
c25eb30 to
7ad69ad
Compare
|
/retest-required |
|
I'm having some issues running |
|
/retest |
|
/label qe-approved |
|
@rexagod: This pull request references MON-4115 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
left a comment on the ticket. |
|
[from the f2f] @machine424 suggested we have the default allowlist, in addition to a set of "allowed" resources that the users could choose to enable from. The allowlist itself will thus be customizable from CMO's config. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rexagod The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Support extending the labels-allowlist based on this discussion. |
|
Ping @machine424 as this builds on his idea in this thread. |
4ca5d19 to
658535e
Compare
|
(bump) |
| return hashByteMap(byteMap) | ||
| } | ||
|
|
||
| func validateLabelsAllowListFormat(value string) error { |
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.
Taken from: https://github.com/kubernetes/kube-state-metrics/blob/5b7a11eed724511405a0148026ee96ac426f3787/pkg/options/types.go#L237, to ensure the additional list can be validated.
Adds `AdditionalLabelsAllowList` to KSM config. Signed-off-by: Pranshu Srivastava <[email protected]>
|
@rexagod: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| // Defines label-metrics' allow list for resources in addition to the default one. | ||
| // Currently, this is only supported for `jobs` and `cronjobs`, due to cardinality concerns. | ||
| // This follows the format: resource1=[label1,label2,labelN...],...,resourceN=[...], | ||
| // which is then validated and appended to the default labels' allow list. | ||
| AdditionalLabelsAllowList *string `json:"additionalLabelsAllowList,omitempty"` |
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.
@marioferh Following on @machine424's comment, could you affirm if this would be okay to port to the CRD as is, or if you believe there are any changes to be made here? Thanks!
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.
That's still a WIP with the api folks, so far I'd prefer to wait until we get an ack from them in Prometheus and PrometheusK8s resources before adding any additional fields. While it seems pretty much straightforward I'd hold this for now.
Adds jobs and cronjobs to the exposed set of label metrics:
--metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]The linked issue is a feature request by a customer that requested these metrics to build their dashboards. I'm not sure what the qualifying factors were for the inclusion of the existing set of exposed label metrics
--metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*], but I'm assuming we do so when there's an explicit and reasonable request to expose them.Nonetheless, I've opened this PR to set a ground for discussion if we want to incorporate this, or not.