Skip to content

Detect GitOps mode from ArgoCD Application YAML file#2

Open
nadaverell wants to merge 1 commit into
mainfrom
fix/argocd-detection-from-yaml-file
Open

Detect GitOps mode from ArgoCD Application YAML file#2
nadaverell wants to merge 1 commit into
mainfrom
fix/argocd-detection-from-yaml-file

Conversation

@nadaverell
Copy link
Copy Markdown
Contributor

Summary

  • Primary detection now checks for deploy/argocd/{env}.yaml file existence instead of grepping kustomize build output for managed-by label
  • Falls back to label check for backwards compatibility
  • Aligns with koala-backend where ExtractArgoCDConfig (ArgoCD YAML file existence) is the single source of truth

Context

The managed-by: argocd label in manifests could be missing (e.g. manually created services) even when ArgoCD was enabled, causing the action to silently fall back to kubectl apply mode. The ArgoCD Application YAML file is the authoritative signal.

Related

@nadaverell nadaverell requested review from arlenskh and hisco March 19, 2026 21:03
Check for deploy/argocd/{env}.yaml existence as the primary signal for
gitops mode, instead of grepping kustomize build output for the
managed-by label. Falls back to label check for backwards compatibility.

Includes diagnostic logging of the resolved path, explicit notice when
falling back to label detection, and proper error handling for kustomize
build failures in the fallback path.
@nadaverell nadaverell force-pushed the fix/argocd-detection-from-yaml-file branch from abc9b1d to e71e7f4 Compare March 19, 2026 21:05
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.

2 participants