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

0.17.0 Config excludeFromPropagationAnnotations not excluding annotations for various created resources #859

Closed
tanenbaum opened this issue Jan 11, 2022 · 3 comments
Assignees

Comments

@tanenbaum
Copy link

If I set up a CHOP with config.yaml containing:

excludeFromPropagationAnnotations: ["foo"]

and a CHI with metadata like:

metadata:
  annotations:
    foo: bar

I would expect all created resources to be without the "foo" annotation.

I actually find that the StatefulSets, ConfigMaps, PVCs and host specific Services have the annotation.

Tracing through the code, I think

func (a *Annotator) getHostScope(host *chiv1.ChiHost) map[string]string {
is where the problem lies.

func (a *Annotator) getHostScope(host *chiv1.ChiHost) map[string]string {
	return a.appendCHIProvidedTo(host.GetAnnotations())
}

Any function using getHostScope ends up with all the CHI annotations as a.appendCHIProvidedTo(host.GetAnnotations()) is passing in the CHI annotations that take precedence over any of the exclusions. Other similar functions here use a.appendCHIProvidedTo(nil) instead.

Perhaps (a *Annotator) appendCHIProvidedTo(dst map[string]string) should not take an argument here, as there are no defaults used as there are with labels and therefore should always be nil.

@tanenbaum tanenbaum changed the title Config excludeFromPropagationAnnotations not excluding annotations for various created resources 0.17.0 Config excludeFromPropagationAnnotations not excluding annotations for various created resources Jan 11, 2022
@sunsingerus
Copy link
Collaborator

This issue was addressed in 0.18.2 version, please check

@tanenbaum
Copy link
Author

tanenbaum commented Feb 7, 2022 via email

@alex-zaitsev
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants