Skip to content

Conversation

@rexagod
Copy link
Member

@rexagod rexagod commented Jan 8, 2025

Adds jobs and cronjobs to the exposed set of label metrics:

  • --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 8, 2025

@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:

Adds jobs and cronjobs to the exposed set of label metrics:

  • --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

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.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 8, 2025
@openshift-ci openshift-ci bot requested review from danielmellado and jan--f January 8, 2025 11:37
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2025
@rexagod
Copy link
Member Author

rexagod commented Jan 8, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 8, 2025

@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:

/jira refresh

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.

@rexagod
Copy link
Member Author

rexagod commented Jan 8, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 8, 2025

@rexagod: This pull request references MON-4115 which is a valid jira issue.

In response to this:

/jira refresh

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.

@rexagod rexagod force-pushed the MON-4115 branch 3 times, most recently from c25eb30 to 7ad69ad Compare January 8, 2025 22:07
@juzhao
Copy link
Contributor

juzhao commented Jan 9, 2025

/retest-required

@rexagod
Copy link
Member Author

rexagod commented Jan 9, 2025

I'm having some issues running make generate on macOS, it's a gift that keeps giving.

@juzhao
Copy link
Contributor

juzhao commented Jan 26, 2025

/retest

@juzhao
Copy link
Contributor

juzhao commented Jan 29, 2025

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jan 29, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 29, 2025

@rexagod: This pull request references MON-4115 which is a valid jira issue.

In response to this:

Adds jobs and cronjobs to the exposed set of label metrics:

  • --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*],jobs=[*],cronjobs=[*]
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

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.

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.

@machine424
Copy link
Contributor

left a comment on the ticket.

@rexagod
Copy link
Member Author

rexagod commented Apr 10, 2025

[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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 8, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rexagod
Copy link
Member Author

rexagod commented Jul 8, 2025

Support extending the labels-allowlist based on this discussion.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2025
@rexagod
Copy link
Member Author

rexagod commented Sep 30, 2025

Ping @machine424 as this builds on his idea in this thread.

@rexagod rexagod force-pushed the MON-4115 branch 3 times, most recently from 4ca5d19 to 658535e Compare October 1, 2025 03:32
@rexagod
Copy link
Member Author

rexagod commented Oct 7, 2025

(bump)

return hashByteMap(byteMap)
}

func validateLabelsAllowListFormat(value string) error {
Copy link
Member Author

@rexagod rexagod Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds `AdditionalLabelsAllowList` to KSM config.

Signed-off-by: Pranshu Srivastava <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2025

@rexagod: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/versions bdc9931 link false /test versions
ci/prow/jsonnet-fmt bdc9931 link true /test jsonnet-fmt
ci/prow/e2e-hypershift-conformance bdc9931 link true /test e2e-hypershift-conformance

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.

Comment on lines +178 to +182
// 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"`
Copy link
Member Author

@rexagod rexagod Nov 10, 2025

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!

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants