Remove go templating
This commit is contained in:
parent
db203f3af1
commit
c4f89c1cf0
@ -7,102 +7,31 @@ spec:
|
||||
goTemplate: true
|
||||
goTemplateOptions: ["missingkey=error"]
|
||||
generators:
|
||||
- merge:
|
||||
# Join base (directories) with overrides (files) by folder name:
|
||||
mergeKeys:
|
||||
- '{{ .path.basename }}' # requires recent Argo CD (see note)
|
||||
generators:
|
||||
# Base: every folder under apps/*
|
||||
- git:
|
||||
repoURL: https://git.mvzijl.nl/marco/veda.git
|
||||
revision: HEAD
|
||||
branch: applicationset-rewrite
|
||||
directories:
|
||||
- path: apps/*
|
||||
# Overrides: optional appset.(yaml|yml|json) in each app
|
||||
- git:
|
||||
repoURL: https://git.mvzijl.nl/marco/veda.git
|
||||
revision: HEAD
|
||||
branch: applicationset-rewrite
|
||||
files:
|
||||
- path: apps/*/appset.yaml
|
||||
- path: apps/*/appset.yml
|
||||
- path: apps/*/appset.json
|
||||
# ---- Application template ----
|
||||
- git:
|
||||
repoURL: https://git.mvzijl.nl/marco/veda.git
|
||||
revision: HEAD
|
||||
branch: applicationset-rewrite
|
||||
directories:
|
||||
- path: apps/*
|
||||
template:
|
||||
metadata:
|
||||
name: '{{ default .path.basename .name }}'
|
||||
labels:
|
||||
app.kubernetes.io/part-of: root
|
||||
# allow grouping for RollingSync (see section B)
|
||||
tier: '{{ default "apps" (index .labels "tier") }}'
|
||||
name: '{{.path.basename}}'
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: '{{ default "default" .project }}'
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.mvzijl.nl/marco/veda.git
|
||||
targetRevision: HEAD
|
||||
branch: applicationset-rewrite
|
||||
targetRevision: '{{ default "main" .targetRevision }}'
|
||||
path: '{{ .path.path }}'
|
||||
# Tool-specific overrides (only render when present)
|
||||
{{- if .helm }}
|
||||
helm:
|
||||
{{- if .helm.releaseName }}releaseName: {{ .helm.releaseName }}{{- end }}
|
||||
{{- if .helm.valueFiles }}
|
||||
valueFiles:
|
||||
{{- range .helm.valueFiles }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey .helm "ignoreMissingValueFiles" }}
|
||||
ignoreMissingValueFiles: {{ .helm.ignoreMissingValueFiles }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .kustomize }}
|
||||
kustomize:
|
||||
{{- if .kustomize.namePrefix }}namePrefix: {{ .kustomize.namePrefix }}{{- end }}
|
||||
{{- if .kustomize.commonLabels }}
|
||||
commonLabels:
|
||||
{{- range $k,$v := .kustomize.commonLabels }}
|
||||
{{ $k }}: {{ $v }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .directory }}
|
||||
directory:
|
||||
{{- if hasKey .directory "recurse" }}recurse: {{ .directory.recurse }}{{- end }}
|
||||
{{- end }}
|
||||
path: '{{.path.path}}'
|
||||
destination:
|
||||
server: '{{ default "https://kubernetes.default.svc" .server }}'
|
||||
namespace: '{{ default .path.basename .namespace }}'
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{.path.basename}}'
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: false
|
||||
selfHeal: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
{{- range .syncOptions }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
# ---- Progressive / RollingSync (section B) ----
|
||||
strategy:
|
||||
type: RollingSync
|
||||
rollingSync:
|
||||
steps:
|
||||
- matchExpressions:
|
||||
- key: tier
|
||||
operator: In
|
||||
values: ["system"] # e.g. CRDs/operators first
|
||||
- matchExpressions:
|
||||
- key: tier
|
||||
operator: In
|
||||
values: ["platform"] # infra (DBs, ingress, etc.)
|
||||
maxUpdate: 50%
|
||||
- matchExpressions:
|
||||
- key: tier
|
||||
operator: In
|
||||
values: ["apps"] # leaf apps
|
||||
maxUpdate: 25%
|
||||
deletionOrder: Reverse
|
||||
- ApplyOutOfSyncOnly=true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user