Skip to content

EAI-6866 Prevent small-cluster ArgoCD double-install#257

Open
pre wants to merge 1 commit into
mainfrom
EAI-6866-small-cluster-argocd-double-install
Open

EAI-6866 Prevent small-cluster ArgoCD double-install#257
pre wants to merge 1 commit into
mainfrom
EAI-6866-small-cluster-argocd-double-install

Conversation

@pre

@pre pre commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Related

Summary

For CLUSTER_SIZE=small with CLUSTERFORGE_RELEASE set (e.g. main), two ArgoCD install flows both ran:

  1. Legacy small-only pathdeploy_k8s_apps/main.yaml (Setup ArgoCD Core (Small Clusters)argocd.yaml, applies argo-cd core-install manifests) + deploy_clusterforge/main.yaml (Deploy ClusterForge via ArgoCD (Small Clusters)argocd_deploy.yaml, helm-templates the cluster-forge apps).
  2. Unified bootstrapdeploy_clusterforge/main.yaml (Setup ClusterForgeclusterforge_setup.yamlbootstrap_argocd.yaml), which installs ArgoCD via the argo-helm chart and already handles small in a size-aware way.

The core-install manifests create ArgoCD workloads with selector {app.kubernetes.io/name: X}, then the helm chart re-applies them with selector {app.kubernetes.io/instance: argocd, app.kubernetes.io/name: X}. kubectl apply --server-side --force-conflicts cannot change the immutable spec.selector field, so the second apply fails:

Error from server (Invalid): Deployment.apps "argocd-applicationset-controller" is invalid:
spec.selector: Invalid value: ...: field is immutable

This aborts the deploy (PLAY RECAP ... failed=1), so a "small" deployment from main never completes.

Fix

Gate the two legacy small-only tasks on CLUSTERFORGE_RELEASE in ["none", ""] so they only run when the unified bootstrap is not deploying ClusterForge:

  • small + release set → only the unified path runs → single ArgoCD install.
  • small + none/"" → only the legacy standalone path runs (unchanged behaviour for the no-ClusterForge case).

This is coherent with the existing Setup ClusterForge gate (CLUSTERFORGE_RELEASE != "none" and != ""), so exactly one ArgoCD install path is active in every case.

Test plan

  • Build bloom from this branch and deploy on a fresh single node with CLUSTER_SIZE: small, CLUSTERFORGE_RELEASE: main — bloom completes without the immutable-selector failure.
  • Confirm a single ArgoCD install: no duplicate argocd-redis ReplicaSets, all argocd-* pods Ready.
  • Confirm cluster-forge app-of-apps Applications are created and sync.
  • (Regression) CLUSTER_SIZE: small + CLUSTERFORGE_RELEASE: none still installs standalone ArgoCD core.

For CLUSTER_SIZE=small with CLUSTERFORGE_RELEASE set, two ArgoCD install
flows both ran: the legacy small-only tasks (core-install manifests +
standalone helm-template apply) and the unified clusterforge_setup
bootstrap (argo-helm chart). The second apply failed on immutable
spec.selector fields, aborting the deploy.

Gate the two legacy small-only tasks on CLUSTERFORGE_RELEASE in
["none", ""] so they only run when the unified bootstrap is not
deploying ClusterForge. Small + release now uses a single ArgoCD
install via the unified path; small + none still uses the standalone
path.
@pre pre marked this pull request as ready for review June 10, 2026 14:32
@pre pre requested a review from a team as a code owner June 10, 2026 14:32
@pre pre enabled auto-merge June 10, 2026 14:32
@pre pre changed the title EAI-6866: Prevent small-cluster ArgoCD double-install EAI-6866 Prevent small-cluster ArgoCD double-install Jun 10, 2026
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

Successfully merging this pull request may close these issues.

1 participant