Reference configs

istio/istio: a release note that misspells apiVersion

releasenotes/notes/27430.yaml spells its first key piVersion. Istio's release-note tool has checked new notes against a schema since 2021, but existing notes aren't checked again, and this one is from 2020. A rule on the key checks every note. This config was written to test alint; Istio doesn't use alint.

What alint found

.alint.yml
- id: istio-releasenotes-apiversion
  # fixed here: skips the one note written as two YAML documents, which alint can't read
  kind: yaml_path_equals
  paths:
    include: ["releasenotes/notes/*.yaml"]
    exclude: ["releasenotes/notes/50328.yaml"]
  path: "$.apiVersion"
  equals: "release-notes/v2"
  level: error

✗ error istio-releasenotes-apiversion

Istio's release-note tool checks new notes against a schema that requires apiVersion; notes already merged aren't checked again, and this one's typo is still on master.

.alint.yml
- id: istio-chart-version-templated
  kind: yaml_path_equals
  paths: "manifests/charts/**/Chart.yaml"
  path: "$.version"
  equals: "1.0.0"
  level: error

✓ passed istio-chart-version-templated

All 8 charts keep the placeholder version 1.0.0, which the release tooling replaces.

The config

Istio is one Go module with components in directories such as pilot/ and istioctl/, plus 29 Dockerfiles and 8 Helm charts. The config checks the chart conventions (the placeholder version, the API version, one image hub across the charts), the release-note fields, the cross-repository pins in istio.deps and the DCO sign-off. make gen-check, the banner script and the lint tools run from command and command_idempotent rules.

.alint.yml
- id: istio-chart-hub-consistent
  # fixed here: ztunnel keeps its hub outside `global`
  kind: cross_file_value_equals
  source:
    file: "manifests/charts/istio-control/istio-discovery/values.yaml"
    extract: { yaml: "$._internal_defaults_do_not_set.global.hub" }
  targets:
    - file: "manifests/charts/ztunnel/values.yaml"
      extract: { yaml: "$._internal_defaults_do_not_set.hub" }
    - file: "manifests/charts/istio-cni/values.yaml"
      extract: { yaml: "$._internal_defaults_do_not_set.global.hub" }
    - file: "manifests/charts/gateways/istio-ingress/values.yaml"
      extract: { yaml: "$._internal_defaults_do_not_set.global.hub" }
  level: warning

Four charts set the image hub for development builds, and they have to agree. One cross_file rule compares the others with istio-discovery's; ztunnel keeps its hub one level up, outside global.

What stays outside alint

Go analysis, Kubernetes validation and Prow stay with Istio's tools:

  • golangci-lint's Go analysis, including the depguard rules;
  • the samples check in bin/check_samples.sh, which validates Kubernetes objects;
  • Markdown and Python formatting, Prow's operation and release semantics.