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

Repo Server Image should use spec.version if spec.repo.version is not set #623

Closed
benruland opened this issue Apr 21, 2022 · 1 comment · Fixed by #1262
Closed

Repo Server Image should use spec.version if spec.repo.version is not set #623

benruland opened this issue Apr 21, 2022 · 1 comment · Fixed by #1262

Comments

@benruland
Copy link

benruland commented Apr 21, 2022

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

// getRepoServerContainerImage will return the container image for the Repo server.
//
// There are three possible options for configuring the image, and this is the
// order of preference.
//
// 1. from the Spec, the spec.repo field has an image and version to use for
// generating an image reference.
// 2. from the Environment, this looks for the `ARGOCD_REPOSERVER_IMAGE` field and uses
// that if the spec is not configured.
// 3. the default is configured in common.ArgoCDDefaultRepoServerVersion and
// common.ArgoCDDefaultRepoServerImage.

tag := cr.Spec.Repo.Version
if tag == "" {
tag = common.ArgoCDDefaultArgoVersion
defaultTag = true
}

To Reproduce
Steps to reproduce the behavior:

  1. Install ArgoCD with operator version 0.3.0
  2. Create an ArgoCD instance and set spec.version to 2.2.5
  3. 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

@benruland benruland changed the title Repo Server Image should use spec.version if this is set Repo Server Image should use spec.version if spec.repo.version is not set Apr 21, 2022
@tomjo
Copy link
Contributor

tomjo commented Feb 20, 2024

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.

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