Skip to content

Prevent SCM-Manager Argo CD Tracking Collisions in Multi-Tenant Setups#505

Open
avetgit wants to merge 15 commits into
developfrom
fix/get-config-map
Open

Prevent SCM-Manager Argo CD Tracking Collisions in Multi-Tenant Setups#505
avetgit wants to merge 15 commits into
developfrom
fix/get-config-map

Conversation

@avetgit

@avetgit avetgit commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Pull request overview

Adjusts SCM-Manager/Argo CD naming and bootstrap behavior to avoid Argo CD tracking collisions in prefixed/multi-tenant setups, and fixes Kubernetes ConfigMap retrieval to use the client’s active namespace.

Changes:

  • Update K8sClient.getConfigMap() to read ConfigMaps from client.namespace (fallback to default).
  • Prefix SCM-Manager Helm/ArgoCD release/service naming using config.application.namePrefix, and update related URL resolution + tests.
  • Change Argo CD Application generation to (a) prefix metadata.name to avoid tracking collisions and (b) special-case SCM-Manager as a bootstrap app (embed Helm values; no self-referencing values git source); also set Argo CD resource tracking method to annotation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts SCM-Manager/Argo CD naming and bootstrap behavior to avoid Argo CD tracking collisions in prefixed/multi-tenant setups, and fixes Kubernetes ConfigMap retrieval to use the client’s active namespace.

Changes:

  • Update K8sClient.getConfigMap() to read ConfigMaps from client.namespace (fallback to default).
  • Prefix SCM-Manager Helm/ArgoCD release/service naming using config.application.namePrefix, and update related URL resolution + tests.
  • Change Argo CD Application generation to (a) prefix metadata.name to avoid tracking collisions and (b) special-case SCM-Manager as a bootstrap app (embed Helm values; no self-referencing values git source); also set Argo CD resource tracking method to annotation.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/groovy/com/cloudogu/gitops/infrastructure/kubernetes/api/K8sClient.groovy Read ConfigMaps from the client’s effective namespace instead of always default.
src/test/groovy/com/cloudogu/gitops/infrastructure/kubernetes/api/K8sClientTest.groovy Align tests with namespace-aware ConfigMap retrieval (test namespace from mock client).
src/main/groovy/com/cloudogu/gitops/tools/core/scmmanager/ScmManagerSetup.groovy Compute SCM-Manager Helm/ArgoCD release name from namePrefix and pass into deployment + templating.
src/main/groovy/com/cloudogu/gitops/tools/core/scmmanager/ScmManager.groovy Pass config into ScmManagerSetup constructor.
src/test/groovy/com/cloudogu/gitops/tools/core/ScmManagerSetupTest.groovy Update expectations for prefixed SCM-Manager release name.
src/main/groovy/com/cloudogu/gitops/infrastructure/git/providers/scmmanager/ScmManagerUrlResolver.groovy Resolve SCM-Manager service DNS/NodePort using prefixed service/release name.
src/test/groovy/com/cloudogu/gitops/infrastructure/git/providers/scmmanager/ScmManagerUrlResolverTest.groovy Update URL resolver tests for prefixed SCM-Manager service name.
src/main/groovy/com/cloudogu/gitops/infrastructure/deployment/ArgoCdApplicationStrategy.groovy Prefix ArgoCD Application metadata.name, add SCM-Manager bootstrap behavior (single source + embedded values).
src/test/groovy/com/cloudogu/gitops/infrastructure/deployment/ArgoCdApplicationStrategyTest.groovy Update expected Application name and add bootstrap test for SCM-Manager sources behavior.
src/main/groovy/com/cloudogu/gitops/application/orchestration/GitHandler.groovy Rename/clarify internal SCM bootstrap skip logic and add more logging around repository setup decisions.
argocd/cluster-resources/apps/argocd/operator/argocd.ftl.yaml Configure Argo CD operator application.resourceTrackingMethod: annotation.
argocd/cluster-resources/apps/argocd/argocd/values.ftl.yaml Configure Helm-based Argo CD cm.application.resourceTrackingMethod: annotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@avetgit avetgit changed the title get config-map from right namespace Prevent SCM-Manager Argo CD Tracking Collisions in Multi-Tenant Setups Jun 22, 2026
@mdroll mdroll self-requested a review June 22, 2026 13:04

@mdroll mdroll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants