Repository navigation
Description
Problem
Since the merge of pull request 7901 (release v0.263.1), devops k8s lint gives the destination namespace of an Argo CD Application to its chart renders only. A path source that Kustomize builds, whose object names no namespace, keeps none. kube-linter then does not match a chart pod with the ServiceAccount or the NetworkPolicy of that path source, and reports both as missing. A tree that passed the lint before now fails.
An Application whose destination names no namespace fails in the same way: its chart objects get default, and its path objects get none.
Reproduction
One Application has two sources and the checks non-isolated-pod and non-existent-service-account:
- a chart with a Deployment that names no namespace and has
serviceAccountName: web - a path source with a kustomization of a ServiceAccount
weband a NetworkPolicy for the pod, neither with a namespace
Run devops k8s lint --k8s-dir <tree>/k8s with kube-linter 0.8.3 and kubectl 1.37.3, with a destination namespace web, and again with no destination namespace.
- Commit 1966142: the audit passes in both runs.
- Commit 8f7654a: both runs report
serviceAccount "web" not foundandnon-isolated-pod.
Expected behavior
- Each namespaced object of a Kustomize build of a path source that names no namespace takes the destination namespace of its Application, as an object of a chart render does.
- With no destination namespace, no render gets a namespace from the lint.
- A path folder with no kustomization is the subject of issue 7899.
Existing Tool Considered
Kustomize, which kubectl kustomize holds. Its builtin NamespaceTransformer already sets the namespace of the chart renders. No tool is built here.
Source
Source: #7901
Activity
dan-petty commentedon Nov 30, 2026
A tree that passed lint before now fails, which causes CI to fail.The regression commit 8f7654a does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.Both fix namespace propagation for path sources in k8s lint, but 7899 targets raw folders and the candidate targets Kustomize builds.docs(spec): state the reference rule in the change of #7904
docs(spec): archive the change of #7904
docs(spec): state the reference rule in the change of #7904