istio/istio

Largest CNCF service-mesh + 9 Helm charts + extensive depguard rules — surfaces two v0.10 design candidates (pitfall #20: cross-file value-equality with per-file extractor; pitfall #21: yaml_path multi-doc support).

Narrative
Polyglot wins
Rules
65
Last revalidated
Engineering reference
README on GitHub · .alint.yml

Why this matters

istio is the canonical CNCF service-mesh polyglot: a single- module Go monorepo (one root go.mod, ~1,238 production .go files, ~6,400 tracked files) with per-component subdirectories (pilot/, cni/, ztunnel-helm-chart, istioctl/, operator/, security/, tools/, samples/) rather than separate Go modules; 9 Helm Chart.yaml files under manifests/charts/ that all share the version: 1.0.0 / appVersion: 1.0.0 placeholder template that istio/release-builder substitutes at build time; 29 Dockerfiles across the component dirs; ~1,699 release-note YAML files under releasenotes/notes/ with a fixed schema; NO GitHub Actions workflows (istio runs CI in Prow, out-of-tree); NO k8s-style OWNERS files — uses the GitHub-native CODEOWNERS at the repo root.

The structural-validation surface lives in two Makefiles plus 6 lint configs under common/config/ plus 3 home-grown bash scripts under common/scripts/ plus 1 sample-validator script — the 9 lint sub-targets the Makefile fans out to: lint-dockerfiles (hadolint), lint-scripts (shellcheck), lint-yaml (yamllint), lint-helm-global (helm lint), lint-copyright-banner (custom bash + grep), lint-go (golangci-lint), lint-python (autopep8), lint-markdown (mdl), lint-licenses (license-lint).

This is the complementary case study to kubernetes + helm: those two anchor the Go-monorepo extremes (mega-repo + canonical midsize). istio adds the Helm-chart structural-discipline axis that no earlier case study has covered.

Headline catch

istio’s structural surface is rich enough that running the alint config surfaces two genuinely new v0.10 design candidates that went on to become formalised pitfalls #20 and #21 in CONFIG-AUTHORING.md:

Pitfall #20 — cross-file value-equality across structurally- different files requires per-file value extraction. istio’s per- chart _internal_defaults_do_not_set.hub lives at one JSONPath in ztunnel’s values.yaml (top-level under _internal_defaults_do_not_set) but at a deeper path in istio-control/istio-discovery’s values.yaml (under _internal_defaults_do_not_set.global). A future cross_file_value_equals primitive can’t assume one JSONPath across all files; it needs a per-file-pattern value_extractor: block. istio is the named source for this v0.10 design candidate.

Pitfall #21 — yaml_path_* rules emit “more than one document is not supported” runtime error per multi-document YAML file. The engine’s serde_yaml::from_str::<Value> single-document call rejects YAML files with --- document separators. Surfaced first by istio, hit at runtime against releasenotes/notes/50328.yaml (a legitimate two-document file collapsing two related changes into one PR-numbered release-note entry). istio is the named source for the multi_doc_mode: knob (error | first | every) on yaml_path_* rules — v0.10 design candidate.

Plus 9 net-new structural-hygiene findings against the live tree that the existing tooling misses or accepts silently:

  1. istioctl/pkg/precheck/precheck.go carries the cobra-cli placeholder header// Copyright © 2021 NAME HERE <EMAIL ADDRESS>. The cobra-CLI scaffolder injects this when a developer runs cobra-cli add <command>; they’re supposed to replace it before the PR. istio’s lint_copyright_banner.sh accepts the file because it just greps for the literals “Apache License” + “Copyright” — both present. alint’s regex- anchored file_header rule catches the placeholder leak
  2. pkg/channels/unbounded.go and unbounded_test.go carry the gRPC-Authors header (vendored from grpc-go) — the in-file comment acknowledges this but no Istio-Authors banner was ever added on top
  3. manifests/charts/gateways/istio-ingress/Chart.yaml declares sources: [http://github.com/istio/istio] (HTTP, not HTTPS). Every other Chart.yaml uses https://. Invisible to helm lint
  4. releasenotes/notes/27430.yaml declares piVersion: release-notes/v2 — typo with missing leading a. The release-notes generator parses YAML and silently ignores the unknown key 5-6. Three release-note files (31336.yaml, 31797.yaml, v1-read-crd.yaml) declare non-enum kind: values (bug, enhancement)
  5. 23 info-level final-newline / trailing-whitespace findings under manifests/charts/ — explicitly disabled in .yamllint.yml, caught by the bundled oss-baseline floor

Where alint earns its keep here

The 65-rule starter config replaces every structural assertion make lint makes about istio’s own tree that isn’t a Go-AST analysis or Kubernetes-object-aware validation. Net: one declarative file replaces 9 sub-Makefile targets plus 4 home-grown bash scripts plus the half-dozen shape-implicit assertions buried inside common/config/.golangci.yml and the per-chart values.yaml family.

The pitch:

“istio is the largest CNCF service-mesh project — 9 Helm charts with cross-component image-pinning conventions, ~250 lines of golangci-lint depguard rules, and 1,699 release-note files carrying a fixed schema. alint replaces the orchestration layer (one declarative file replaces 9 Make targets + 4 home-grown bash scripts), keeps golangci-lint as the deep-Go-AST workhorse and helm/hadolint/shellcheck/yamllint as the per-format linters, and adds a structural floor (Trojan-Source defence, per-chart placeholder enforcement, release-note schema enforcement) that istio’s existing pipeline doesn’t currently enforce.”

Demand-signal increments:

Future story angles

The factual engineering writeup (tooling inventory, mapping table, gap catalogue, validation status footer) lives in the public alint repo at github.com/asamarts/alint/tree/main/examples/istio-istio/README.md.