Add flag to disable high-cardinality metrics#7751
Conversation
Signed-off-by: Ali Aqel <aliaqel@stripe.com>
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
|
||
| require.Truef(t, updated, "container %s not found in deployment %s/%s", containerName, namespace, name) | ||
|
|
||
| _, err = kc.AppsV1().Deployments(namespace).Update(context.TODO(), deployment, metav1.UpdateOptions{}) |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Consider to use well-defined context
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by context-todo.
You can view more details about this finding in the Semgrep AppSec Platform.
| func SetDeploymentContainerArg(t *testing.T, kc *kubernetes.Clientset, name, namespace, containerName, flagName, flagValue string) { | ||
| t.Helper() | ||
|
|
||
| deployment, err := kc.AppsV1().Deployments(namespace).Get(context.TODO(), name, metav1.GetOptions{}) |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Consider to use well-defined context
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by context-todo.
You can view more details about this finding in the Semgrep AppSec Platform.
Signed-off-by: Ali Aqel <aliaqel@stripe.com>
Provide a description of what has been changed
This adds
--enable-high-cardinality-metricsto the KEDA operator and metrics adapter, defaulting totrue.When the flag is disabled, KEDA suppresses the current high-cardinality histogram metrics while keeping the related counters enabled. This change also adds unit and e2e coverage for the disabled path and updates the changelog.
The e2e coverage was also hardened so the new flag assertions are reliable:
Checklist
Fixes #7731
Relates to kedacore/keda-docs#1772, kedacore/charts#855