Skip to content

ci(k8s): Lint the Helm chart sources with kube-linter #6106

Description

@dan-petty

Update 2026-11-26 (infra move): The chart sources are in dan-petty/homelab now.

The kube-linter row here lints only k8s/devops. This item keeps the product part: devops k8s lint also renders the chart sources of an environment tree. The findings, the exceptions and the CI job are the homelab follow-up. The count of 113 is from the old tree.

Follow-up: dan-petty/homelab#309.


Problem

The kube-linter row of devops ci (#6068) lints only the path sources of the Argo CD Applications. It does not lint the 19 Helm chart sources. With the checks of .kube-linter.yaml, the chart renders give 113 findings on 2026-11-17, linted in one run with the builds of the path sources (helm template with the value files of the repository, as devops k8s image-pins renders them):

  • no-rolling-update-strategy: 24
  • unset-memory-requirements: 18
  • no-readiness-probe: 15
  • no-liveness-probe: 15
  • unset-cpu-requirements: 14
  • no-read-only-root-fs: 6
  • run-as-non-root: 3, non-isolated-pod: 3, sensitive-host-mounts: 3
  • 12 more, one or two for each of 9 checks

kube-linter takes an exception for one object only from the annotation ignore-check.kube-linter.io/<check> on that object. Its config has only checks.include and checks.exclude, which apply to all objects. The values of the charts argocd-image-updater, cloudnative-pg, dcgm-exporter, mattermost-operator and open-webui have no key that annotates their workloads. So a finding in those charts cannot get a narrow exception.

Expected behavior

  • For each finding of a chart, fix the values when the chart allows it, or record the exception with its reason.
  • Choose how a chart object gets a narrow exception, for example a lint-only Kustomize patch that adds the annotation, or a tool with exceptions in its config.
  • devops k8s lint also renders the chart sources, as devops k8s image-pins does, and a CI job with network access runs it. A new finding fails that job.

Related

Alternatives check of 2026-11-27: not-applicable.
Class: ci, no model call.
Tool: none found.

Proposed design

Problem statement

Make devops k8s lint render each Helm chart source of an environment tree and lint the render with kube-linter. The current row lints only the path sources of Argo CD Applications. The chart findings, the exceptions and the CI job belong to dan-petty/homelab#309. This item adds no exception mechanism and no CI job.

Acceptance criteria

Requirement: Render chart sources

devops k8s lint SHALL render each Helm chart source in an environment tree with the value files of the repository.

Scenario: Chart render call

  • WHEN a test runs devops k8s lint on a temporary environment tree with a Helm chart source and a value file.
  • THEN the test sees a helm template call for that chart that includes the value file.

Requirement: Lint chart render

devops k8s lint SHALL pass the Kubernetes objects of each chart render to kube-linter with the repository config.

Scenario: Chart finding

  • WHEN a test runs devops k8s lint on a chart render that has a finding under .kube-linter.yaml.
  • THEN the test sees a non-zero exit and a message that names the finding.

Requirement: Empty chart render

devops k8s lint MUST fail when a Helm chart source renders no Kubernetes object.

Scenario: Empty chart

  • WHEN a test runs devops k8s lint on a chart source that renders no object.
  • THEN the test sees a non-zero exit and a message that the chart render has no object.

Requirement: Product base scope

devops k8s lint MUST keep the product base lint to the kustomize build of k8s/devops.

Scenario: Product base lint

  • WHEN a test runs devops k8s lint on k8s/devops.
  • THEN the test sees no helm template call.

Existing Tool Considered

The alternatives check in the issue body returned not-applicable (class ci, no model call) and named no tool. The change uses the open, maintained tools Helm and kube-linter. Helm renders the chart sources with the repository value files. kube-linter lacks Helm rendering, so Helm supplies it. kube-linter lints the rendered objects with the repository config. The change builds no new lint engine.

Key questions

  • Which renderer produces the manifests for the chart lint?: Use helm template with the value files of the repository, as devops k8s image-pins does. (best practice) [sources: AGENTS.md]
    • Chosen: helm template with repository value files. It reuses the render behavior of devops k8s image-pins and the existing Helm tool.
    • Rejected: kube-linter built-in chart support. kube-linter lints Kubernetes YAML and does not render Helm charts.
  • Which lint targets render Helm charts?: Only an environment tree renders Helm charts. The product base k8s/devops keeps its kustomize-only lint. (best practice) [sources: CONTEXT.md]
    • Chosen: Environment tree only. CONTEXT.md says the product base k8s/devops is not part of an environment tree.
    • Rejected: Every lint target. The product base has no Helm chart sources and keeps its current behavior.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/infra
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/medium
    on Nov 17, 2026
  2. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 17, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 27, 2026
  5. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  6. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 29, 2026
  7. removed
    status/in-review
    on Nov 29, 2026
  8. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-29 18:59 UTC

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

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions