Skip to content

fix(addons): grafana-agent env() syntax + bitnamilegacy/kubectl image refs#16

Merged
stxkxs merged 1 commit into
mainfrom
fix/orphan-images-and-river-syntax
May 26, 2026
Merged

fix(addons): grafana-agent env() syntax + bitnamilegacy/kubectl image refs#16
stxkxs merged 1 commit into
mainfrom
fix/orphan-images-and-river-syntax

Conversation

@stxkxs
Copy link
Copy Markdown
Member

@stxkxs stxkxs commented May 26, 2026

Summary

Two unrelated bringup bugs that block fresh clusters from going green.

grafana-agent (addons/observability/grafana-agent/values.yaml)

River stdlib exposes env(name), not sys.env(name). Three call sites (AMP_REMOTE_WRITE_URL, AWS_REGION, CLUSTER_NAME) fixed. Without this, the DaemonSet pods CrashLoopBackOff at config-load with component "sys.env" does not exist or is out of scope and ship no telemetry.

kyverno + velero (addons/security/kyverno/values.yaml, addons/operations/velero/values.yaml)

Bitnami migrated its public Docker Hub images to bitnamilegacy/ in 2025; the bitnami/kubectl repo no longer publishes new tags and :latest 404s on pull. Helm-hook pods landed in ImagePullBackOff. Pinned both to bitnamilegacy/kubectl:1.33.4-debian-12-r0 — a specific verified tag on the legacy registry (a :latest on bitnamilegacy/kubectl isn't reliably maintained either, so we pin).

Comments updated so the next person hitting an unpullable bitnami/* image knows where to look.

Test plan

  • Live: kubectl -n monitoring get ds/grafana-agent — pods Ready 2/2 after Argo re-syncs
  • Live: kubectl -n kyverno get pod kyverno-clean-reports-* — no longer ImagePullBackOff
  • Reviewer: confirm 1.33.4-debian-12-r0 is acceptable, or bump to a different pinned tag from bitnamilegacy/kubectl's tag list if you prefer a fresher one

Two unrelated bugs surfaced when bringing up a fresh cluster against
this repo:

─── grafana-agent: sys.env() is not a valid River function ──────────

Three call sites in addons/observability/grafana-agent/values.yaml
used `sys.env(...)` to read env-var-projected IRSA + AMP config
(AMP_REMOTE_WRITE_URL, AWS_REGION, CLUSTER_NAME). Grafana Agent's
River stdlib exposes `env(name)`, not `sys.env(name)` — the agent
fails at config-load with `component "sys.env" does not exist or
is out of scope`, and the DaemonSet pods CrashLoopBackOff before
they can ship a single metric.

─── kyverno + velero: bitnami/kubectl hooks are unpullable ──────────

Bitnami moved its public Docker Hub images to the `bitnamilegacy/`
namespace in 2025; the `bitnami/kubectl` repo no longer publishes
new tags, and `bitnami/kubectl:latest` 404s on pull. Both kyverno
(cleanupJobs.admissionReports + clusterAdmissionReports) and
velero (kubectl helm hook) were still pointing at the old repo,
so their hook pods land in ImagePullBackOff and the cleanup never
runs.

Switched both to `bitnamilegacy/kubectl:1.33.4-debian-12-r0` — a
specific tag verified to exist on the legacy registry. Pinning by
version (vs `:latest`) is also safer for helm hooks, which run on
upgrade and shouldn't pick up surprise image changes.

Comments updated to explain WHY this repo exists (Bitnami's public
namespace migration) so the next person who hits an unpullable
`bitnami/*` image elsewhere knows where to look.
@github-actions
Copy link
Copy Markdown

CI Results

Check Status
YAML Lint
Environment Kustomize Build
dev
staging
production

All validations passed.

@stxkxs stxkxs merged commit 610cb99 into main May 26, 2026
5 checks passed
@stxkxs stxkxs deleted the fix/orphan-images-and-river-syntax branch May 26, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant