Skip to content

feat: add scoped Kubernetes manifest linting - #437

Merged
zeitlinger merged 2 commits into
mainfrom
agent/kube-linter-support
Jul 27, 2026
Merged

feat: add scoped Kubernetes manifest linting#437
zeitlinger merged 2 commits into
mainfrom
agent/kube-linter-support

Conversation

@zeitlinger

Copy link
Copy Markdown
Member

Summary

  • add report-only kube-linter support for explicitly selected Kubernetes manifests
  • default to conventional Kubernetes directories while excluding unrelated YAML and Compose files
  • add configuration support, generated documentation, tool pins, and focused tests

Split from #430 so the kube-linter integration can be reviewed independently.

Validation

  • mise run generate
  • mise run lint:fix
  • mise exec -- cargo test

@zeitlinger

Copy link
Copy Markdown
Member Author

Pre-release consumer validation is running in grafana/docker-otel-lgtm#1635. Flint discovers the real k8s/lgtm.yaml manifest, and the repository now documents intentional exclusions for five production-oriented checks that do not fit its development/demo deployment. Focused kube-linter, full Flint lint, and all 38 unit tests pass locally.

@zeitlinger
zeitlinger marked this pull request as ready for review July 24, 2026 18:35
@zeitlinger
zeitlinger requested a review from a team as a code owner July 24, 2026 18:35
Copilot AI review requested due to automatic review settings July 24, 2026 18:35

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

Adds first-class, scoped kube-linter integration to Flint, aimed at linting Kubernetes manifests without accidentally sweeping in unrelated YAML (e.g., Docker Compose).

Changes:

  • Add a new native kube-linter check type with conventional directory defaults plus explicit path/config support.
  • Wire kube-linter into the registry, generated docs/README tables, and tool pinning + Renovate tracking.
  • Add focused end-to-end fixture cases covering selection behavior.

Reviewed changes

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

Show a summary per file
File Description
tests/cases/kube-linter/selection/test.toml E2E case asserting kube-linter receives only selected manifest paths
tests/cases/kube-linter/selection/files/mise.toml Fixture pins kube-linter for the selection case
tests/cases/kube-linter/selection/files/k8s/deployment.yaml Sample Kubernetes manifest used for selection
tests/cases/kube-linter/selection/files/compose.yaml Non-Kubernetes YAML fixture to ensure it’s excluded
tests/cases/kube-linter/clean/test.toml E2E “clean” baseline for kube-linter
tests/cases/kube-linter/clean/files/mise.toml Fixture pins kube-linter for the clean case
tests/cases/kube-linter/clean/files/k8s/configmap.yaml Sample Kubernetes manifest for the clean case
src/registry/checks.rs Registers the new kube-linter check, patterns, and generated docs metadata
src/main.rs Updates the linters table fixture to include kube-linter
src/linters/mod.rs Exposes the new kube-linter linter module
src/linters/kube_linter.rs Implements manifest selection + kube-linter invocation (new native check)
src/config.rs Adds [checks.kube-linter] configuration schema
README.md Adds kube-linter to the Tooling/CI overview table
mise.toml Pins kube-linter version for the repo toolchain
docs/linters.md Adds generated kube-linter documentation section
default.json Tracks kube-linter in the default tool set
.github/renovate.json5 Adds kube-linter to Renovate-managed dependency list
.github/renovate-tracked-deps.json Adds kube-linter datasource/package mapping for Renovate

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

Comment thread src/registry/checks.rs Outdated
Comment thread src/linters/kube_linter.rs Outdated
Comment thread src/linters/kube_linter.rs Outdated
@zeitlinger
zeitlinger changed the base branch from main to agent/dedicated-linter-docs July 25, 2026 10:34
@zeitlinger
zeitlinger marked this pull request as draft July 25, 2026 10:50
Base automatically changed from agent/dedicated-linter-docs to main July 27, 2026 09:24
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger force-pushed the agent/kube-linter-support branch from ecc1870 to 674c4e1 Compare July 27, 2026 09:31
@zeitlinger
zeitlinger marked this pull request as ready for review July 27, 2026 09:41
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger merged commit ed1f926 into main Jul 27, 2026
17 checks passed
@zeitlinger
zeitlinger deleted the agent/kube-linter-support branch July 27, 2026 15:35
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
zeitlinger pushed a commit that referenced this pull request Jul 27, 2026
## 🤖 New release

* `flint`: 0.22.9 -> 0.22.10

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.22.10](v0.22.9...v0.22.10) -
2026-07-27

### Added

- add safe dotenv linting
([#436](#436))
- add native Java formatting and regex replacements
([#407](#407))
- add scoped Kubernetes manifest linting
([#437](#437))
- add standalone Checkstyle linting
([#435](#435))
- improve Flint init and setup migrations
([#428](#428))
- define registry and execution contracts
([#427](#427))

### Fixed

- *(renovate)* avoid overlapping mise managers
([#446](#446))

### Other

- *(deps)* update dependency jdx/mise-action to v4.2.2
([#448](#448))
- make Windows aube installs cacheable
([#447](#447))
- *(deps)* update mise to v2026.7.12
([#444](#444))
- *(deps)* update linters
([#443](#443))
- move linter reference to dedicated pages
([#440](#440))
- *(deps)* lock file maintenance
([#445](#445))
- *(deps)* update taiki-e/install-action action to v2.85.0
([#442](#442))
- *(deps)* update taiki-e/install-action action to v2.84.1
([#441](#441))
- require silent happy paths for checks
([#439](#439))
- *(deps)* update grafana/shared-workflows/lint-pr-title action to
v1.2.4 ([#438](#438))
- add Linux musl release artifacts
([#421](#421))
- validate curated mise registry backends
([#429](#429))
- *(deps)* update rust crate tokio to v1.53.1
([#434](#434))
- *(deps)* update taiki-e/install-action action to v2.84.0
([#433](#433))
- *(deps)* update rust crate clap to v4.6.3
([#432](#432))
- *(deps)* update rust crate serde_json to v1.0.151
([#431](#431))
- record Flint v2 architecture decisions
([#426](#426))
- *(deps)* update taiki-e/install-action action to v2.83.4
([#423](#423))
- *(deps)* update actions/checkout digest to 3d3c42e
([#422](#422))
- *(deps)* update rust crate regex to v1.13.1
([#412](#412))
- document semantic PR title guidance
([#420](#420))
- *(deps)* update linters
([#418](#418))
- *(deps)* update dependency mise to v2026.7.7
([#417](#417))
- *(deps)* lock file maintenance
([#419](#419))
- *(deps)* update taiki-e/install-action action to v2.83.3
([#415](#415))
- *(deps)* update rust crate tokio to v1.52.4
([#414](#414))
- *(deps)* update dependency jdx/mise-action to v4.2.1
([#416](#416))
- *(deps)* update dependency rust to v1.97.1
([#413](#413))
- *(deps)* update rust crate clap to v4.6.2
([#411](#411))
- *(deps)* update rust crate globset to v0.4.19
([#410](#410))
- *(deps)* update rust crate toml_edit to v0.25.13
([#409](#409))
- *(deps)* update rust crate toml to v1.1.3
([#408](#408))
- document signed commit requirement
([#406](#406))
- batch rumdl file checks
([#404](#404))
- *(deps)* update taiki-e/install-action action to v2.83.2
([#405](#405))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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