Skip to content

ci: lint Kubernetes manifests with Flint - #1635

Merged
zeitlinger merged 4 commits into
mainfrom
agent/test-flint-kube-linter
Jul 28, 2026
Merged

ci: lint Kubernetes manifests with Flint#1635
zeitlinger merged 4 commits into
mainfrom
agent/test-flint-kube-linter

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • enable Kubernetes manifest linting through Flint
  • add KubeLinter 0.8.3 as the direct kube-linter mise entry
  • lint the real k8s/lgtm.yaml manifest using Flint's default k8s/ discovery
  • document exclusions for five production-oriented checks that conflict with this manifest's explicit development/demo purpose

This adopts the released kube-linter support from Flint v0.22.10 using the standard aqua:grafana/flint backend for Flint itself.

Testing

  • mise exec -- flint run --full kube-linter
  • mise run lint:fix
  • mise run lint
  • mise run test:unit (38 tests)

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo’s lint toolchain to validate Flint’s in-progress kube-linter integration by pinning Flint to a specific upstream git revision, installing kube-linter via Aqua, and wiring in config/exclusions needed to lint the repository’s Kubernetes demo manifest.

Changes:

  • Switch Flint installation from the Aqua release to a pinned git revision via mise (for pre-release feature validation).
  • Add kube-linter (0.8.3) and introduce a kube-linter config excluding checks that conflict with the dev/demo k8s/lgtm.yaml manifest.
  • Exclude a specific GitHub Actions workflow from Flint runs due to an actionlint version compatibility gap with environment.deployment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
mise.toml Pins Flint to a git revision and installs kube-linter via Aqua for CI/lint validation.
.github/renovate-tracked-deps.json Keeps Renovate’s tracked-deps snapshot in sync with the updated mise.toml tool list.
.github/config/kube-linter.yaml Configures kube-linter check exclusions appropriate for the repo’s demo Kubernetes manifest.
.github/config/flint.toml Updates Flint config to exclude a workflow file that actionlint can’t currently parse.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mise.toml Outdated
"aqua:owenlamont/ryl" = "0.21.0"
"aqua:stackrox/kube-linter" = "0.8.3"
biome = "2.5.2"
"cargo:https://github.com/grafana/flint" = "rev:f68039f"
…-linter

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

# Conflicts:
#	.github/renovate-tracked-deps.json
#	mise.toml
Copilot AI review requested due to automatic review settings July 28, 2026 10:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

.github/config/flint.toml:6

  • PR description mentions excluding the release workflow from Flint due to actionlint’s lack of support for environment.deployment, but the config excludes .github/workflows/ghcr-image-build-and-publish.yml. If that’s intentional, consider updating the PR description to avoid confusion; otherwise, update the excluded workflow path.
  "**/package-lock.json",
  # actionlint 1.7.12 predates GitHub's environment.deployment setting.
  ".github/workflows/ghcr-image-build-and-publish.yml",
]

mise.toml:6

  • PR description says Flint is pinned to an unreleased kube-linter implementation from grafana/flint#437, but this PR doesn’t change the flint pin (mise.toml still has "aqua:grafana/flint" = "0.22.10"). Either add the intended flint pin change to this PR, or update the PR description so it matches what’s actually being changed here.
"aqua:grafana/gcx" = "v0.6.0"
"aqua:grafana/oats" = "0.8.0"
"aqua:stackrox/kube-linter" = "0.8.3"
bats = "1.14.0"

@zeitlinger
zeitlinger marked this pull request as ready for review July 28, 2026 11:44
@zeitlinger
zeitlinger requested a review from a team as a code owner July 28, 2026 11:44
Comment thread .github/config/flint.toml Outdated
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Copilot AI review requested due to automatic review settings July 28, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

martincostello
martincostello previously approved these changes Jul 28, 2026
@zeitlinger zeitlinger changed the title ci: validate Flint kube-linter support ci: lint Kubernetes manifests with Flint Jul 28, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Copilot AI review requested due to automatic review settings July 28, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@zeitlinger
zeitlinger merged commit 5f7268e into main Jul 28, 2026
24 checks passed
@zeitlinger
zeitlinger deleted the agent/test-flint-kube-linter branch July 28, 2026 14:32
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.

3 participants