Skip to content

Disable the creation of default ArgoCD instance by the Gitops Operator#525

Merged
openshift-merge-bot[bot] merged 1 commit intovalidatedpatterns:mainfrom
sector2000:disable-default-argocd-instance
Mar 23, 2026
Merged

Disable the creation of default ArgoCD instance by the Gitops Operator#525
openshift-merge-bot[bot] merged 1 commit intovalidatedpatterns:mainfrom
sector2000:disable-default-argocd-instance

Conversation

@sector2000
Copy link
Contributor

The Gitops Operator, right after being installed, creates a default ArgoCD instance with name openshift-gitops in the openshift-gitops namespace.
This instance might not be configured properly (for example missing git server certificates), so the Applications might be in error state.
The Patterns Operator will then modify the openshift-gitops ArgoCD object with the correct settings and the instance will be redeployed.
Instead, we can just tell the Gitops Operator not to create the default openshift-gitops instance, setting the environment variable DISABLE_DEFAULT_ARGOCD_INSTANCE=true in the Gitops Operator Subscription.
The instance will be then created directly by the Patterns Operator, with the correct settings.

@openshift-ci openshift-ci bot requested review from beekhof and day0hero March 22, 2026 12:34
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 22, 2026

Hi @sector2000. Thanks for your PR.

I'm waiting for a validatedpatterns member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

We want to avoid that the ArgoCD instance is initially deployed with default settings and then redeployed with our customizations.
The DISABLE_DEFAULT_ARGOCD_INSTANCE flag in the Gitops Subscription prevents the default instance from being created by the Gitops Operator.
The reason for this choice is that the first default deployment might not be configured properly (for example missing Git server certificates)
and the Applications will be in failed state until ArgoCD is redeployed by the Patterns Operator
@sector2000 sector2000 force-pushed the disable-default-argocd-instance branch from 068059f to 1064d72 Compare March 22, 2026 12:35
@mbaldessari
Copy link
Contributor

/ok-to-test

@mbaldessari
Copy link
Contributor

I'll merge this, but I need to also add a watch on the argocd object we create otherwise on upgrades, the clusterwide argo on the hub will just disappear until the pattern-operator pod gets restarted

@mbaldessari
Copy link
Contributor

/lgtm

@mbaldessari
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mbaldessari, sector2000

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sector2000
Copy link
Contributor Author

@mbaldessari why do you think the main ArgoCD instance would disappear during upgrade of the patterns operator? Is the operator anytime deleting it?

@openshift-merge-bot openshift-merge-bot bot merged commit 3f71e70 into validatedpatterns:main Mar 23, 2026
14 checks passed
@mbaldessari
Copy link
Contributor

Yeah, the gitops operator will remove it (I tested the upgrade path and noticed that) #526 should fix that

@sector2000
Copy link
Contributor Author

Interesting. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants