Files
homelab/charts/apps/argoapps/templates/compose-apps.yaml
T
2025-08-04 12:34:48 -04:00

27 lines
892 B
YAML

{{ range $fileName, $_ := .Files.Glob "compose-apps/*.yaml" }}
{{- $data := $.Files.Get $fileName | fromYaml -}}
{{- $name := ($data.name | default ($fileName | base | trimSuffix ".yaml")) }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: "{{ $name }}"
namespace: {{ $.Values.ns.argocd }}
spec:
project: main
source:
path: 'charts/compose-app'
repoURL: {{ $.Values.composeApp.gitops.repo }}
targetRevision: {{ $.Values.composeApp.gitops.revision }}
helm:
values: |-
global:
{{ $.Values.global | toYaml | nindent 20 }}
{{ $data | toYaml | nindent 16 }}
destination:
namespace: comap-{{ $data.namespace | default $name }}
server: https://kubernetes.default.svc
syncPolicy:
syncOptions:
- CreateNamespace=true
{{ end }}