Files
factory/argocd/templates/apps.yaml
T
arcodangeandClaude Fable 5 3698ab3c73 fix(argocd): retire usernameSecret/passwordSecret de spec.source — champs inexistants du CRD Application
Ces champs (commit 7aa789d1) n'existent pas dans le schéma Application
d'ArgoCD : l'API server les élague à l'apply, d'où un diff permanent →
factory OutOfSync en boucle (296 tentatives selfHeal) sur kadans,
telegram-gateway et dance-lessons-coach. L'authentification aux repos
privés passe par un secret repo-creds (label
argocd.argoproj.io/secret-type: repo-creds, url préfixe
https://gitea.arcodange.lab/arcodange) — corrigé côté cluster sur le
secret gitea-credentials existant.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 20:37:29 +02:00

78 lines
2.0 KiB
YAML

{{- range $app_name, $app_attr := .Values.gitea_applications -}}
{{- $org := default "arcodange-org" $app_attr.org -}}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ $app_name }}
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
{{- with $app_attr.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
project: default
source:
repoURL: https://gitea.arcodange.lab/{{ $org }}/{{ $app_name }}
targetRevision: HEAD
path: chart
destination:
server: https://kubernetes.default.svc
namespace: {{ $app_name }}
syncPolicy:
{{- if $app_attr.syncPolicy }}
{{- toYaml $app_attr.syncPolicy | nindent 4 }}
{{- else }}
automated:
prune: true
selfHeal: true
{{- end }}
syncOptions:
- CreateNamespace=true
{{- /*
Non-prod environments (ADR-0002 elision rule): one extra Application per env
under `<app_attr>.envs`. Each renders the SAME repo + chart, overlaid with
values-<env>.yaml, into the `<app>-<env>` namespace. Apps with no `envs` key
render nothing extra here, so prod-only apps are byte-identical.
*/ -}}
{{- range $env_name, $env_attr := $app_attr.envs }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ $app_name }}-{{ $env_name }}
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
{{- with $env_attr.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
project: default
source:
repoURL: https://gitea.arcodange.lab/{{ $org }}/{{ $app_name }}
targetRevision: HEAD
path: chart
helm:
valueFiles:
- values.yaml
- values-{{ $env_name }}.yaml
destination:
server: https://kubernetes.default.svc
namespace: {{ $app_name }}-{{ $env_name }}
syncPolicy:
{{- if $env_attr.syncPolicy }}
{{- toYaml $env_attr.syncPolicy | nindent 4 }}
{{- else }}
automated:
prune: true
selfHeal: true
{{- end }}
syncOptions:
- CreateNamespace=true
{{- end }}
{{ end }}