Closed adel121 closed 1 day ago
Use this command from test-infra-definitions to manually test this PR changes on a VM:
inv create-vm --pipeline-id=38263141 --os-family=ubuntu
Note: This applies to commit bfe0aefb
Run ID: e517c00c-f6f1-4afd-9c58-aedd17962133 Metrics dashboard Target profiles
Baseline: f350ef14a5ecfaf059e313b7d87460aa24460a81 Comparison: bfe0aefbf1d1406d960e58140502d2d705d74d82
Performance changes are noted in the perf column of each table:
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
Is this change backward compatible? meaning if I had DD_CLUSTER_AGENT_KUBE_METADATA_COLLECTION_RESOURCES = [deployments statefulsets nodes]
would that still works as expected with the code?
Is this change backward compatible? meaning if I had
DD_CLUSTER_AGENT_KUBE_METADATA_COLLECTION_RESOURCES = [deployments statefulsets nodes]
would that still works as expected with the code?
No it is not backward compatible, but this config option is not publicly documented, and is not used in the helm chart nor in the operator, so nothing should break.
/merge
:steam_locomotive: MergeQueue: pull request added to the queue
The median merge time in main
is 25m.
Use /merge -c
to cancel this operation!
What does this PR do?
This PR includes the resource api group in the configuration parameter for generic metadata collection.
In other words, instead of having
DD_CLUSTER_AGENT_KUBE_METADATA_COLLECTION_RESOURCES = [deployments statefulsets nodes]
, we will now haveDD_CLUSTER_AGENT_KUBE_METADATA_COLLECTION_RESOURCES = [apps/deployments apps/statefulsets /nodes]
Motivation
Avoid collisions in cases were we have the same resource name under different api groups. An example of this is GKE:
On GKE, we have the
nodes
resource under two different API Groups:metrics.k8s.io
""
(empty api group, corresponding to the default empty group in kubernetes)In this case, if the user asks to collect metadata of
nodes
, it will not be possible to know if we need to collect metadata ofnodes.metrics.k8s.io
nodes
This results in a conflict.
Additional Notes
{group}/{version}/{resource}
. For exampleapps/v1/deployments
. When using this format, the discovery client will not be used to fill the version, and the indicated version will be used as it is.Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
❗ For better validation, do this QA on GKE because the issue was initially discovered on GKE due to having same resource name under different api groups (see #motivation section for more information) ❗
Deploy the cluster agent with the following helm file:
Ensure that metadata is collected successfully for deployments, daemonsets, and nodes.