Skip to content
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

Feature: Provider level annotation ignore-list #746

Closed
hughobrien opened this issue Jan 23, 2020 · 5 comments · Fixed by #1687
Closed

Feature: Provider level annotation ignore-list #746

hughobrien opened this issue Jan 23, 2020 · 5 comments · Fixed by #1687

Comments

@hughobrien
Copy link

As per this PR #741 there are a number of possible automatically applied annotations that might trigger an unwanted diff.

Rather than call out 'kubernetes.io' for special mention in the code (e.g. here https://github.com/terraform-providers/terraform-provider-kubernetes/blob/master/kubernetes/structures.go#L161) would it be possible to pass a list of hostnames at the provider level?

Thank you

@benweint
Copy link

This is something I'd love to see as well. There are a number of tools (Calico, as referenced in #741 and also Spinnaker, which is relevant to my use case) that automatically apply annotations onto various K8s objects, and it's not generally practical or desirable to manage those annotations via TF (though managing the rest of the resource might be).

@dak1n1 dak1n1 added the size/L label Jul 15, 2020
ctrox added a commit to ctrox/terraform-provider-kubernetes that referenced this issue Nov 16, 2020
This introduces a new provider configuration parameter
`ignored_metadata_keys` that allows the user to specify expressions to
ignore matching metadata annotations and labels on all kubernetes
resources.

This tries to be backwards compatible by hardcoding a list of internal
keys in `internalKeys`, which were previously ignored already.

Fixes hashicorp#746
ctrox added a commit to ctrox/terraform-provider-kubernetes that referenced this issue Nov 16, 2020
This introduces a new provider configuration parameter
`ignored_metadata_keys` that allows the user to specify expressions to
ignore matching metadata annotations and labels on all kubernetes
resources.

This tries to be backwards compatible by hardcoding a list of internal
keys in `internalKeys`, which were previously ignored already.

Fixes hashicorp#746
@dak1n1
Copy link
Contributor

dak1n1 commented Mar 17, 2021

We have a few issues tracking specific annotations:

    cloud.google.com/neg
    ingress.kubernetes.io/backends
    ingress.kubernetes.io/forwarding-rule
    ingress.kubernetes.io/target-proxy
    ingress.kubernetes.io/url-map

I think these issues will be solved when we add a provider-level annotation ignore/allow list.

#874
#668
#709

We'll track progress here.

@nightlyone
Copy link

Another possible implementation is to allow complete ignorance of annotations or labels per resource.

For example it often is only necessary that a e.g. namespace has been created, so you can attach kubernetes resources to it and depend_on its existence. But what that namespace looks like is often irrelevant how that namespace looks like and details will be managed by other tooling (e.g. kubernetes controllers).

@arybolovlev
Copy link
Contributor

Hi,

I am going to close this issue since ignore_annotations and ignore_labels attributes were added to the provider level. Please keep an eye on release notes.

Thank you.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.