-
Notifications
You must be signed in to change notification settings - Fork 2k
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
filter out last applied config deploy annotations #857
Conversation
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.
This would just filter out the annotation_kubectl_kubernetes_io_last_applied_configuration
label from the kube_deployment_annotations
metric, but this label will be present in all the resources that can be created/updated with the kubectl/oc apply
command. The apply
command is the one that sets this annotation, see https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#how-to-create-objects
For example I am seeing it in the namespace as well:
kube_namespace_annotations{namespace="kube-system",annotation_kubectl_kubernetes_io_last_applied_configuration="{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"kube-system\"}}\n"} 1
So we sadly need to filter this out from all the kube_*_annotations
metrics.
85a0573
to
ac8bbf8
Compare
Thanks for the review @lilic . |
ac8bbf8
to
30fd7d4
Compare
30fd7d4
to
e8cefa1
Compare
I think we wanted this to go in the 1.7 branch? Should we do that first or cherry-pick it out? |
I changed the base branch. This needs a rebase now. |
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.
lgtm after rebase
So we (@brancz and I) found a few more annotations that kubernetes applies in the metrics, so we decided to just revert the annotations feature altogether. We cannot know all of the kubernetes annotations and what might potently be in there so reverting the feature might be best right now. Will do a PR for the revert. We should rethink the annotation metrics feature later on, will open an issue for this. |
e8cefa1
to
ad24d23
Compare
ad24d23
to
9f7e59d
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tariq1890 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 |
@tariq1890: PR needs rebase. 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/test-infra repository. |
Might I suggest using a prefix you define for the annotations to add? Like I'd recommend drawing some inspiration from Datadog's autodiscovery annotations: https://docs.datadoghq.com/agent/autodiscovery/integrations/?tab=kubernetespodannotations#configuration |
This is the near-term fix for the issue reported in #854.