-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathmetallb-config.yaml
More file actions
52 lines (51 loc) · 1.75 KB
/
metallb-config.yaml
File metadata and controls
52 lines (51 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# SPDX-FileCopyrightText: 2025 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
{{- $appName := "metallb-config" }}
{{- $namespace := "metallb-system" }}
{{- $syncWave := "150" }}
---
{{- if (index .Values.argo.enabled $appName) }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/sync-wave: "{{ $syncWave }}"
name: {{$appName}}
namespace: {{ required "A valid namespace entry required!" .Values.argo.namespace }}
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: {{ required "A valid projectName entry required!" .Values.argo.project }}
sources:
- repoURL: {{ required "A valid chartRepoURL entry required!" .Values.argo.chartRepoURL }}
chart: common/charts/{{$appName}}
targetRevision: 26.1.0
helm:
releaseName: {{$appName}}
valuesObject:
{{- $customFile := printf "custom/%s.tpl" $appName }}
{{- $customConfig := tpl (.Files.Get $customFile) . | fromYaml }}
{{- $baseFile := printf "configs/%s.yaml" $appName }}
{{- $baseConfig := .Files.Get $baseFile|fromYaml}}
{{- $overwrite := (get .Values.postCustomTemplateOverwrite $appName ) | default dict }}
{{- mergeOverwrite $baseConfig $customConfig $overwrite | toYaml | nindent 10 }}
destination:
namespace: {{$namespace}}
server: {{ required "A valid targetServer entry required!" .Values.argo.targetServer }}
syncPolicy:
{{- if .Values.argo.autosync }}
automated:
prune: true
selfHeal: true
retry:
limit: 5
backoff:
duration: 5s
maxDuration: 3m0s
factor: 2
{{- end }}
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
{{- end }}