From e0406a65d5783db9055c6d50f6c7840fe59ac318 Mon Sep 17 00:00:00 2001 From: yreinhar Date: Mon, 22 Jun 2026 13:47:18 +0200 Subject: [PATCH] feat(argocd-apps): add rawDirectory flag to opt out of helm rendering When rawDirectory=true in the project git config, the ArgoCD Application uses a plain directory source instead of Helm. Needed for sources that contain raw Kubernetes YAML (e.g. ApplicationSets) rather than a chart. --- charts/argocd-apps/templates/application.yaml | 5 +++++ charts/argocd-apps/values.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/charts/argocd-apps/templates/application.yaml b/charts/argocd-apps/templates/application.yaml index b106946a..4e217b47 100644 --- a/charts/argocd-apps/templates/application.yaml +++ b/charts/argocd-apps/templates/application.yaml @@ -23,6 +23,10 @@ spec: path: {{ $project.git.path | default $projectName }} repoURL: {{ $project.git.repoUrl }} targetRevision: {{ $project.git.branch | default "main" }} + {{- if $project.git.rawDirectory }} + directory: + recurse: false + {{- else }} helm: values: | {{- $project.tofuValues | toYaml | nindent 10}} @@ -31,5 +35,6 @@ spec: {{- if ((($project.tofuValues).projectValues).stage) }} - values-{{ $project.tofuValues.projectValues.stage }}.yaml {{- end }} + {{- end }} --- {{- end }} diff --git a/charts/argocd-apps/values.yaml b/charts/argocd-apps/values.yaml index 86fae0fa..420580a5 100644 --- a/charts/argocd-apps/values.yaml +++ b/charts/argocd-apps/values.yaml @@ -36,6 +36,7 @@ projects: {} # secretStoreName: "" # Name of the secret store object created in K8s # accessType: "" # Options: https or ssh # secretPath: "" # Path to the secret in the targeted Hashicorp Vault +# rawDirectory: false # Optional, defaults to false. Set to true for plain Kubernetes YAML sources (e.g. ApplicationSets) to opt out of Helm rendering. # # helm registries credentials # helmRegistries: