Skip to content

Refactor releaseName handling in YAML configuration#285

Merged
bkonicek merged 5 commits into
mainfrom
releasename-cwd
May 21, 2026
Merged

Refactor releaseName handling in YAML configuration#285
bkonicek merged 5 commits into
mainfrom
releasename-cwd

Conversation

@bkonicek

Copy link
Copy Markdown
Owner

Update helm.releaseName logic to allow for simpler overriding

  • if .releaseName = ".", use the parent directory's name
  • if set to another value use that value
  • if not set use the default <cluster-name>-<app-name>

bkonicek added 3 commits May 21, 2026 13:36
Update helm.releaseName logic to allow for simpler overriding
- if `.releaseName` = ".", use the parent directory's name
- if set to another value use that value
- if not set use the default `<cluster-name>-<app-name>`
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

Argo CD Diff Preview

Summary:

Modified (1):
± applications (+1|-1)
applications (application.yaml)

ApplicationSet: argocd/ops-tools

           path: '{{ .chartPath | default (printf "charts/%s" .path.basenameNormalized) }}'
           {{- if and (hasKey . "repoURL") (not (hasKey . "chartPath")) (ne .repoURL "https://github.com/bkonicek/gitops") }}
           chart: '{{ .chartName | default .path.basenameNormalized }}'
           {{- end }}
           helm:
-            releaseName: '{{ .releaseName | default (printf "%s-%s" (index .path.segments 1) .path.basenameNormalized) }}'
+            releaseName: '{{ if hasKey . "releaseName" }}{{ if eq .releaseName "." }}{{ .path.basenameNormalized }}{{ else }}{{ .releaseName }}{{ end }}{{ else }}{{ printf "%s-%s" (index .path.segments 1) .path.basenameNormalized }}{{ end }}'
             valueFiles:
               - $values/base/{{ printf "%s.yaml" .path.basenameNormalized }}
               - $values/{{ .path.path }}/values.yaml
             ignoreMissingValueFiles: true
         - repoURL: https://github.com/bkonicek/gitops.git

Stats:
[Applications: 24], [Full Run: 1m9s], [Rendering: 18s], [Cluster: 19s], [Argo CD: 31s]

@bkonicek bkonicek merged commit 67eea82 into main May 21, 2026
1 check passed
@bkonicek bkonicek deleted the releasename-cwd branch May 21, 2026 17:54
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