Files
cozystack/packages/system
Myasnikov Daniil 9118cb3cc5 fix(grafana-operator): add startupProbe to survive slow startup under load
Install Cozystack failed because grafana-operator pod looped in
CrashLoopBackOff under concurrent helm-install load (Flux v2.8
helm-controller dispatching every system HR in parallel + kstatus
walking all applied resources). The chain that fell over:

  grafana-operator pod  liveness probe :8081/healthz fails 3x in 30s
    -> monitoring-rd     dependency 'cozy-grafana-operator/grafana-operator'
    -> tenant-rd         dependency 'cozy-system/monitoring-rd'
    -> cozystack-basics  dependency 'cozy-system/tenant-rd'
                         (cozystack-basics creates the cozy-public ns)
    -> kubevirt-cdi      RoleBinding cdi-clone-dv: namespace
                         "cozy-public" not found
    -> vm-disk-rd, dashboard, flux-plunger   all wait, install times out

Pod log shows the manager starts at T+0, controllers spin up workers,
folder/dashboard/datasource sync completes by T+10s — then SIGTERM at
T+27s. Liveness probe is the upstream chart default (delay=0s,
timeout=1s, period=10s, failureThreshold=3) which gives ~30s grace,
not enough on a fresh cluster where controller-runtime's HTTP probe
server is still binding while kubelet starts polling immediately.

Same shape as the kubevirt-cdi-operator commit already in this branch
(37b06e21). Mirror the fix:

- Edit deployment.yaml on the vendored chart to add a startupProbe
  (30 x 5s = 150s grace, /healthz on :8081). Once it passes once,
  liveness/readiness keep the existing strict config.
- Stash the change as patches/startupProbe.diff and re-apply it from
  the Makefile update target after the curl|tar upstream fetch, so
  the next chart bump does not silently regress.

The patch uses package-relative paths (a/charts/...) so `patch -p1`
from the package dir resolves correctly — repo-relative paths would
need patch's fuzzy fallback which is unreliable across distros.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit 40949c80b1)
2026-05-25 11:54:45 +05:00
..
2026-03-25 15:57:25 +05:00
2026-05-13 21:48:39 +00:00
2026-05-13 12:29:01 +00:00
2026-05-13 21:48:39 +00:00
2026-05-13 21:48:39 +00:00
2026-05-13 12:29:01 +00:00
2026-05-13 12:29:01 +00:00
2026-02-10 20:19:03 +01:00
2026-01-15 23:32:41 +00:00
2026-01-20 03:24:32 +01:00
2026-03-25 15:57:25 +05:00
2026-05-13 21:48:39 +00:00
2026-02-17 22:54:12 +01:00
2026-01-20 03:24:32 +01:00
2026-05-13 21:48:39 +00:00
2026-03-25 15:57:25 +05:00
2026-04-14 19:59:19 +05:00