kubernetes/hack
Stephen Kitt 3d1e90f95a
Bump to golangci-lint 2.9.0
bloop was disabled because of its impact on small benchmarks (see
267fc6b81a
for details), this removes it from the disabled entries.

stringscut was introduced in x/tools 0.40.0 and is disabled for
existing code.

ginkgolinter's Success matcher check doesn't know about TContext, so
it's disabled for k/k.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-02-16 15:45:22 +01:00
..
boilerplate Remove year from copyright header boilerplate 2025-10-23 16:50:13 -07:00
conformance e2e: remove redundant spaces in test names 2023-09-29 08:30:57 +02:00
e2e-internal
gen-swagger-doc
jenkins Merge pull request #133759 from BenTheElder/integrationprocs 2026-02-06 11:06:36 +05:30
kube-api-linter Update exceptions to drop "it must be optional" 2026-02-12 17:42:44 +00:00
lib etcd: Update etcd to v3.6.7 2025-12-18 19:05:14 +05:30
make-rules Fix ulimit check 2026-02-02 21:33:05 -05:00
testdata Promote agnhost image to 2.63.0 2026-02-05 17:21:34 +00:00
tools Bump to golangci-lint 2.9.0 2026-02-16 15:45:22 +01:00
verify-flags
.descriptions_failures Add missing comments in k8s.io/api/core/v1 2024-11-07 18:42:33 -08:00
.import-aliases
.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 Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
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 Add release notes to the body of the pull request on create cherry-pick. 2024-08-26 20:58:51 +03: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 Update exceptions to drop "it must be optional" 2026-02-12 17:42:44 +00:00
golangci.yaml Bump to golangci-lint 2.9.0 2026-02-16 15:45:22 +01:00
golangci.yaml.in Bump to golangci-lint 2.9.0 2026-02-16 15:45:22 +01:00
grab-profiles.sh
install-etcd.sh install-ectd.sh: brace PATH and suggest user export 2025-03-13 11:23:53 -07:00
install-protoc.sh
lint-dependencies.sh Add guard for dependencies recursively depending on kubernetes or staging modules 2024-09-04 16:58:04 -04:00
local-up-cluster.sh hack: switch local-up-cluster to ptp CNI for reliable DIND networking 2026-01-30 16:25:05 -05:00
logcheck.conf Merge pull request #135432 from pohly/apimachinery-featuregate-contextual-logging 2026-01-14 01:11:35 +05:30
module-graph.sh
OWNERS emeritus spiffxp 2025-06-10 20:05:40 -07:00
pin-dependency.sh Remove _tmp from pin-dependency 2024-03-05 21:44:43 -08:00
print-workspace-status.sh
README.md
run-prometheus-on-etcd-scrapes.sh
serve-prom-scrapes.sh
test-go.sh
unwanted-dependencies.json Move dump package from apimachinery to k8s.io/utils 2026-02-12 07:34:19 -05:00
update-all.sh
update-codegen.sh Update update-codegen.sh with sample-controller exception for openapi 2026-01-29 16:06:16 +01:00
update-conformance-yaml.sh Revert "Save a list of images used by e2e.test" 2024-01-12 13:15:01 -08:00
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 Rename new::setup_env back to setup_env 2024-02-29 22:06:44 -08:00
update-generated-docs.sh Move doc-generation funcs into only caller 2024-02-29 22:07:33 -08:00
update-generated-stable-metrics.sh
update-gofmt.sh Call verify_go_version at the END of setup_env 2024-02-29 22:06:56 -08:00
update-golangci-lint-config.sh golangci-lint: remove "strict" checking 2025-02-02 18:50:27 +01:00
update-import-aliases.sh Call verify_go_version at the END of setup_env 2024-02-29 22:06:56 -08:00
update-internal-modules.sh Change pushd $d; go ...; popd to go -C $d ... 2024-03-02 14:40:10 -08:00
update-kustomize.sh Simplify update-vendor.sh to use go work sync 2024-10-10 17:58:54 -04:00
update-mocks.sh Bump to mockery v3 2025-08-29 13:43:54 +02:00
update-netparse-cve.sh Honor KUBE_HACK_TOOLS_GOTOOLCHAIN 2025-02-14 13:01:59 -05:00
update-openapi-spec.sh Allow OpenAPI verification to pass both with and without strict alpha 2025-03-05 21:31:40 +00:00
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 Tidy update-vendor-licenses for workspaces 2024-02-29 22:06:53 -08:00
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 removed this k8s.io/kubernetes/pkg/apis/componentconfig from verify-api-groups.sh 2024-04-13 05:26:16 -04:00
verify-boilerplate.sh
verify-cli-conventions.sh Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
verify-codegen.sh
verify-conformance-requirements.sh Call verify_go_version at the END of setup_env 2024-02-29 22:06:56 -08:00
verify-conformance-yaml.sh Revert "Save a list of images used by e2e.test" 2024-01-12 13:15:01 -08:00
verify-deadcode-elimination.sh add script for verifying dead code elimination 2025-06-17 03:35:12 +00:00
verify-description.sh Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
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 update zeitgeist to v0.5.4 2024-10-21 09:57:12 +02:00
verify-featuregates.sh hack/verify-featuregates.sh: print failure information to stderr 2025-12-26 10:37:10 +01:00
verify-fieldname-docs.sh Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
verify-file-sizes.sh Changed to use "wc -c" to ensure the command works on both Linux and Mac OS X with a single implementation 2024-04-20 04:39:50 +09:00
verify-flags-underscore.py Get rid of most references to GOPATH 2024-02-29 22:06:51 -08:00
verify-generated-docs.sh Move doc-generation funcs into only caller 2024-02-29 22:07:33 -08:00
verify-generated-stable-metrics.sh
verify-gofmt.sh Remove legacy references to './output' 2024-02-29 22:07:31 -08:00
verify-golangci-lint-config.sh hack: verify to verify-golangci-lint.sh 2025-03-10 14:37:13 +02:00
verify-golangci-lint-pr-hints.sh hack: update golangci-lint verify scripts 2023-10-09 20:14:47 +02:00
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 Call verify_go_version at the END of setup_env 2024-02-29 22:06:56 -08:00
verify-import-boss.sh Move import-boss: k/code-generator/cmd -> k/k/cmd 2024-02-29 22:07:36 -08:00
verify-imports.sh Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
verify-internal-modules.sh
verify-licenses.sh Update allowed-thir-party-license-policy.md link 2025-12-11 17:10:35 +01:00
verify-mocks.sh
verify-netparse-cve.sh Remove legacy references to './output' 2024-02-29 22:07:31 -08:00
verify-no-vendor-cycles.sh Call verify_go_version at the END of setup_env 2024-02-29 22:06:56 -08:00
verify-non-mutating-validation.sh
verify-openapi-docs-urls.sh Remove _tmp from verify-openapi-docs-urls 2024-03-05 21:44:44 -08:00
verify-openapi-spec.sh Allow OpenAPI verification to pass both with and without strict alpha 2025-03-05 21:31:40 +00:00
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 enforce that GA apis also have lifecycle tags 2024-05-21 13:27:01 -07:00
verify-prometheus-imports.sh
verify-publishing-bot.sh Honor KUBE_HACK_TOOLS_GOTOOLCHAIN 2025-02-14 13:01:59 -05:00
verify-readonly-packages.sh Remove legacy references to './output' 2024-02-29 22:07:31 -08:00
verify-shellcheck.sh disable selinux relabeling when mounting sourcedir to shellcheck 2025-06-11 15:35:56 -07:00
verify-spelling.sh dependencies: github.com/client9/misspell -> github.com/golangci/misspell 2025-04-28 15:44:04 +02:00
verify-staging-meta-files.sh
verify-test-code.sh Provide link with e2e guidelines when verity-test-code.sh fails 2024-10-29 13:07:05 +01:00
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 hack: configure Go environments where necessary 2024-09-26 23:32:33 +02:00
verify-typecheck.sh Fix flaky typecheck: enforce serial execution to prevent OOM 2026-01-09 10:40:43 +05:30
verify-vendor-licenses.sh Make vendor-licenses use verify::generated 2024-03-05 21:44:43 -08:00
verify-vendor.sh Simplify update-vendor.sh to use go work sync 2024-10-10 17:58:54 -04:00

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.