Skip to content

docs(spec): plan #7900 Skip CRDs and widen the tree lint limit - #8003

Closed
devops-cli-service[bot] wants to merge 1 commit into
mainfrom
fix/7900-k8s-lint-of-all-charts-nears
Closed

devops-cli-service[bot] wants to merge 1 commit into
mainfrom
fix/7900-k8s-lint-of-all-charts-nears

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

devops k8s lint with no TARGET gives all renders to one kube-linter run. The run has the 300 s wall limit of the devops CLI and needs 328 s to 342 s of CPU time on the homelab tree, so a loaded host times out. The change removes CustomResourceDefinition documents unless the config checks that kind, gives the tree run a 900 s limit, and prints the skipped count and the wall time. One run stays, because some checks read sibling files. A person measures the live time after the merge.

Plans #7900

Change: openspec/changes/7900-k8s-lint-of-all-charts-nears/

@devops-cli-service
devops-cli-service Bot force-pushed the fix/7900-k8s-lint-of-all-charts-nears branch from 9777757 to 53417a8 Compare December 1, 2026 02:59
@dan-petty

Copy link
Copy Markdown
Owner

Do not build this plan yet. A measurement shows a different cause. This comment is information. It is no command.

Measured on 2026-12-01 on a host with 16 CPUs, kube-linter 0.8.3, with write_application_renders on dan-petty/homelab at 40ef403 (53 files, 108 CustomResourceDefinitions, 12.8 MB of 15.5 MB) and the shared config of dan-petty/github-workflows v0.2.0:

Run Wall CPU Lint errors
All documents, shared config 283.5 s 371.8 s 153
No CustomResourceDefinition, shared config 38.5 s 50.3 s 153
All documents, network-policy-egress-alone scoped to NetworkPolicy 56.4 s 63.9 s 153

Cause: the custom check network-policy-egress-alone of the shared config has objectKinds: [Any]. So kube-linter runs its CEL expression on each CustomResourceDefinition, and the expression reads only a NetworkPolicy. Main and v0.5.1 of dan-petty/github-workflows hold the same scope. With objectKinds: [NetworkPolicy], the check still reports a NetworkPolicy that breaks it.

Defects of the plan and of the acceptance criteria of #7900:

  1. kube-linter 0.8.3 refuses a config whose scope names CustomResourceDefinition (unknown object kind: CustomResourceDefinition). So the guard of the plan matches no valid config.
  2. A custom check of the kind Any reads a CustomResourceDefinition. The guard misses it, and the filter removes the documents from that check.
  3. The safe YAML loader fails on a document of prometheus-operator-crds-0.yaml (tag:yaml.org,2002:value).
  4. The live check expects exit code 0. The run of today reports 153 lint errors, so it exits 1.
  5. The two dependencies are false. refactor(k8s): delete the unused write_path_renders #7907 changes only app_render.py and its test. fix(k8s): k8s lint reads folder sources with no namespace #7899 shares files, and no part of this plan needs it. This pull request keeps them, so the Service does not build the plan.

Recommendation: change the scope of the check in dan-petty/github-workflows, pin that release in dan-petty/homelab, and close #7900 and this pull request. This needs no code in devops-cli.

@dan-petty

Copy link
Copy Markdown
Owner

Closed: the plan targets the wrong thing. #7900 is replaced by dan-petty/github-workflows#69, which changes the scope of one check in the shared config. The comment above gives the measurement.

@dan-petty dan-petty closed this Dec 1, 2026
@devops-cli-service
devops-cli-service Bot deleted the fix/7900-k8s-lint-of-all-charts-nears branch December 1, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/spec type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant