Skip to content

disable default instance on xKS clusters#1172

Draft
anandrkskd wants to merge 1 commit into
redhat-developer:masterfrom
anandrkskd:disable-default-instance-on-xks
Draft

disable default instance on xKS clusters#1172
anandrkskd wants to merge 1 commit into
redhat-developer:masterfrom
anandrkskd:disable-default-instance-on-xks

Conversation

@anandrkskd

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
The default Argo CD instance created in openshift-gitops namespace is a specific requirement for OpenShift, and is not required for xKS cluster. This PR removes the support for the default instance if the controller-manger doesnt find config.openshift.io API installed on the platform.
Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes https://redhat.atlassian.net/browse/GITOPS-9943

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
@openshift-ci openshift-ci Bot added the kind/enhancement New feature or request label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 63fb0320-e4c6-4a8d-9966-dbac9960e57a

📥 Commits

Reviewing files that changed from the base of the PR and between 949f348 and 9aafd89.

📒 Files selected for processing (1)
  • cmd/main.go

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Corrected default installation behavior to properly handle non-OpenShift clusters. Default installation settings are now correctly disabled when not running on OpenShift infrastructure.
  • Refactor

    • Improved configuration loading efficiency by computing and caching environment variable settings once during startup instead of re-reading them during controller initialization.

Walkthrough

The pull request refactors how the DisableDefaultInstall option is determined for the GitOps operator. Instead of evaluating the environment variable at controller wiring time, the logic is consolidated into a single disableDefault variable computed at startup that accounts for both the environment variable and the cluster type (OpenShift vs. non-OpenShift).

Changes

DisableDefault Initialization and Controller Wiring

Layer / File(s) Summary
DisableDefault initialization with OpenShift detection
cmd/main.go
A disableDefault boolean is initialized from the environment variable and conditionally forced to true for non-OpenShift clusters.
ReconcileGitopsService controller wiring
cmd/main.go
The ReconcileGitopsService controller uses the precomputed disableDefault value instead of inline environment variable evaluation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: disabling the default Argo CD instance on xKS (non-OpenShift) clusters, which is the primary objective of this PR.
Description check ✅ Passed The description clearly explains the purpose of the PR, including what changed and why it was needed, making it directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from chetan-rns and keithchong June 9, 2026 11:35
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign trdoyle81 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

@anandrkskd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v4.19-ci-index-gitops-operator-bundle 9aafd89 link true /test v4.19-ci-index-gitops-operator-bundle

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@anandrkskd anandrkskd marked this pull request as draft June 9, 2026 13:21
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.

1 participant