Commit Graph

10420 Commits

Author SHA1 Message Date
Davanum Srinivas
138e363e41 cleanup shellcheck for temporary HOME directory
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-19 11:48:15 -04:00
Davanum Srinivas
cfff359b41 fix for gimme when $HOME is not writable
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-18 18:01:28 -04:00
Kubernetes Prow Robot
aeaec76893 Merge pull request #132290 from dims/script-to-enforce-dead-code-elimination
add script for verifying dead code elimination
2025-06-17 13:30:52 -07:00
Kubernetes Prow Robot
805898e09c Merge pull request #132241 from BenTheElder/disable-selinux-relabel
disable selinux relabeling when mounting sourcedir to shellcheck
2025-06-17 07:29:01 -07:00
Davanum Srinivas
2a5e4d5582 add script for verifying dead code elimination
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-17 03:35:12 +00:00
Kubernetes Prow Robot
3e39d1074f Merge pull request #132221 from dims/new-cmp-diff-impl
New implementation for `Diff` (drop in replacement for `cmp.Diff`)
2025-06-16 18:02:58 -07:00
Davanum Srinivas
03afe6471b Add a replacement for cmp.Diff using json+go-difflib
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-16 17:10:42 -04:00
Pierre Gimalac
40c718864b chore(apiserver): avoid using html template which disables dce 2025-06-13 15:28:55 +02:00
Kubernetes Prow Robot
0001a8aeff Merge pull request #132210 from dims/add-a-toggle-adding-disabling-grpcnotrace-tag
Adding `grpcnotrace` tag for production (non-debug) builds
2025-06-11 15:58:54 -07:00
Benjamin Elder
b86b4632b3 disable selinux relabeling when mounting sourcedir to shellcheck 2025-06-11 15:35:56 -07:00
Davanum Srinivas
5a2844a766 Update to etcd v3.6.1 in vendor/
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-11 16:46:03 -04:00
Davanum Srinivas
a9108e8f53 Adding grpcnotrace tag for production (non-debug) builds
If someone really wants to do golang diagnostics:
https://go.dev/doc/diagnostics#tracing

then they will only be able to do that in debug builds (`DBG`).

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-11 15:52:40 -04:00
Davanum Srinivas
c85ac59df4 Build k8s using latest commit of golang
Run "gimme master" and use the newly built binaries. Adjust
GOROOT_BOOTSTRAP so we can use the golang that is already
on disk to build the new commit from golang.

To enable this, edit `.go-version` and set the version to
```
devel
```

and then run `make quick-release` (for example)

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-09 17:41:41 -04:00
Kubernetes Prow Robot
d96cfeb7de Merge pull request #132125 from neolit123/1.34-replace-pkg-errors
kubeadm: fix one missed pkg/errors location; drop pkg/errors from go.mod
2025-06-05 13:02:38 -07:00
Stephen Kitt
d1bddfd779 Forbid github.com/pkg/errors in k/k
kubeadm has replaced pkg/errors with an internal implementation, which
means that pkg/errors can be marked as unwanted (once a final
straggler is replaced).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-06-05 18:03:56 +03:00
Patrick Ohly
036f4bfe28 hack: fix KUBE_RACE in benchmark-dockerized.sh
This fixes the following issue in ci-benchmark-scheduler-perf-master:

    malformed import path " ": invalid char ' '

    FAIL	  [setup failed]

Setting the non-empty string with just a space was broken, the right way to
disable the race detector is with an empty KUBE_RACE variable. This worked
before when test-integration.sh unconditionally overwrote the KUBE_RACE
variable and stopped working when 6cb1488 started to keep whatever was
set by the caller.

This then caused an empty string to be passed as additional parameter to "go
test".
2025-06-05 15:08:35 +02:00
Kubernetes Prow Robot
6eaef7b0d6 Merge pull request #131969 from skitt/test-e2e-pkg-errors
test: drop dependency on github.com/pkg/errors
2025-06-04 12:16:38 -07:00
Stephen Kitt
a6e2268994 Ensure github.com/pkg/errors is used only in kubeadm
Now that all other uses have been removed, this configures depguard to
ensure that new ones aren't added outside kubeadm.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-06-02 14:29:38 +02:00
Patrick Ohly
6cb14884b6 test-integration: allow enabling race detection
A job may now enable race detection via KUBE_RACE=-race.
2025-06-02 11:47:42 +02:00
Kubernetes Prow Robot
02eb7d424a Merge pull request #130787 from pohly/test-integration-e2e-suite-removal
hack: remove verify-e2e-suites.sh
2025-05-30 07:36:18 -07:00
Kubernetes Prow Robot
d9c1b4ec9b Merge pull request #131951 from dims/drop-usages-of-deprecated-otelgrpc-methods
Drop usages of deprecated otelgrpc methods (update to v0.60.0)
2025-05-27 10:18:26 -07:00
Kubernetes Prow Robot
4c2a741aac Merge pull request #131964 from skitt/kubectl-pkg-errors
kubectl: drop dependency on github.com/pkg/errors
2025-05-26 11:30:15 -07:00
Davanum Srinivas
7c0f968ab2 Drop usages of deprecated otelgrpc methods
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-05-26 08:32:09 -04:00
Kubernetes Prow Robot
8a0f6370e4 Merge pull request #131941 from dims/update-to-latest-ishidawataru/sctp-dependency
update to latest ishidawataru/sctp dependency
2025-05-26 04:30:29 -07:00
Stephen Kitt
54b2fad033 kubectl: drop dependency on github.com/pkg/errors
The package is unmaintained, and kubectl doesn't rely on the
functionality it provides on top of Golang errors (stack traces).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-05-26 11:28:24 +02:00
joshjms
b461d80f3d etcd: update etcd image to v3.6.0
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-05-26 15:06:50 +08:00
Davanum Srinivas
1ffda045cb update to latest ishidawataru/sctp dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-05-23 07:44:49 -07:00
Kubernetes Prow Robot
d202031fe0 Merge pull request #131871 from dims/add-a-list-of-modules-that-should-be-pinned-at-current-versions
Add a list of modules that should be pinned at current versions
2025-05-20 16:10:34 -07:00
Davanum Srinivas
c509e22d11 Add a list of modules that should be pinned at current versions
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-05-20 18:05:57 -04:00
Kubernetes Prow Robot
b6c0d7de96 Merge pull request #131561 from JoelSpeed/add-kube-api-linter
Add kube-api-linter verify scripts
2025-05-20 14:44:33 -07:00
Patrick Ohly
d3afe8a87e hack/local-up-cluster.sh: remove kubelet --cloud-config
c0b2f341a7 removed that flag, which was already
deprecated earlier. When passing it now, kubelet fails to come up.
2025-05-19 09:20:54 +02:00
Davanum Srinivas
5def7fadf3 Drop dependency on x/exp package in mount_linux_test.go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-05-16 20:46:55 +00:00
Joel Speed
2f50d0a510 Add kube-api-linter plugin to golangci-lint 2025-05-16 16:04:15 +01:00
Jordan Liggitt
cf0bbf1171 bump etcd client to 3.6
hack/pin-dependency.sh go.etcd.io/etcd/api/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/client/pkg/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/client/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/pkg/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/server/v3 v3.6.0

hack/pin-dependency.sh github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0

hack/update-vendor.sh
2025-05-15 21:19:11 -04:00
Benjamin Elder
ef0547741d verify scripts: preserve exit code
these scripts used the result variable pattern but then explicitly exited early with a hardcoded value ....
2025-05-14 21:23:52 -07:00
Kubernetes Prow Robot
c96032addd Merge pull request #131318 from aojea/lock_servicecidr
Lock MultiCIDRServiceAllocator to default and DisableAllocatorDualWrite to GA
2025-05-13 09:51:28 -07:00
Kubernetes Prow Robot
ae2cabc903 Merge pull request #131606 from pohly/golangci-lint@v2-fixes
golangci-lint: some fixes after migration to v2
2025-05-07 11:31:17 -07:00
Antonio Ojea
15ab88f88b remove networking v1alpha1 and make update 2025-05-06 13:29:54 +00:00
hwdef
d52f05dad3 remove hwdef from hack reviewer
Signed-off-by: hwdef <hwdefcom@outlook.com>
2025-05-06 15:26:20 +08:00
Patrick Ohly
2ea4b1aba6 golangci-lint: don't warn about conversion and defaulting functions
The linter suppression got removed in the migration to golangci-lint v2 because
it wasn't triggered for existing code, but as seen in a PR which adds a
conversion package the suppression is still needed.

Furthermore, we also want to suppress for unexported, manually written
conversion and defaulting functions because those follow the same Kubernetes
naming convention.
2025-05-05 13:00:08 +02:00
Patrick Ohly
15d9a93d7c golangci-lint: redirecting stderr raced with termination of script
Redirecting stderr via a pipe raced with handling the result of the
golangci-lint invocation. We need to block the execution until sed has fully
processed all output.

Because of this race, pull-kubernetes-linter-hints jobs failed with "Please
review the above warnings" without actually showing any.
2025-05-05 13:00:08 +02:00
Adrian Moisey
e5ffec242a Bump CNI to 1.7.1 2025-05-04 20:27:09 +02:00
Kubernetes Prow Robot
0b8133816b Merge pull request #131477 from pohly/golangci-lint@v2
golangci-lint v2
2025-05-02 23:03:55 -07:00
Benjamin Elder
b3bf5ed0ee verify-shellcheck.sh: normalize KUBE_ROOT using pwd -P 2025-05-02 15:33:07 -07:00
Benjamin Elder
a1a6208863 use the minimal shellcheck image instead
we don't need any other utils in the image the way the script is currently written, other utils are just a vuln-patch waiting to happen, and make the download larger
2025-05-02 15:33:07 -07:00
Benjamin Elder
e0983dbee8 remove unused shell imports in verify-shellcheck 2025-05-02 14:23:49 -07:00
Patrick Ohly
0faeb5a0d0 golangci-lint: move into hack/tools/golangci-lint
The advantage is that it separates the dependencies of the different tools
better. golangci-lint in particular has many dependencies and is sometimes
sensitive to the exact version being used. This way, "go get" bumps up
dependencies exactly as defined by the upstream golangci-lint module.

It's not quite self-contained because logcheck as a Go plugin for golangci-lint
must be built from the same dependencies. But it only adds one and does not
change any of the others.

While at it, the Go 1.24 "tools" directive gets used instead of the traditional
tools.go approach.
2025-05-02 14:38:09 +02:00
Patrick Ohly
5d9a2f30f2 golangci-lint: finish migration to v2
This finishes the work started in
https://github.com/kubernetes/kubernetes/pull/131113.

Changes:
- Remove TODOs for things that we don't have plans to fix.
- Add issue for older TODO.
- Reorganize and remove suppression rules so that the base check
  has no unused rules.
- Document warn-unused, but don't enable it.
- Remove disabling of statistics (they are useful) and ensure that
  they don't get the ERROR prefix.
- Avoid ../ prefix in paths via `run.relative-path-mode: gomod`.
2025-05-02 14:38:09 +02:00
Matthieu MOREL
4adb58565c chore: bump golangci-lint to v2
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-02 12:51:02 +02:00
Patrick Ohly
8bb7b05637 dependencies: github.com/client9/misspell -> github.com/golangci/misspell
github.com/client9/misspell was archived by the owner on Mar 26, 2025.
The golangci-lint team maintains a fork.

The newer code finds some misspellings which where missed before.
2025-04-28 15:44:04 +02:00