38 lines
966 B
YAML
38 lines
966 B
YAML
{{- $argoappsetApps := "apps" -}}
|
|
{{ include "homelab.argo.project" (dict "name" $argoappsetApps "description" "common applications")}}
|
|
|
|
|
|
{{ range $appName, $appProps := .Values.apps }}
|
|
|
|
{{- $namespace := (printf "apps-%s" $appName) -}}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: "{{ $namespace }}"
|
|
|
|
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: app-{{ $appName }}
|
|
spec:
|
|
project: {{ $argoappsetApps }}
|
|
source:
|
|
repoURL: "git@github.com:{{ $.Values.gitops.repo }}.git"
|
|
targetRevision: "{{ $.Values.gitops.commit }}"
|
|
path: 'k8s/apps/{{ $appName }}'
|
|
helm:
|
|
valueFiles:
|
|
- values.yaml
|
|
- values-{{$.Values.global.deployment}}.yaml
|
|
values: |-
|
|
{{- tpl $appProps $ | nindent 8 }}
|
|
global:
|
|
{{- $.Values.global | toYaml | nindent 10 }}
|
|
releaseName: {{ $appName }}
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: {{ $namespace }}
|
|
{{ end }} |