kubernetes/hack
2025-10-13 09:47:24 -07:00
..
boilerplate Get rid of most references to GOPATH 2024-02-29 22:06:51 -08:00
conformance e2e: remove redundant spaces in test names 2023-09-29 08:30:57 +02:00
e2e-internal hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
gen-swagger-doc Bash script syntax improvements 2019-01-19 13:58:58 +01:00
jenkins drop spammy xtrace from hack/test scripts 2025-08-28 12:21:01 -07:00
kube-api-linter Enable SSATags linter to enforce +listType on lists in APIs 2025-09-19 13:57:07 +01:00
lib Merge pull request #133870 from pohly/build-data-race-detection 2025-10-08 12:57:01 -07:00
make-rules drop automaxprocs hacks now that go 1.25 handles this built in 2025-09-17 16:36:15 -07:00
testdata update pause version to 3.10.1 2025-07-09 16:38:14 +05:30
tools Bump golangci-lint to 2.4.0 2025-09-18 16:20:34 +02:00
verify-flags kubelet: create top-level traces for pod sync and GC 2023-03-11 10:42:14 +01:00
.descriptions_failures Add missing comments in k8s.io/api/core/v1 2024-11-07 18:42:33 -08:00
.import-aliases scheduler: remove deprecated v1beta2 KubeSchedulerConfiguration 2023-08-17 13:27:21 +08:00
.spelling_failures Add gimme 2023-02-01 16:34:23 -05:00
_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 chore: Update apidiff.sh script description 2024-12-16 13:44:48 -08:00
benchmark-go.sh add comment in several hack/ sh scripts. 2020-01-27 11:13:09 +09:00
build-cross.sh add comment in several hack/ sh scripts. 2020-01-27 11:13:09 +09:00
build-go.sh add comment in several hack/ sh scripts. 2020-01-27 11:13:09 +09:00
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 fix shellcheck failure 2019-01-22 08:39:55 +08:00
dev-build-and-up.sh fix shellcheck failure 2019-01-22 08:39:55 +08:00
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 add comment in several hack/ sh scripts. 2020-01-27 11:13:09 +09:00
generate-docs.sh fix some shellcheck failures in hack 2019-02-25 11:38:56 +08:00
get-build.sh fix: use dl.k8s.io, not kubernetes-release bucket 2023-05-13 10:57:41 +00:00
ginkgo-e2e.sh test: automatically lower Ginkgo parallelism when using race detection 2025-09-16 20:25:53 +02:00
golangci-hints.yaml Migrate sample-device-lugin to contextual logging 2025-09-28 21:13:41 +03:00
golangci.yaml Migrate sample-device-lugin to contextual logging 2025-09-28 21:13:41 +03:00
golangci.yaml.in Merge pull request #133571 from BenTheElder/deprecated-missing-oh-no 2025-08-27 18:30:53 -07:00
grab-profiles.sh Fix exit code check in hack/grab-profiles.sh 2021-05-17 14:47:05 +08:00
install-etcd.sh install-ectd.sh: brace PATH and suggest user export 2025-03-13 11:23:53 -07:00
install-protoc.sh Add helper script to install protoc 2023-01-26 18:00:08 -05:00
lint-dependencies.sh Add guard for dependencies recursively depending on kubernetes or staging modules 2024-09-04 16:58:04 -04:00
list-feature-tests.sh Add comments in several hack/*.sh 2020-01-28 09:27:40 +09:00
local-up-cluster.sh Validate kubelet serving cert in local-up-cluster 2025-09-08 16:12:21 -04:00
logcheck.conf Migrate sample-device-lugin to contextual logging 2025-09-28 21:13:41 +03:00
module-graph.sh Make sure the _output folder exists before using it from module-graph.sh 2020-07-07 01:19:59 -07:00
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 Remove invalid comments in hack/lib/version.sh 2022-07-06 19:19:29 +08:00
README.md add README.md in hack/ 2020-01-16 10:12:18 +08:00
run-prometheus-on-etcd-scrapes.sh Add serving of scrapes as Prometheus metrics 2021-11-08 15:28:05 -05:00
serve-prom-scrapes.sh Fixed typo in hack/serve-prom-scrapes.sh 2022-02-04 01:33:06 -05:00
test-go.sh Add comments in several hack/*.sh 2020-01-28 09:27:40 +09:00
unwanted-dependencies.json Regenerate vendor 2025-10-08 14:28:41 -04:00
update-all.sh refactor(hack): use ${BASH_SOURCE[0]} to get script name 2022-04-16 23:58:13 +08:00
update-codegen.sh remove defunct comments about updating copy_output 2025-10-13 09:47:24 -07: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 feat: Refactors featuregate lifecycle management script 2025-03-13 21:57:21 +00: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 remove the rest of the bazel test wiring for metrics stability 2021-02-05 10:48:48 -08:00
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 i18n: Fix bug where package-level variables are not translated. 2022-11-21 22:48:42 -05:00
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 refactor(hack): use ${BASH_SOURCE[0]} to get script name 2022-04-16 23:58:13 +08:00
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-api-lint.sh Implement validation-gen lint for CI 2025-03-21 08:20:04 -07:00
verify-boilerplate.sh Add comments in several hack/verify-*.sh 2020-01-16 13:54:58 +09:00
verify-cli-conventions.sh Make hack scripts use go install and assume PATH 2024-02-29 22:07:32 -08:00
verify-codegen.sh hack: move common "verify generated" shell code into function 2023-08-22 20:39:23 +02:00
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 verify: additional validation of e2e.test --list-images output 2025-06-25 10:30:45 +02:00
verify-e2e-test-ownership.sh declare and assign seperately in hack/verify-e2e-test-ownership.sh 2022-10-19 23:46:18 -07:00
verify-external-dependencies-version.sh update zeitgeist to v0.5.4 2024-10-21 09:57:12 +02:00
verify-featuregates.sh feat: Refactors featuregate lifecycle management script 2025-03-13 21:57:21 +00: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 remove the rest of the bazel test wiring for metrics stability 2021-02-05 10:48:48 -08:00
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 hack: move common "verify generated" shell code into function 2023-08-22 20:39:23 +02:00
verify-licenses.sh Rename new::setup_env back to setup_env 2024-02-29 22:06:44 -08:00
verify-mocks.sh hack: move common "verify generated" shell code into function 2023-08-22 20:39:23 +02:00
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 add verify script to catch most validation mutations 2021-10-08 14:37:55 -04:00
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 remove unnecessary kube::golang::verify_go_version calls 2023-09-11 14:06:28 -07:00
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 kubelet: Force deleted pods can fail to move out of terminating 2023-03-08 22:03:51 -06:00
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 Add comments in several hack/verify-*.sh(s-v) 2020-01-21 19:10:46 +09:00
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 Add linter to report on unsorted feature gates 2025-06-27 11:05:13 -04:00
verify-test-images.sh Add comments in several hack/verify-*.sh(s-v) 2020-01-21 19:10:46 +09:00
verify-testing-import.sh hack: configure Go environments where necessary 2024-09-26 23:32:33 +02:00
verify-typecheck.sh Fix for typecheck doesn't notice compile errors in test files 2024-07-04 15:01:41 -04:00
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.