Skip to content

flux-local renders a degenerate metadata: doc for the (deprecated) grafana HelmRelease #662

Description

@ExtraToast

Summary

During Platform Validate (render-flux.shflux-local build all --enable-helmkubeconform), the grafana HelmRelease expansion emits a degenerate document containing only metadata: (no apiVersion, no kind), right after apps/v1/Deployment/grafana. kubeconform -strict rejected it as error while parsing: missing 'kind' key, failing the whole render (665 valid / 1 error of 666).

This blocked an unrelated PR (#661) and affects any PR touching platform/**.

Mitigation (already merged, #661)

render-flux.sh now drops documents with neither a top-level apiVersion nor kind before kubeconform, logging each drop. Docs with apiVersion but no kind are kept, so genuine missing-kind bugs still fail. This unblocks CI without masking real schema errors.

Root cause (still open)

  • The artifact is not produced by a direct helm template grafana/grafana (that render is clean) — it appears only via flux-local's HelmRelease expansion, and only in CI's tool versions (locally, flux-local rendered 713 clean docs; CI rendered 666 with the artifact). Likely a flux-local/flux CLI version behavior difference.
  • The grafana chart is deprecated (helm template warns this chart is deprecated), and the HelmRelease pins no chart version (chart: grafana, floating to latest) — platform/cluster/flux/apps/observability/grafana/release.yaml.

Suggested follow-up

  1. Pin the grafana chart version in the HelmRelease (stop floating to a deprecated latest).
  2. Consider migrating off the deprecated grafana chart (the stack already runs grafana-operator for dashboards).
  3. Optionally pin flux-local / flux CLI versions in CI for reproducible renders.

Repro

kustomize build platform/cluster/flux/clusters/production > render.yaml
flux-local build all --enable-helm platform/cluster/flux >> render.yaml
# document #495 (after Deployment/grafana) is a lone `metadata:` with no kind

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions