kubernetes/hack
Yongrui Lin b622d5d2a2 hack: glob-remove all validation-gen outputs in update-codegen.sh
The cleanup step removed only zz_generated.validations.go and left the
per-Kind coverage test fixtures (zz_generated.<version>_test.go,
zz_generated.main_test.go) on disk, so renamed or removed Kinds would
leak stale files. Move every validation-gen output under a shared
zz_generated.validations. prefix and remove them via a single glob.
2026-05-12 20:31:20 +00:00
..
boilerplate Remove year from copyright header boilerplate 2025-10-23 16:50:13 -07:00
conformance
e2e-internal
gen-swagger-doc
jenkins Merge pull request #133759 from BenTheElder/integrationprocs 2026-02-06 11:06:36 +05:30
kube-api-linter Merge pull request #136935 from troychiu/enable-optionalorrequired-linter-for-resource 2026-04-23 03:20:09 +05:30
lib Merge pull request #138746 from humblec/update-etcd-image-3.6.11 2026-05-12 17:39:32 +05:30
make-rules test: move list of extra tests into separate file 2026-04-27 09:18:11 +02:00
testdata pause: fix version drift in various files 2026-04-03 16:11:09 +02:00
tools Merge pull request #138542 from pohly/dra-create-resource-claim 2026-05-12 05:12:09 +05:30
verify-flags
.descriptions_failures
.import-aliases Create Workload API v1alpha2 (#136976) 2026-03-10 07:59:10 +05:30
.spelling_failures
_update-generated-proto-bindings-dockerized.sh Update protobindings scripts to drop gogo paths 2025-09-01 09:35:20 +02:00
_update-generated-protobuf-dockerized.sh
apidiff.sh apidiff: autodetect remote and default branch 2025-11-20 16:48:02 -08:00
benchmark-go.sh
build-cross.sh
build-go.sh
cherry_pick_pull.sh hack/cherry_pick_pull.sh: use 'gh' to download patches 2026-05-08 19:16:21 +02:00
dependency-unit-tests.conf test: move list of extra tests into separate file 2026-04-27 09:18:11 +02:00
dev-build-and-push.sh
dev-build-and-up.sh
dev-push-conformance.sh remove calls to kube::build::build_image and kube::build::copy_output 2025-10-13 09:47:24 -07:00
diff-protobuf.sh Add helper command for comparing protobuf files 2025-07-30 14:21:24 -04:00
e2e-node-test.sh
generate-docs.sh
get-build.sh
ginkgo-e2e.sh ginkgo-e2e.sh: support arguments in KUBE_E2E_TEST_ARGS env variable 2026-01-12 17:30:47 +01:00
golangci-hints.yaml chore: remove redundant comments 2026-05-06 09:35:48 +02:00
golangci.yaml chore: remove redundant comments 2026-05-06 09:35:48 +02:00
golangci.yaml.in Merge pull request #137614 from kairosci/fix-golangci-trailing-whitespace 2026-03-11 16:59:45 +05:30
grab-profiles.sh
install-etcd.sh
install-protoc.sh
lint-dependencies.sh
local-up-cluster.sh Merge pull request #138717 from pohly/dra-upgrade-downgrade-etcd 2026-05-04 17:19:40 +05:30
logcheck.conf chore: remove redundant comments 2026-05-06 09:35:48 +02:00
module-graph.sh
OWNERS emeritus spiffxp 2025-06-10 20:05:40 -07:00
pin-dependency.sh
print-workspace-status.sh
README.md
run-prometheus-on-etcd-scrapes.sh
serve-prom-scrapes.sh
test-go.sh
unwanted-dependencies.json Remove kube-openapi from modern-go unwantedReferences 2026-05-09 13:20:11 -04:00
update-all.sh
update-codegen.sh hack: glob-remove all validation-gen outputs in update-codegen.sh 2026-05-12 20:31:20 +00:00
update-conformance-yaml.sh
update-featuregates.sh add utility for generating markdown for feature gates 2025-12-18 22:53:56 -05:00
update-generated-api-compatibility-data.sh
update-generated-docs.sh
update-generated-stable-metrics.sh add presubmit for metric naming 2026-04-21 01:03:31 +00:00
update-gofmt.sh
update-golangci-lint-config.sh
update-import-aliases.sh
update-internal-modules.sh
update-kustomize.sh
update-mocks.sh Bump to mockery v3 2025-08-29 13:43:54 +02:00
update-netparse-cve.sh
update-openapi-spec.sh
update-owners-fmt.sh Rename hack/*-yamlfmt to -owners-fmt 2025-07-24 12:12:59 -07:00
update-translations.sh
update-vendor-licenses.sh
update-vendor.sh Replace cmd/yamlfmt with k-sigs/yaml/yamlfmt 2025-07-24 12:11:04 -07:00
verify-all.sh
verify-api-groups.sh
verify-boilerplate.sh
verify-cli-conventions.sh
verify-codegen.sh
verify-conformance-requirements.sh
verify-conformance-yaml.sh
verify-deadcode-elimination.sh Re-enable deadcode-elimination check 2026-03-05 16:57:02 -05:00
verify-description.sh
verify-e2e-images.sh e2e: suppress or ignore init log output 2026-01-07 14:11:33 +01:00
verify-e2e-test-ownership.sh
verify-external-dependencies-version.sh
verify-featuregates.sh hack/verify-featuregates.sh: print failure information to stderr 2025-12-26 10:37:10 +01:00
verify-fieldname-docs.sh
verify-file-sizes.sh
verify-flags-underscore.py
verify-generated-docs.sh
verify-generated-stable-metrics.sh add presubmit for metric naming 2026-04-21 01:03:31 +00:00
verify-gofmt.sh
verify-golangci-lint-config.sh
verify-golangci-lint-pr-hints.sh
verify-golangci-lint.sh Remove some unused bits of verify-golangci-lint.sh 2025-09-23 08:39:49 -04:00
verify-govulncheck.sh Merge pull request #132820 from dims/update-to-v1.1.4-for-golang.org/x/vuln/cmd/govulncheck 2025-07-08 20:01:33 -07:00
verify-import-aliases.sh
verify-import-boss.sh
verify-imports.sh
verify-internal-modules.sh
verify-licenses.sh Update allowed-thir-party-license-policy.md link 2025-12-11 17:10:35 +01:00
verify-metrics-naming.sh add presubmit for metric naming 2026-04-21 01:03:31 +00:00
verify-mocks.sh
verify-netparse-cve.sh
verify-no-vendor-cycles.sh
verify-non-mutating-validation.sh
verify-openapi-docs-urls.sh
verify-openapi-spec.sh
verify-owners-fmt.sh Rename hack/*-yamlfmt to -owners-fmt 2025-07-24 12:12:59 -07:00
verify-pkg-names.sh
verify-prerelease-lifecycle-tags.sh
verify-prometheus-imports.sh add presubmit for metric naming 2026-04-21 01:03:31 +00:00
verify-publishing-bot.sh
verify-readonly-packages.sh
verify-shellcheck.sh disable selinux relabeling when mounting sourcedir to shellcheck 2025-06-11 15:35:56 -07:00
verify-spelling.sh
verify-staging-meta-files.sh
verify-test-code.sh
verify-test-featuregates.sh Record and require all kube-feature dependencies 2025-10-15 10:29:15 -07:00
verify-test-images.sh
verify-testing-import.sh
verify-typecheck.sh Fix flaky typecheck: enforce serial execution to prevent OOM 2026-01-09 10:40:43 +05:30
verify-vendor-licenses.sh
verify-vendor.sh

Kubernetes hack GuideLines

This document describes how you can use the scripts from hack directory and gives a brief introduction and explanation of these scripts.

Overview

The hack directory contains many scripts that ensure continuous development of kubernetes, enhance the robustness of the code, improve development efficiency, etc. The explanations and descriptions of these scripts are helpful for contributors. For details, refer to the following guidelines.

Key scripts

  • verify-all.sh: This script is a vestigial redirection, Please do not add "real" logic. It is equivalent to make verify.
  • update-all.sh: This script is a vestigial redirection, Please do not add "real" logic. The true target of this makerule is hack/make-rules/update.sh.It is equivalent to make update.

Attention

Note that all scripts must be run from the Kubernetes root directory. We should run hack/verify-all.sh before submitting a PR and if anything fails run hack/update-all.sh.