Skip to content

ci(k8s): CI fails when a manifest names an image with the latest tag, and passes for an image that Argo CD Image Updater pins #2093

Description

@dan-petty

What happened

Nothing stops a :latest image tag from coming back under k8s/. No CI workflow and no devops ci step runs kube-linter or Checkov over the manifests. #711 rejected a Checkov CKV_K8S_14 step: the service image ghcr.io/dan-petty/devops-cli/service has no tag in Git by design (k8s/README.md, "Service Image Updates": Argo CD Image Updater sets its tag and digest), so CKV_K8S_14 fails on it.

What should happen

CI fails when a manifest under k8s/ names an image with the :latest tag, and it passes for an untagged image that Argo CD Image Updater pins.

Evidence

  • kube-linter 0.8.3 is pinned in tools.lock. Its default latest-tag block list is .*:(latest)$, ^[^:]*$ and (.*/[^:]+)$, so it also blocks the untagged service image: kube-linter lint k8s/devops/cronjob.yaml reports latest-tag.
  • A custom kube-linter check from the latest-tag template with the block list .*:(latest)$ alone gives the wanted result.
  • grep -rnE 'image:.*:latest' k8s/ finds no match today.

Scope

  • A kube-linter config with the custom check, and one CI step that runs the pinned kube-linter with it.
  • CI must not run it through devops k8s lint until that command stops passing on findings and on a missing binary (the issue filed with this one).

Proposed design

Problem statement

Nothing in CI stops a :latest image tag from appearing in Kubernetes manifests under k8s/. The default kube-linter latest-tag check blocks untagged images as well, which breaks the service image that Argo CD Image Updater pins. A custom kube-linter check and one CI step are needed to catch :latest tags while passing untagged images.

Acceptance criteria

  • Criterion 1: A kube-linter config file defines a custom latest-tag check with the block list .*:(latest)$ only.
    Verification: Read the config file and confirm the latest-tag check uses the block list .*:(latest)$ and no other patterns.
  • Criterion 2: A CI step runs the pinned kube-linter 0.8.3 with the custom config over the k8s/ directory.
    Verification: Read the CI workflow file and confirm the step invokes kube-linter 0.8.3 with the custom config targeting k8s/.
  • Criterion 3: CI fails when a manifest under k8s/ names an image with the :latest tag.
    Verification: Add a test manifest with image: example/app:latest under k8s/, run the CI step, and confirm it exits non-zero with a latest-tag finding.
  • Criterion 4: CI passes for the untagged service image ghcr.io/dan-petty/devops-cli/service.
    Verification: Run the CI step against the existing k8s/ manifests and confirm it exits zero with no latest-tag finding on the service image.
  • Criterion 5: The CI step does not invoke devops k8s lint.
    Verification: Read the CI workflow file and confirm no step calls devops k8s lint.

Key questions

  • What block list does the custom latest-tag check use?: The block list is .*:(latest)$ only. This matches images tagged :latest and does not match untagged images such as the service image. [sources: k8s/devops/cronjob.yaml]
  • Why does the default kube-linter latest-tag check not work here?: The default block list includes ^[^:]*$ and (.*/[^:]+)$, which match untagged images. The service image is untagged by design, so the default check fails on it. [sources: k8s/devops/cronjob.yaml, openspec/changes/archive/2026-10-24-711-bounded-shared-valkey/proposal.md]
  • Why was Checkov CKV_K8S_14 rejected for this purpose?: Checkov CKV_K8S_14 fails on the untagged service image, which is untagged by design. Argo CD Image Updater sets the tag and digest at runtime. [sources: openspec/changes/archive/2026-10-24-711-bounded-shared-valkey/proposal.md, k8s/devops/cronjob.yaml]
  • Should the CI step use devops k8s lint?: No. The CI step must invoke kube-linter directly. The devops k8s lint command passes on findings and on a missing binary, and a separate issue addresses that. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/infra
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/infra. The candidate modifies CI behavior for Kubernetes manifests and uses kube-linter tooling which are infrastructure concerns.
    • Priority: P2-Medium. This change improves CI reliability but does not block releases or introduce security issues.
    • Value: Medium. Preventing :latest tags in manifests improves deployment stability and avoids potential runtime issues.
    • Effort: Low. The change only requires adding a kube-linter check to CI which is a small modification.
    • Related: test(k8s): every image pin under k8s/ resolves in its registry before the merge #1994, which asks for a different change. Both items work on k8s/ image handling but the candidate focuses on preventing :latest tags and item #1994 verifies image existence before merge.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at bb46660 (see proposed design in issue body).

  4. added
    priority/p2-medium
    status/ready
    value/medium
    effort/low
    on Oct 28, 2026
  5. added a commit that references this issue on Oct 29, 2026
  6. removed
    status/ready
    on Oct 30, 2026
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/lowpriority/p2-mediumsource/agenttype/infravalue/medium

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions