argocd-operator
argocd-operator copied to clipboard
Repo Server Image should use spec.version if spec.repo.version is not set
Describe the bug When using a different ArgoCD version than the default version set by the operator, we set spec.version in the CR. Documentation states for spec.version: "The tag to use with the container image for all Argo CD components." (https://argocd-operator.readthedocs.io/en/latest/reference/argocd/#version)
The repo server, however, does not respect this value but only looks at spec.repo.version or falls back to defaults https://github.com/argoproj-labs/argocd-operator/blob/68e1197b38ab9ce2461d8825765564eece2e1e4d/controllers/argocd/util.go#L149-L159
https://github.com/argoproj-labs/argocd-operator/blob/68e1197b38ab9ce2461d8825765564eece2e1e4d/controllers/argocd/util.go#L168-L172
To Reproduce Steps to reproduce the behavior:
- Install ArgoCD with operator version 0.3.0
- Create an ArgoCD instance and set spec.version to 2.2.5
- Observe repo server deployment - it has the image SHA digest of ArgoCD image 2.3.3
Expected behavior Repo Server falls back to spec.version if spec.repo.version ist not set
This is still an issue in the latest version, we encountered this due to a helm bug that was fixed in the newer bundled helm version with argo however the repo server pod which actually generates the manifests was still running into the bug.
Workaround is possible by specifically setting spec.repo.version as mentioned but it would be nice for the repo version (if not set) would fallback to the set version instead of the default version. Will see if I can provide a PR for this later.