|
| 1 | +--- |
| 2 | +apiVersion: argoproj.io/v1alpha1 |
| 3 | +kind: AppProject |
| 4 | +metadata: |
| 5 | + name: dso-project # Pour les Applications déployées par la Console DSO |
| 6 | + namespace: {{ .Release.Namespace }} |
| 7 | + annotations: |
| 8 | + argocd.argoproj.io/sync-wave: "1" # Evite la suppression avant les Applications |
| 9 | +spec: |
| 10 | + description: Project to deploy DSO Applications |
| 11 | + destinations: |
| 12 | + - name: "*" |
| 13 | + namespace: "*" |
| 14 | + server: "*" |
| 15 | + sourceRepos: |
| 16 | + - "https://github.com/cloud-pi-native/helm-charts.git" |
| 17 | + - "{{ .Values.dsoZoneRepo }}" |
| 18 | +--- |
| 19 | +apiVersion: argoproj.io/v1alpha1 |
| 20 | +kind: ApplicationSet |
| 21 | +metadata: |
| 22 | + name: dso-appset |
| 23 | + namespace: {{ .Release.Namespace }} |
| 24 | + annotations: |
| 25 | + argocd.argoproj.io/sync-wave: "2" # Evite la suppression avant l'instance ArgoCD |
| 26 | +spec: |
| 27 | + goTemplate: true |
| 28 | + generators: |
| 29 | + - git: |
| 30 | + repoURL: {{ .Values.dsoZoneRepo }} |
| 31 | + revision: HEAD |
| 32 | + files: |
| 33 | + - path: "**/values.yaml" # project/cluster/environment/values.yaml |
| 34 | + ignoreApplicationDifferences: |
| 35 | + - jsonPointers: |
| 36 | + - /spec/syncPolicy |
| 37 | + - /spec/sources/0/targetRevision |
| 38 | + template: |
| 39 | + metadata: |
| 40 | + name: {{"\"{{ index .path.segments 0 }}-{{ index .path.segments 1 }}-{{ index .path.segments 2 }}-root\"" }} |
| 41 | + namespace: {{ .Release.Namespace }} |
| 42 | + labels: |
| 43 | + app.kubernetes.io/managed-by: dso-console |
| 44 | + dso/projet: {{"\"{{ index .path.segments 0 }}\""}} |
| 45 | + dso/environment: {{"\"{{ index .path.segments 2 }}\""}} |
| 46 | + spec: |
| 47 | + project: dso-project |
| 48 | + sources: |
| 49 | + - repoURL: https://github.com/cloud-pi-native/helm-charts.git |
| 50 | + targetRevision: {{"\"{{ .argocd.envChartVersion }}\""}} |
| 51 | + path: charts/dso-env |
| 52 | + helm: |
| 53 | + valueFiles: |
| 54 | + - {{"\"$values/{{ .path.path }}/{{ .path.filename }}\""}} |
| 55 | + values: | |
| 56 | + argocd: |
| 57 | + namespace: {{ .Release.Namespace }} |
| 58 | + - repoURL: "{{ .Values.dsoZoneRepo }}" |
| 59 | + targetRevision: HEAD |
| 60 | + ref: values |
| 61 | + destination: |
| 62 | + server: https://kubernetes.default.svc |
| 63 | + namespace: {{ .Release.Namespace }} |
| 64 | + syncPolicy: |
| 65 | + automated: |
| 66 | + prune: true |
| 67 | + selfHeal: true |
0 commit comments