You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
If I set up a CHOP with config.yaml containing:
and a CHI with metadata like:
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
clickhouse-operator/pkg/model/annotator.go
Line 112 in dc6cdc6
Any function using
getHostScope
ends up with all the CHI annotations asa.appendCHIProvidedTo(host.GetAnnotations())
is passing in the CHI annotations that take precedence over any of the exclusions. Other similar functions here usea.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 benil
.The text was updated successfully, but these errors were encountered: