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

How to specify ArgoCD version to use? #557

Closed
AlexEndris opened this issue Feb 8, 2024 · 7 comments
Closed

How to specify ArgoCD version to use? #557

AlexEndris opened this issue Feb 8, 2024 · 7 comments

Comments

@AlexEndris
Copy link

Hi,
currently, the version 0.4.17 of argocd-autopilot links to the install script in the master branch of the argocd repository. How can I specify which version of argocd (not autopilot) to use?

It would be very helpful if we could control updates and upgrades of argocd this way, instead of always linking to the master branch.

Maybe it's already possible, and I'm just missing something, but if not, that would be truly handy!

Thanks!

@diogosilva30
Copy link

diogosilva30 commented Feb 8, 2024

I have the same question 🤔

My ArgoCD was bumped to 2.10, which introduced a bug argoproj/argo-cd#17016 , and I'd like to rollback to an older version

@noam-codefresh
Copy link
Collaborator

noam-codefresh commented Feb 12, 2024

you can install using

argocd-autopilot repo bootstrap --app https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.6/manifests/install.yaml

(or use any other url for a speific argo-cd version, or even your own fork)

to override the default argo-cd app specifier that installs the current stable version (defaults to https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml)

please re-open if this isn't what you asked for.

@AlexEndris
Copy link
Author

@noam-codefresh
Is this also how you'd upgrade form a specific version to another one? If so, then this is what I've asked for.

@noam-codefresh
Copy link
Collaborator

after bootstrapping a new repository (with the default settings), the bootstrap/argo-cd/kustomization.yaml file will have a resource reference to github.com/argoproj-labs/argocd-autopilot/manifests/base?ref=v0.4.17 (right now, when the autopilot stable version is v0.4.17)
that references this file.

if you replace this resource reference with https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.6/manifests/install.yaml (for example), it will replace your argo-cd installation to v2.9.6.

you will need to copy over the following patches into your repo's kustomzation file:

configMapGenerator:
  - name: argocd-cm
    behavior: merge
    literals:
      - "timeout.reconciliation=15s"

patches:
  # reset the crbs to `subject.namespace: default`, so that argo-cd will later change them to the actual ns
  - target:
      group: rbac.authorization.k8s.io
      version: v1
      kind: ClusterRoleBinding
    patch: |-
      - op: replace
        path: /subjects/0/namespace
        value: default

the first patch will change the default reconciliation timeout to 15s. the second patch is important if you install to a non-default (argocd) namespace. if you do not have this patch, the clusterRoles will not give the permissions to the right serviceAccount.

@AlexEndris
Copy link
Author

Thanks, @noam-codefresh. That's what I understood and would have done. I just thought this would be more of a workaround, rather than intended.

@noam-codefresh
Copy link
Collaborator

thank you @AlexEndris for helping me realize we have an issue -

while writing my reply i realized that actually installing with --app <some-other-argocd-version> --namespace <some-other-namespace> will result in a broken installation, because of those missing patches (the 2nd one is the important one, actually). we should have an issue about it, and make sure the patch is in there, in case the kustomization is not going through the standard base reference.

do you want to open an issue about it?

@AlexEndris
Copy link
Author

@noam-codefresh Done :) Glad to be of help with asking seemingly stupid questions 👍🏻

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