tigera / operator

Kubernetes operator for installing Calico and Calico Enterprise
Apache License 2.0
182 stars 138 forks source link

Fix image component handling, honoring Installation spec #3491

Open petrutlucian94 opened 5 days ago

petrutlucian94 commented 5 days ago

components.GetReference currently ignores the image prefix and path specified in the "Installation" spec.

It makes a copy of the image component, appends the configured image path and prefix but then it uses the original component image when looping over the image set.

The fix is trivial, we just have to use the modified image string.

Description

For PR author

For PR reviewers

A note for code reviewers - all pull requests must have the following:

CLAassistant commented 5 days ago

CLA assistant check
All committers have signed the CLA.

petrutlucian94 commented 5 days ago

Looks like there is another blocker that prevents us from using custom built images. We could pass in the install spec (or just the image path/prefix) and apply them just like GetReference does.

https://github.com/tigera/operator/blob/ec635bf82a312806adf9ad210acf5623579e96fa/pkg/controller/utils/imageset/imageset.go#L141

"ImageSet calico-v3.28.0: unexpected images: petrutlucian94/calico-node, petrutlucian94/calico-cni, petrutlucian94/calico-typha, petrutlucian94/calico-kube-controllers, petrutlucian94/calico-tigera-operator, petrutlucian94/calico-csi, petrutlucian94/calico-apiserver, petrutlucian94/calico-ctl, petrutlucian94/calico-pod2daemon-flexvol, petrutlucian94/calico-key-cert-provisioner",