fix(argocd): multisource patch doc, Ingress grafana-onelab

- Root cause: live Application kept spec.source; Argo ignored observability chart
- Add jsonpatch-multisource.json + argocd/README.md migration steps
- Grafana: disable subchart ingress; add templates/ingress-grafana-onelab.yaml

Made-with: Cursor
This commit is contained in:
timotheereausanofi
2026-03-20 11:13:55 +01:00
parent b91c35c410
commit 3802418582
7 changed files with 105 additions and 15 deletions

27
gitops/argocd/README.md Normal file
View File

@@ -0,0 +1,27 @@
# Argo CD Application
Apply the Application:
```bash
kubectl apply -f gitops/argocd/application.yaml
```
## Migrating from `spec.source` to `spec.sources`
If the `onelab` Application was created **before** the observability stack, the live object may still have **`spec.source`** only. A plain `kubectl apply` of the new manifest often **does not remove** `spec.source`, so Argo never reconciles the second chart (Loki/Promtail/Grafana).
**Check:**
```bash
kubectl get application onelab -n argocd -o jsonpath='{.spec.source}{"\n"}{.spec.sources}{"\n"}'
```
If `source` is set and `sources` is empty, patch once:
```bash
kubectl patch application onelab -n argocd --type json --patch-file gitops/argocd/jsonpatch-multisource.json
```
Then sync the app in Argo (or wait for auto-sync).
Adjust `repoURL` in `jsonpatch-multisource.json` if your remote differs.

View File

@@ -1,5 +1,8 @@
# Syncs OneLab app + observability (Loki/Promtail/Grafana) into namespace onelab.
# Requires Argo CD 2.6+ (spec.sources). Ensure repoURL matches your remote.
#
# If you already had this Application with spec.source only, kubectl apply may not drop
# source — see README.md in this folder and jsonpatch-multisource.json.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:

View File

@@ -0,0 +1,23 @@
[
{"op": "remove", "path": "/spec/source"},
{"op": "add", "path": "/spec/sources", "value": [
{
"repoURL": "https://git.luneski.fr/luneski/onelab-k8s.git",
"targetRevision": "main",
"path": "gitops/charts/onelab",
"helm": {
"releaseName": "onelab",
"valueFiles": ["../../values/k3s-example.yaml"]
}
},
{
"repoURL": "https://git.luneski.fr/luneski/onelab-k8s.git",
"targetRevision": "main",
"path": "gitops/observability",
"helm": {
"releaseName": "onelab-obs",
"valueFiles": ["values.yaml"]
}
}
]}
]