Skip to content

kubevirt: helm lint fails on the chart because _cluster is missing from its values #4030

Closed

Description

What happens

helm lint packages/system/kubevirt fails on main:

[ERROR] templates/: template: cozy-kubevirt/templates/vm-exportproxy-tlsroute.yaml:1:13: executing "cozy-kubevirt/templates/vm-exportproxy-tlsroute.yaml" at <index .Values._cluster "root-host">: error calling index: index of untyped nil

templates/vm-exportproxy-tlsroute.yaml and templates/vm-exportproxy-ingress.yaml both start with index .Values._cluster "root-host", and the chart's own values.yaml has no _cluster key. The platform always injects _cluster at install time, so the deployed chart is fine; a standalone helm lint or helm template without --set _cluster.root-host=… is not. Nothing in CI runs lint on this chart, so nothing is red; it only bites whoever renders the chart by hand or adds a lint step later.

Fix shape

Either declare _cluster: {} in values.yaml and read the keys through dig/default so the two templates render nothing when the platform context is absent, or guard both templates with {{- with .Values._cluster }}. Same shape as the nil-safe walk the platform bundle already uses for its own optional blocks.

Seen while running the chart's unit tests for #4015; present at that PR's merge base and unrelated to it.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)
    on Sep 2, 2026
  2. added a commit that references this issue on Sep 7, 2026
    d0fce92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions