Commit Graph

9838 Commits

Author SHA1 Message Date
Jordan Liggitt
819d1903a2
Add support for authorization-config to local-up-cluster 2023-11-08 14:36:05 -06:00
Mohamed Omar Zaian
3c268b7524 etcd: Update to version 3.5.10 2023-11-02 10:30:41 +01:00
Kubernetes Prow Robot
9e84a02950
Merge pull request #121672 from pohly/golangci-lint-comment-check-fix
golangci-lint: tone down comment checking
2023-11-01 17:47:45 +01:00
Patrick Ohly
248100ce6d golangci-lint: tone down comment checking
39df946c06 was meant to enable stricter comment checking only for cmd/kubeadm
because the maintainers of that want that. However, the exclude rule didn't
capture all possible error texts and therefore some checks were enabled across
the entire code base.

The extended pattern is now based on the golangci-lint source code.

Also, the hint config didn't suppress any of these checks.
2023-11-01 14:59:28 +01:00
guangli.bao
bc1df9e7da bump to newest etcd: v3.5.10
Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
2023-11-01 11:59:31 +08:00
Davanum Srinivas
bd233a2aa5
typo/api change in cadvisor / updated unwanted-dependencies.json
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-31 14:30:57 -04:00
Kubernetes Prow Robot
84fb7b5ce0
Merge pull request #121504 from pohly/golangci-lint-godoc
golangci-lint: enable doc comment checking for cmd/kubeadm
2023-10-31 12:09:17 +01:00
Abu Kashem
b24dd44904
apiserver: enable apf v1 API 2023-10-30 07:48:22 -04:00
Kubernetes Prow Robot
de4aa52171
Merge pull request #121476 from pohly/golangci-lint-update
golangci-lint v1.55.1
2023-10-27 17:43:21 +02:00
Kubernetes Prow Robot
a5ac4be4d0
Merge pull request #121549 from pohly/verify-file-sizes
verify-file-sizes.sh: ensure that no large binary files get added
2023-10-27 16:05:41 +02:00
Kubernetes Prow Robot
fd5c406112
Merge pull request #120933 from mengjiao-liu/contextual-logging-scheduler-remaining-part
kube-scheduler: convert the remaining part to use contextual logging
2023-10-27 10:30:58 +02:00
Patrick Ohly
b6afba18fb verify-file-sizes.sh: ensure that no large binary files get added
We recently had an accident were a 64MB executable got included in a PR and
wasn't caught during the manual review. This new verify script would have
caught that file.

The maximum file size is 10MB. This is intentionally low. If some legitimate
file needs to be added that is larger, then an entry in a .ignorefilesize file
in the directory of the large file can exclude that file from the check.
2023-10-26 20:08:09 +02:00
Patrick Ohly
27f6fb2fa7 hack/tools: golangci-lint v1.55.1
No particular reason for updating to it besides staying up-to-date. The new
checks in the updated ginkgolinter found issues.
2023-10-26 15:32:43 +02:00
Kubernetes Prow Robot
d0084356b3
Merge pull request #121338 from dims/working-otel-bump
Bump otel and other dependencies for CVE-2023-45142
2023-10-26 08:34:47 +02:00
Davanum Srinivas
702d911e22
working-config-otel
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-25 16:31:21 -04:00
Patrick Ohly
39df946c06 golangci-lint: enable doc comment checking for cmd/kubeadm
Some code owners might want this for specific packages, like cmd/kubeadm.

This cannot be enabled for everything because:
- a lot of existing code doesn't pass (-> can't be in base config)
- a lot of packages don't need it (-> shouldn't even be a hint)
2023-10-25 12:30:28 +02:00
Patrick Ohly
d20edf697a verify-golangci-lint.sh: support arbitrary GOBIN
The in-tree configs use a relative path to find logcheck.so. This is useful
because then the invocation of golangci-lint also works outside of the script.
But when running with a containerized build, GOBIN points somewhere else. For
that case, a temporary copy of the configuration has to be created with an
absolute path.
2023-10-25 09:25:53 +02:00
Mengjiao Liu
2cea51221a hack/logcheck.conf: enable contextual logging in kube-scheduler 2023-10-24 17:56:59 +08:00
Jonathan Gonzalez V
a7adde53be
bump golang.org/grpc to v1.56.3
Bumping golang.org/grpc in light of CVE-2023-44487.

Signed-off-by: Jonathan Gonzalez V <jonathan.abdiel@gmail.com>
2023-10-19 15:20:07 -03:00
Davanum Srinivas
757597fabf
track unmaintained repo - mailru/easyjson
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-16 16:49:50 -04:00
Kubernetes Prow Robot
4c8fca2f06
Merge pull request #112894 from pohly/e2e-framework-test-labels
e2e framework: test labels
2023-10-13 02:40:43 +02:00
Kubernetes Prow Robot
5faebe11b4
Merge pull request #120562 from ArkaSaha30/govulncheck-script
Add govulncheck script to expose go vulnerabilities
2023-10-12 18:50:19 +02:00
John Howard
dc334b953d
dependencies: update otel-go dependencies 2023-10-10 19:16:07 +00:00
Patrick Ohly
535ab74346 e2e framework: track and report internal bugs
If something goes wrong during the test registration phase, the only solution
so far was to panic. This is not user-friendly and only allows to report one
problem at a time.

If initialization can continue, then a better solution is to record a bug,
continue, and then report all bugs together.

This also works when just listing tests. The new verify-e2e-suites.sh uses that
to check all test suites (identified as "packages that call
framework.AfterReadingAllFlags", with some exceptions) as part of
pull-kubernetes-verify.

Example output for a fake

    framework.RecordBug(framework.NewBug("fake bug during SIGDescribe", 0))

in test/e2e/storage/volume_metrics.go:
```
$ hack/verify-e2e-suites.sh
go version go1.21.1 linux/amd64
ERROR: E2E test suite invocation failed for test/e2e.
   ERROR: E2E suite initialization was faulty, these errors must be fixed:
   ERROR: test/e2e/storage/volume_metrics.go:49: fake bug during SIGDescribe
E2E suite test/e2e_kubeadm passed.
E2E suite test/e2e_node passed.
```
2023-10-10 18:15:46 +02:00
Patrick Ohly
f538be659c hack: fix update of golangci-lint verify scripts
b190ea0c9 accidentally enabled verify-golangci-lint-pr-hints.sh (non-blocking!)
in the normal "make verify" (blocking!).
2023-10-10 09:03:20 +02:00
Patrick Ohly
b190ea0c96 hack: update golangci-lint verify scripts
Instead of invoking verify-golangci-lint.sh directly from Prow jobs,
those Prow jobs should use "make verify WHAT=...". The advantage is
that the common code for running verify targets will be used, which
includes producing JUnit files.

Providing simple wrappers for strict linting of PRs (=
verify-golangci-lint-pr.sh) and event stricter linting of PRs with hints
enabled (= verify-golangci-lint-pr-hints.sh) enables those WHAT targets.
2023-10-09 20:14:47 +02:00
Kubernetes Prow Robot
f19b62fc09
Merge pull request #120959 from pohly/e2e-test-whitespace-cleanup
e2e: remove redundant spaces in test names
2023-10-05 00:41:59 +02:00
Kubernetes Prow Robot
f936f69cf9
Merge pull request #120729 from pohly/events-context
k8s.io/client-go/tools/[events|record]: support context
2023-10-04 15:45:16 +02:00
Kubernetes Prow Robot
56f330493c
Merge pull request #120822 from akhilerm/change-from-deprecated-fields
update rules to switch from deprecated dir field
2023-10-04 14:00:38 +02:00
Anish Ramasekar
2f5708833a
[KMSv2] pkcs11 reference implementation using SoftHSM
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-09-29 16:57:26 +00:00
Patrick Ohly
0e8a1f1816 e2e: remove redundant spaces in test names
The spaces are redundant because Ginkgo will add them itself when concatenating
the different test name components. Upcoming change in the framework will
enforce that there are no such redundant spaces.
2023-09-29 08:30:57 +02:00
ArkaSaha30
7437ad2617
Add/update prechecks to verify-govulncheck.sh
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-09-27 21:05:17 +05:30
Patrick Ohly
27a68aee3a k8s.io/client-go/tools: support context for event recording
Using StartRecordingToSinkWithContext instead of StartRecordingToSink and
StartLogging instead of StartStructuredLogging has several advantages:

- Spawned goroutines no longer get stuck for extended periods of
  time during shutdown when passing in a context that gets canceled.
- Log output can be directed towards a specific logger instead of the global
  default, for example one which writes to a testing.T instance.
- The new methods return an error when something went wrong instead of
  merely recording the error.

That last point is the reason for deprecating the old methods instead of merely
adding new alternatives.

Setting a context when constructing an EventBroadcaster makes calling Shutdown
optional. It can also be used to specify the logger.

Both EventRecorder interfaces in tools/events and tools/record now have a
WithLogger helper. Using that method is optional, but recommended to support
contextual logging properly. Without it, errors that occur while emitting an
event are not associated with the caller.
2023-09-27 09:06:09 +02:00
Kubernetes Prow Robot
ca1371ebfa
Merge pull request #120423 from saschagrunert/gci-mounter-static
Document `cluster/gce/gci/mounter` as static binary
2023-09-26 06:50:00 -07:00
Akhil Mohan
2ce4f85a46
update verify script to check deprecated fields
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-09-25 21:37:40 +05:30
Joseph Anttila Hall
1b602ffd9a
Bump Konnectivity to 0.28.0 2023-09-22 13:10:24 -07:00
Arka Saha
9e34aa306c
Update hack/verify-govulncheck.sh
Co-authored-by: LX <hwdefcom@outlook.com>
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-09-13 12:58:33 +05:30
Kubernetes Prow Robot
921fd1b6fa
Merge pull request #120312 from HirazawaUi/cni-auto-arch-select
Add automatic arch and os selection for the deploy cni plugin
2023-09-12 07:48:13 -07:00
Kubernetes Prow Robot
14ed7e8609
Merge pull request #120579 from BenTheElder/cleanup
remove unnecessary kube::golang::verify_go_version calls
2023-09-11 22:16:15 -07:00
Kubernetes Prow Robot
95c6295636
Merge pull request #120279 from BenTheElder/gotoolchain
handle GOTOOLCHAIN in kube::golang::verify_go_version
2023-09-11 17:04:10 -07:00
Benjamin Elder
7ad0e451ac remove unnecessary kube::golang::verify_go_version calls
These scripts don't use go, GOPATH, etc.

They only need to cd to KUBE_ROOT and run git/grep. verify_go_version is wasting time.
2023-09-11 14:06:28 -07:00
Benjamin Elder
d1b5a9953a handle GOTOOLCHAIN in kube::golang::verify_go_version
for now:
- shim FORCE_HOST_GO to GOTOOLCHAIN=local
- treat GOTOOLCHAIN set and !=auto like FORCE_HOST_GO
- otherwise set GOTOOLCHAIN=go${GO_VERSION} and fallback to gimme if necessary

TODO: set toolchain statements in go.mod files and keep them in sync
2023-09-11 12:04:45 -07:00
ArkaSaha30
190f9d0d4b
Add govulncheck script to expose go vulnerabilities
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-09-11 16:34:50 +05:30
HirazawaUi
c1a0aa08e3 Add cni plugin auto Arch and OS selection 2023-09-09 20:33:12 +08:00
Kubernetes Prow Robot
9068bec08e
Merge pull request #120454 from pohly/golangci-lint-hint-deprecated
golangci-lint: warn about deprecated APIs only as hints
2023-09-08 00:32:25 -07:00
SataQiu
dbd3eb5419 remove logcheck.yaml 2023-09-07 18:24:13 +08:00
Jordan Liggitt
6cd446a206
Add cloud library to unwanted deps 2023-09-06 21:48:30 -04:00
Jordan Liggitt
9f76d8d45a
Track vendor status of unwanted deps 2023-09-06 21:48:30 -04:00
Patrick Ohly
c4dd16a1f8 golangci-lint: warn about deprecated APIs only as hints
This particualar warning didn't make it into
https://github.com/kubernetes/kubernetes/issues/117288.  Discussion on Slack
concluded that "it's hard to have a universal policy for all functions marked
deprecated" and thus this can only be a hint which must be considered on a
case-by-case basis.

For example, APIs like sets.String are very unlikely to ever go away, therefore
it is entirely up to developers whether they switch to sets.Set even though
sets.String is marked as deprecated.

Ideally, the deprecation message should explain this. It doesn't for sets ("use
generic Set instead"), so a better message in that case would have been
"consider using generic Set instead".
2023-09-06 13:30:51 +02:00
cpanato
67858e1ff0
Bump images, dependencies and versions to go 1.21.0
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-09-06 12:06:51 +02:00