init
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{{- range $index, $stack := .Values.applicationSet }}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: {{ $stack.name }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ $stack.name }}
|
||||
app.kubernetes.io/instance: {{ $stack.name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.AppVersion }}
|
||||
app.kubernetes.io/component: {{ $stack.name }}
|
||||
app.kubernetes.io/part-of: {{ $.Release.Name }}
|
||||
spec:
|
||||
syncPolicy:
|
||||
applicationsSync: create-only
|
||||
preserveResourcesOnDeletion: true
|
||||
generators:
|
||||
- git:
|
||||
repoURL: {{ $.Values.git.repo }}
|
||||
revision: {{ $.Values.git.revision }}
|
||||
directories:
|
||||
- path: "{{ $.Values.git.path }}/{{ $stack.name }}/*"
|
||||
template:
|
||||
metadata:
|
||||
name: '{{ `{{path.basename}}` }}'
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: '{{ $stack.namespace | default `{{path.basename}}` }}'
|
||||
project: default
|
||||
revisionHistoryLimit: 3
|
||||
source:
|
||||
repoURL: {{ $.Values.git.repo }}
|
||||
targetRevision: {{ $.Values.git.revision }}
|
||||
path: '{{ `{{path}}` }}'
|
||||
ignoreDifferences:
|
||||
{{- toYaml $stack.ignoreDifferences | nindent 8 }}
|
||||
syncPolicy:
|
||||
{{- if $stack.syncPolicy.automated.enabled }}
|
||||
automated:
|
||||
prune: {{ $stack.syncPolicy.automated.prune | default false }}
|
||||
selfHeal: {{ $stack.syncPolicy.automated.selfHeal | default false }}
|
||||
{{- end }}
|
||||
retry:
|
||||
limit: 3
|
||||
backoff:
|
||||
duration: 1m
|
||||
factor: 2
|
||||
maxDuration: 15m
|
||||
syncOptions:
|
||||
{{- toYaml $stack.syncPolicy.syncOptions | nindent 10 }}
|
||||
{{- end }}
|
82
clusters/cl01tl/deployment/stack/templates/application.yaml
Normal file
82
clusters/cl01tl/deployment/stack/templates/application.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: cilium
|
||||
namespace: {{ .Release.Namespace }}
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: {{ .Values.application.cilium.source.repo }}
|
||||
targetRevision: {{ .Values.application.cilium.source.revision }}
|
||||
path: "{{ .Values.git.path }}/{{ .Values.application.cilium.source.path }}"
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: {{ .Values.application.cilium.namespace }}
|
||||
revisionHistoryLimit: 3
|
||||
syncPolicy:
|
||||
{{- toYaml .Values.application.cilium.syncPolicy | nindent 4 }}
|
||||
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: metrics-server
|
||||
namespace: {{ .Release.Namespace }}
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: {{ .Values.application.metricsServer.source.repo }}
|
||||
targetRevision: {{ .Values.application.metricsServer.source.revision }}
|
||||
path: "{{ .Values.git.path }}/{{ .Values.application.metricsServer.source.path }}"
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: {{ .Values.application.metricsServer.namespace }}
|
||||
revisionHistoryLimit: 3
|
||||
syncPolicy:
|
||||
{{- toYaml .Values.application.metricsServer.syncPolicy | nindent 4 }}
|
||||
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: kubelet-serving-cert-approver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: {{ .Values.application.kubeletServingCertApprover.source.repo }}
|
||||
targetRevision: {{ .Values.application.kubeletServingCertApprover.source.revision }}
|
||||
path: "{{ .Values.git.path }}/{{ .Values.application.kubeletServingCertApprover.source.path }}"
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: {{ .Values.application.kubeletServingCertApprover.namespace }}
|
||||
revisionHistoryLimit: 3
|
||||
syncPolicy:
|
||||
{{- toYaml .Values.application.kubeletServingCertApprover.syncPolicy | nindent 4 }}
|
||||
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: prometheus-operator-crds
|
||||
namespace: {{ .Release.Namespace }}
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: {{ .Values.application.prometheusOperatorCrds.source.repo }}
|
||||
targetRevision: {{ .Values.application.prometheusOperatorCrds.source.revision }}
|
||||
path: "{{ .Values.git.path }}/{{ .Values.application.prometheusOperatorCrds.source.path }}"
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: {{ .Values.application.prometheusOperatorCrds.namespace }}
|
||||
revisionHistoryLimit: 3
|
||||
syncPolicy:
|
||||
{{- toYaml .Values.application.prometheusOperatorCrds.syncPolicy | nindent 4 }}
|
Reference in New Issue
Block a user