App-of-apps template from https://github.com/mmalyska/home-ops/tree/main/cluster/projects/apps
This commit is contained in:
parent
aedf31d10b
commit
d07f159c53
2 changed files with 54 additions and 0 deletions
5
charts/app-of-apps/Chart.yaml
Normal file
5
charts/app-of-apps/Chart.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
apiVersion: v2
|
||||
name: app-of-apps
|
||||
type: application
|
||||
version: 1.0.2
|
||||
49
charts/app-of-apps/templates/app-template.yaml
Normal file
49
charts/app-of-apps/templates/app-template.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
{{ range $k, $v := $.Values.apps }}
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: {{ $v.name }}
|
||||
namespace: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: {{ $.Values.project }}
|
||||
source:
|
||||
repoURL: {{ $.Values.source.repoURL }}
|
||||
targetRevision: main
|
||||
path: {{ print $.Values.source.path "/" $v.path }}
|
||||
{{- with $v.helm }}
|
||||
helm:
|
||||
{{- with .valueFiles }}
|
||||
valueFiles:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with $v.plugin }}
|
||||
plugin:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
destination:
|
||||
server: {{ $.Values.destination.server }}
|
||||
namespace: {{ $v.namespace }}
|
||||
syncPolicy:
|
||||
{{- if hasKey $v "selfHeal" | ternary $v.selfHeal false }}
|
||||
automated:
|
||||
selfHeal: {{ hasKey $v "selfHeal" | ternary $v.selfHeal false }}
|
||||
{{- end }}
|
||||
{{- with $v.managedNamespaceMetadata }}
|
||||
managedNamespaceMetadata:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
{{- with $v.extraSyncOptions }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with $v.ignoreDifferences }}
|
||||
ignoreDifferences:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
---
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue