10488 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
3a8af5a174 Merge pull request #131459 from BenTheElder/codegen-streamline
automatically setup hack/update-codegen.sh dependencies
2025-04-25 03:58:30 -07:00
Josh Gwosdz
7a24c4ce5d chore: update github.com/google/cel-go dependency to v0.25.0
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>
2025-04-25 10:07:12 +02:00
Benjamin Elder
d5bf33e7d7 update-codegen.sh: automatically install protoc 2025-04-24 22:54:09 -07:00
Benjamin Elder
8a2f367ec3 automatically install goimports when running update-codegen 2025-04-24 22:54:09 -07:00
Benjamin Elder
1473aeaac4 add goimports to tools module
used by go-to-protobuf, currently we rely on the host copy ...
2025-04-24 22:54:09 -07:00
Benjamin Elder
08794974b7 track gopkg.in/yaml.v3 as an unwanted depdendency
this repo (which also has yaml.v2) was archived

we have a fork of it already in sigs.k8s.io/yaml/goyaml.v3
2025-04-24 15:02:29 -07:00
Kubernetes Prow Robot
77b0410114 Merge pull request #131322 from BenTheElder/etcd-log-noise-2
reduce etcd install log noise in test-integration-dockerized.sh
2025-04-23 19:30:44 -07:00
Kubernetes Prow Robot
f24f73f005 Merge pull request #131066 from pohly/test-e2e-ginkgo-wait-fix
hack/ginkgo-e2e.sh: fix misplaced brackets
2025-04-23 19:30:36 -07:00
Kubernetes Prow Robot
077a382170 Merge pull request #131242 from zhifei92/update-mockery-version
Upgrade the mockery version to v2.53.3
2025-04-23 17:09:43 -07:00
Kubernetes Prow Robot
695e59cc14 Merge pull request #130981 from thockin/kk_hack_verify_api_lint
Add a verify script for codegen lint
2025-04-23 13:32:05 -07:00
Kubernetes Prow Robot
9d1363eff6 Merge pull request #130852 from Chulong-Li/contextual-logging
Migrate pkg/kubelet/status to contextual logging
2025-04-23 13:31:43 -07:00
Benjamin Elder
3fcb26f017 reduce etcd install log noise 2025-04-15 15:18:22 -07:00
zhangzhifei16
c1ff9cf4e8 chore: Upgrade the mockery version to v2.53.3. 2025-04-10 21:16:47 +08:00
joshjms
24edc6e90f Update etcd to 3.5.21
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-04-02 02:16:38 +08:00
Kubernetes Prow Robot
070f0ad3bd Merge pull request #129970 from mortent/AddResourceV1beta2API
Add resource v1beta2 API
2025-03-26 09:10:47 -07:00
Morten Torkildsen
39507d911f Add resource v1beta2 API 2025-03-26 14:41:09 +00:00
Patrick Ohly
3067bbfe15 hack/ginkgo-e2e.sh: fix misplaced brackets
If the script got killed, it failed to wait properly:

    Waiting for Ginkgo with pid 73873...
    ./hack/ginkgo-e2e.sh: line 236: wait: `{73873}': not a pid or valid job spec
2025-03-26 12:10:23 +01:00
Tim Hockin
252d584cb7 Implement validation-gen lint for CI
Results in errors like:

```
$ ./hack/verify-api-lint.sh
+++ [0317 09:00:04] Generating validation code for 69 targets
F0317 09:00:05.637556 1049736 targets.go:363] lint failed:
  type k8s.io/api/core/v1.PodAffinityTerm:
    field LabelSelector: conflicting tags: {+k8s:optional, +k8s:required}: fields cannot be both optional and required
    field Namespaces: conflicting tags: {+default, +k8s:required}: fields with default values are always optional
!!! [0317 09:00:05] Call tree:
!!! [0317 09:00:05]  1: hack/update-codegen.sh:1132 codegen::validation(...)
```
2025-03-21 08:20:04 -07:00
Kubernetes Prow Robot
61572d7a7b Merge pull request #130948 from BenTheElder/log-spam
CI integration scripts: reduce log noise from installing etcd
2025-03-20 17:10:38 -07:00
Kubernetes Prow Robot
3ac21c1a1c Merge pull request #130938 from pohly/test-gotestsum-format
test: switch gotestsum quiet output format
2025-03-20 14:16:47 -07:00
Benjamin Elder
3b3df8ba72 CI integration scripts: reduce log noise from installing etcd 2025-03-20 11:59:32 -07:00
Chulong Li
d868eeb088 Migrate pkg/kubelet/status to contextual logging
Update with logger from context

Fix nil pointer issue in TestUpdateReadiness
2025-03-20 21:58:14 +08:00
Patrick Ohly
2a9a3ea827 test: switch gotestsum quiet output format
"--format standard-quiet" shows log output on stderr (= klog logging) if it
occurs outside of a test (= test has leaked something). That is inconsistent
with "go test" without -v and a problem for pull-kubernetes-unit because many
tests do not clean up properly.

"pkgname-and-test-fails" hides the extra output and seems similar enough:

       pkgname-and-test-fails   print a line for each package and failed test output

    $ gotestsum --format pkgname-and-test-fails ./test/internal/logging --count=1
    ✓  test/internal/logging (5.007s)

    DONE 1 tests in 5.384s
2025-03-20 12:09:44 +01:00
Francesco Romani
3c7ed00e22 node: kep-2625: cpu manager policy options GA
Move the support for CPUManager Policy Options to GA

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-20 08:31:32 +01:00
yongruilin
7b5cbbb961 chore: Remove unused unversioned feature gate map by consolidating feature gate files 2025-03-19 20:02:53 +00:00
Keita Mochizuki
07a275437f kubectl debug: Display a warning message that the debug container's capabilities may not work with a non-root user (#127696)
* Add warning message about capabilities of debug container

* fix1

* fix2

* fix3
2025-03-19 00:50:30 -07:00
Kubernetes Prow Robot
c79e13c177 Merge pull request #130821 from BenTheElder/revert-procs
Revert "stop overriding max concurrency in CI, let automax procs handle it
2025-03-14 12:32:07 -07:00
Kubernetes Prow Robot
8e147365a8 Merge pull request #130803 from siyuanfoundation/owner
chore: Add update-featuregates to update.sh
2025-03-14 12:31:53 -07:00
Benjamin Elder
cf20c21ef8 Revert "stop overriding max concurrency in CI, let automax procs handle it"
This reverts changes from commit 9e42056a0d.

NOTE: this is not a clean revert bcause of further changes.
2025-03-14 09:42:04 -07:00
Kubernetes Prow Robot
b00f88e3b5 Merge pull request #129414 from yongruilin/compatibility-version-featuregate
feat: Refactors featuregate lifecycle management script
2025-03-13 18:55:46 -07:00
Kubernetes Prow Robot
129661b2c7 Merge pull request #130760 from BenTheElder/cleanup-integration
Cleanup CI integration scripts
2025-03-13 16:05:53 -07:00
Siyuan Zhang
a9514b0591 Add update-featuregates to update.sh
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-03-13 15:53:06 -07:00