Commit Graph

9818 Commits

Author SHA1 Message Date
Jordan Liggitt
bd36be0218
Make gomaxprocs install optional, limit to tests 2023-08-16 09:33:02 -04:00
Patrick Ohly
9742e276b9 update to golangci-lint v1.54.1 + go-ruleguard v0.4.0
That release is the first one with official support for Go 1.21. go-ruleguard
must be >= 0.3.20 because of
https://github.com/quasilyte/go-ruleguard/issues/449 with Go
1.21. golangci-lint itself doesn't depend on a recent enough release yet, so
this was done manually.
2023-08-16 09:07:30 +02:00
Kubernetes Prow Robot
ad15077193
Merge pull request #119742 from liggitt/unwanted-deps
Catch direct references to unwanted dependencies in kubernetes modules
2023-08-15 21:04:27 -07:00
Jeremy Rickard
ae86051ec5
Bump protoc
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2023-08-07 17:26:05 -06:00
Jordan Liggitt
a5fff9a5d0
Catch direct references to unwanted dependencies in kubernetes modules 2023-08-02 15:44:25 -04:00
Patrick Ohly
4bc9434f99 SSA: prevent usage of Extract calls via forbidigo
Client-side extract calls depend on `managedFields`, which might not be
available. Therefore they should not be used in production code.

They are okay in test files (because the API has to be tested), in the
generated code (because the various type specific APIs still need to be
provided) and in unstructured.go (same reason).
2023-08-02 10:57:51 +02:00
upodroid
1c99f9591b add node-env and instance-type flags to node-e2e tests 2023-07-21 21:46:37 +00:00
Itamar Holder
f37aec6c57 Add LIMITED_SWAP env var to enable limited swap
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-14 14:52:27 +03:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
Mengjiao Liu
19869478c1 Migrate /pkg/controller/disruption to structured and contextual logging 2023-07-12 11:30:45 +08:00
Naman
09849b09cf migrated pkg/controller/endpointslice to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-07-11 01:28:22 +05:30
Kubernetes Prow Robot
10a12165de
Merge pull request #116755 from my-git9/feat/endpoint/logging
Migrated `pkg/controller/endpoint` to contextual logging
2023-07-10 05:37:05 -07:00
Maciej Szulik
3f07fc3acc
Remove long/golang version information making short the default 2023-07-07 18:46:34 +02:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
Kubernetes Prow Robot
91698fe900
Merge pull request #114061 from Octopusjust/k8s-pr15
testutil: use contextual logging
2023-07-05 08:38:57 -07:00
Kubernetes Prow Robot
0235a5a206
Merge pull request #118707 from pacoxu/unwanted-status-order
update the unwanted-dependencies order
2023-07-04 12:20:54 -07:00
Kubernetes Prow Robot
8d4479a58f
Merge pull request #118767 from gxglls/master
fix(script): handle wait_for_success failed condition
2023-06-29 19:43:45 -07:00
Madhav Jivrajani
6fd830a075 hack/tools: bump golangci-lint and consequently staticcheck
This bump is done since the latest version of staticcheck includes
a fix for a false positive reported by us, discovered while bumping
to go1.20

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-06-27 14:20:41 +02:00
Patrick Ohly
1af5425696 hack: disable gomega.Consistently/Eventually check due to false positives
For example, this is a false positive that currently exists in the code base:

    test/e2e_node/dra_test.go:129:4: ginkgo-linter: use a function call in Consistently. This actually checks nothing, because Consistently receives the function returned value, instead of function itself, and this value is never changed; consider using `gomega.Consistently(ctx, e2epod.Get).WithArguments(f.ClientSet, pod).WithTimeout(podInPendingStateTimeout).Should(e2epod.BeInPhase(v1.PodPending),
    	"Pod should be in Pending state as resource preparation time outed")` instead (ginkgolinter)
    			gomega.Consistently(ctx, e2epod.Get(f.ClientSet, pod)).WithTimeout(podInPendingStateTimeout).Should(e2epod.BeInPhase(v1.PodPending),
    			^

It's a false positive because e2epod.Get returns the function that Consistently
is meant to call.

This could be worked around by assigning e2epod.Get(f.ClientSet, pod) to a
variable and then use that variable, but that is less readable.
2023-06-27 14:20:41 +02:00
Kubernetes Prow Robot
28296ba59e
Merge pull request #113994 from mengjiao-liu/contextual-logging-controller-certificates
certificate controller: use contextual logging
2023-06-21 09:03:42 -07:00
ziyin.lu
687ca0e0bb fix(script): handle wait_for_success failed condition
In the wait_node_ready function, two steps are performed:
  1.Check if the node exists
  2.Wait for the node to enter the ready state
If one step fails, the second step should not continue, wasting 300 seconds.
2023-06-20 08:22:26 -04:00
Davanum Srinivas
564c236ce2
Do NOT prepull images for e2e-node jobs
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-19 22:01:12 -04:00
Paco Xu
8cd65e9cee reorder hack/unwanted-dependencies.json map keys and arrays
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-06-18 14:09:57 +08:00
Paco Xu
f44029705f exit 1 if status are not as expected(order)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-06-18 14:09:50 +08:00
Davanum Srinivas
89adbc6e5b
check for AWS environment before running sudo
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-14 14:03:44 -04:00
Ziqi Zhao
7bc449d7e0 add contextual logging to job-controller
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-06-14 13:40:02 +08:00
Kubernetes Prow Robot
cdbdb17934
Merge pull request #118567 from chendave/node_arm_ci
Pass the mandatory parameters to build arm64 binaries
2023-06-13 08:22:11 -07:00
Kubernetes Prow Robot
ecf54b8bd5
Merge pull request #118320 from bart0sh/PR115-cleanup-boilerplate.py
Cleanup boilerpate.py
2023-06-12 09:35:49 -07:00
xin.li
325205efb7 Migrated pkg/controller/endpoint to contextual logging
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-06-11 20:12:07 +08:00
Dave Chen
54cae70678 Pass the mandatory parameters to support testing on ARM64
The parameters are needed to build the test binaries, e.g. `e2e_node.test`
`ginkgo` etc.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-06-08 17:33:37 +08:00
Kubernetes Prow Robot
c831a08c8e
Merge pull request #118253 from saschagrunert/streaming-cri-api
Move `cri/streaming` to `k8s.io/kubelet` staging repository
2023-06-06 14:14:12 -07:00
Kubernetes Prow Robot
f812ac5445
Merge pull request #118349 from bart0sh/PR116-fix-ginkgo-deprecation-warning
Fix ginkgo deprecation warning
2023-06-06 06:59:01 -07:00
Kubernetes Prow Robot
bba9833c39
Merge pull request #118404 from pohly/verify-failures
better JUnit failure messages for golangci-lint and verify in general
2023-06-05 08:31:26 -07:00
Sascha Grunert
db9fcfeed2
Move cri/streaming to k8s.io/kubelet staging repository
Container runtimes like CRI-O and containerd reuse the code by copying
it from Kubernetes. To have a single source of truth for the streaming
server we now move the already isolated implementation to the
k8s.io/kubelet staging repository. This way runtimes can re-use the code
without copying the parts.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-05 08:08:18 +02:00
Patrick Ohly
f4d326a1fc verify: produce JUnit file also for pull-kubernetes-verify-strict-lint
Because this doesn't get invoked through verify.sh, we have to call
logJu ourselves to get a JUnit file. errexit must not be set when
calling logJu, otherwise it does no post-processing.
2023-06-02 17:38:14 +02:00
Jefftree
322968e9b3 Update unwanted dependencies per CI instructions 2023-06-02 14:34:26 +00:00
Patrick Ohly
dbbb21469f verify: pick relevant lines from verify-golangci-lint.sh as failure message
When sh2ju.sh was called to generate the junit_verify.xml, it used to include
the entire output of a failed script twice: once as failure message, once as
log output.

This output can be large and often the actual failure isn't near the top, but
rather at the end or (in the case of the different golangci-lint invocations)
embedded in the log. This makes them hard to see at a glance when looking at
the Prow result page for a job.

Now a verify script can prefix relevant lines with "ERROR: " and then only
those lines are used as failure message in JUnit, without that prefix.

That string was chosen because Prow itself also then picks up those lines when
viewing the entire build log and it is unlikely that some script prints such
lines when they are not meant to be part of the failure.

If some script outputs no such lines, "see stderr for details" is used as
failure message. This is better than before because it avoids the redundancy.
2023-06-02 15:37:50 +02:00
Joe Betz
5c0b59891d Bump cel-go to v0.16.0 2023-05-31 18:36:43 -04:00
Ed Bartosh
c48c4c679a Fix ginkgo deprecation warning
Fixed ginkgo warning
   You're using deprecated Ginkgo functionality:
   =============================================
   --untilItFails is deprecated, use --until-it-fails instead

Used consistent approach with this flag in e2e_node and e2e scripts.
2023-05-31 12:53:11 +03:00
ZhangYu
f9ae3e774d testutil: use contextual logging 2023-05-30 10:07:04 +08:00
Ed Bartosh
534f5edb53 Cleanup boilerpate.py
- reformatted with https://github.com/psf/black
- fixed some of the https://github.com/pylint-dev/pylint warnings
2023-05-30 00:58:32 +03:00
Kubernetes Prow Robot
d05b79c836
Merge pull request #118269 from liggitt/genproto
Update google.golang.org/genproto
2023-05-26 14:43:25 -07:00
Jordan Liggitt
a045fedd02
Update google.golang.org/genproto 2023-05-26 13:20:33 -04:00
Kubernetes Prow Robot
a874f587b4
Merge pull request #118071 from kerthcet/cleanup/use-contextual-logging-in-statefulset
Chore: Apply to use contextual logging for all loggers in statefulSet
2023-05-26 07:56:53 -07:00
Kubernetes Prow Robot
74bd0ecdf4
Merge pull request #118223 from pohly/test-integration-vmodule-removal
integration: remove special verbosity for garbagecollector and graph_builder
2023-05-24 05:24:50 -07:00
Keita Mochizuki
0813904404
Fix: Restricted profile comply with PSS (#117543)
* restricted profile comply with PSA v1.27

* add test case

* Reflect review comments

* Reflect review comments 2

* Reflect review comments 3
2023-05-24 04:16:49 -07:00
Patrick Ohly
d459b4429f integration: remove special verbosity for garbagecollector and graph_builder
The setting for garbagecollector was added 7 years ago in 9ac91e5172 for
"debugging gc".  graph_builder was added 6 years in a98801c1 when restoring the
-vmodule parameter after some temporary removal, without an explanation.

It seems safe to assume that the garbage collector has been debugged
sufficiently...

These defaults cause performance overhead:
- Enabling -vmodule slows down all log calls because checking verbosity
  cannot take a simpler fast path.
- The amount of log output is much higher for those files.

The amount of log data also caused test output to get truncated, removing the
actual test failure explanation.
2023-05-24 10:02:53 +02:00
Kubernetes Prow Robot
12386e2de1
Merge pull request #114053 from brianpursley/fix-update-translations
hack/update-translations.sh: Improve backslash handling
2023-05-23 09:06:29 -07:00
Jordan Liggitt
1b206399f6
fix using stale binaries in local-up-cluster 2023-05-22 20:03:58 -04:00
Kubernetes Prow Robot
2e632c9c28
Merge pull request #118187 from thockin/update-vendor_log_capture_cleanup
Fix update-vendor.sh logging
2023-05-22 15:51:06 -07:00
Tim Hockin
ece68cf833
Fix update-vendor.sh logging
Previously it would corrupt the log when it ran stuff like:
    go mod tidy >> "${LOG_FILE}" 2>&1
because this would reopen the file.  Also, if that failed, the `finish`
function would be called ALSO with output to the log.

Now we let &1 and &2 always be the log, and &11 and &22 are the real
stdout/stderr, which means we have to say that explicitly when we want
output.

No, I cannot do `OUT="&11"` - I would have to use `eval` to make that
work.
2023-05-22 14:51:30 -07:00
Kubernetes Prow Robot
6aa4261405
Merge pull request #118119 from liggitt/grpc-gateway-v1
Mark grpc-gateway v1 as an unwanted dependency
2023-05-18 16:16:33 -07:00
Jordan Liggitt
aa11cc6969
Mark grpc-gateway v1 as an unwanted dependency 2023-05-18 17:41:13 -04:00
Kubernetes Prow Robot
6e8d234bf8
Merge pull request #118073 from jsafrane/support-podman
Support podman for building release images
2023-05-18 11:26:34 -07:00
Jan Safranek
b2eae2f92e Support podman for building release images
podman returns nozero exit code for `docker buildx`, because
it misses a subcommand.

`docker buildx version` should work both in podman and docker. Tested both
with docker-ce-20.10.18 + docker-buildx-plugin-0.10.2 and podman-4.5.0 +
podman-docker.
2023-05-18 14:44:26 +02:00
kerthcet
6b4251c0fd Remove statefulset from logcheck.conf
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-05-18 16:55:19 +08:00
Kubernetes Prow Robot
493fdbb782
Merge pull request #117998 from dims/try-protecting-coredns-from-being-oom-killed
[local-up-cluster] Update docker/containerd/runc versions and capture more logs
2023-05-17 10:36:35 -07:00
Davanum Srinivas
9346237712
Update docker/containerd/runc versions and capture more logs
- use apt to install fresh stuff
- print versions of the components
- throw on debug for docker log
- capture dmesg log
- bump kernel logging

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-17 12:38:52 -04:00
Kubernetes Prow Robot
fb5e9ef3b2
Merge pull request #118076 from liggitt/zeitgeist-isolated
Drop zeitgeist from tools go.mod
2023-05-17 09:34:33 -07:00
Jordan Liggitt
b9950b5192
Drop zeitgeist from tools go.mod 2023-05-17 08:37:53 -04:00
Humble Chirammal
247ea7fc78 use upstream etcd github path instead of redirecting one
In the installation script we use coreos/etcd path which redirect
to etcd-io/etcd. This commit replace the same.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-05-16 20:11:03 +05:30
Humble Chirammal
6616e1f238 update etcd version in install.sh to 3.5.9
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-05-16 20:11:03 +05:30
Kubernetes Prow Robot
31d0821ab4
Merge pull request #117995 from liggitt/discovery-tests
Add tests to capture discovery output
2023-05-16 01:41:43 -07:00
Jordan Liggitt
517c5b75c5
Update unwanted deps 2023-05-15 20:35:58 -04:00
Jordan Liggitt
2ab6fd3590
Capture discovery API output in test fixtures 2023-05-15 14:18:18 -04:00
Kubernetes Prow Robot
6ca4f541d5
Merge pull request #117987 from dims/update-the-cgroups-v2-toleration-in-local-up-cluster
Update the cgroups v2 toleration in local-up-cluster
2023-05-13 10:45:26 -07:00
Kubernetes Prow Robot
9bb6db25fc
Merge pull request #117950 from rjsadow/master
fix: use dl.k8s.io, not kubernetes-release bucket
2023-05-13 06:47:26 -07:00
Ricky Sadowski
8580c116d5 fix: use dl.k8s.io, not kubernetes-release bucket
This PR updates changes related references to the legacy
release bucket, excluding CHANGELOG updates.

Signed-off-by: Ricky Sadowski <richard.j.sadowski@gmail.com>
2023-05-13 10:57:41 +00:00
Davanum Srinivas
196e2f041b
Update the cgroups v2 toleration in local-up-cluster
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-12 17:40:38 -04:00
Kubernetes Prow Robot
8479db5876
Merge pull request #117946 from lavalamp/lavalamp-taking-a-break
lavalamp is taking a long break
2023-05-12 14:34:47 -07:00
Kubernetes Prow Robot
53636bc780
Merge pull request #117914 from dims/stabilize-local-up-cluster-in-our-CI
Stabilize local-up-cluster in our CI
2023-05-12 10:39:01 -07:00
Davanum Srinivas
1168b11875
Stabilize local-up-cluster in our CI
- if binaries are already present skip building them
- install missing packages like nftables and kmod
- work better when cgroups v2 is present
- update to newer CNI version (v1.2.0)
- Ensure we wait for coredns to stabilize
- Grab docker log as well (this has containerd logs too)

Used tips from:
- https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/

Tested locally in an environment as close to CI as possible:
- https://gist.github.com/dims/3c83730c99f61e36b8dd2d61abe68fe7

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-12 09:16:19 -04:00
Kubernetes Prow Robot
a37783467e
Merge pull request #117941 from pohly/logcheck-update
hack/tools: bump logcheck to v0.5.0
2023-05-12 03:02:46 -07:00
Daniel Smith
1ffe3f467e lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
Patrick Ohly
1ea17254bf hack/tools: bump logcheck to v0.5.0 2023-05-11 16:54:26 +02:00
Kubernetes Prow Robot
f319dab8d9
Merge pull request #117899 from thockin/codegen_purge_openapi_shell_indirection
Simpler openapi gen - subprojects do themselves
2023-05-10 09:35:07 -07:00
Kubernetes Prow Robot
626b2db1ca
Merge pull request #117335 from kkkkun/update-etcd-3.5.8
etcd: Update version to 3.5.8
2023-05-10 03:38:59 -07:00
Tim Hockin
6607834207
Use the same report files as before 2023-05-09 19:33:21 -07:00
Tim Hockin
ef796dca9b
Simpler openapi gen - subprojects do themselves
This involves moving the report files, but it allows me to delete the
indirect variable and indirect array code in update-codgen.  As proud as
I was of figuring that out, I am also ashamed of myself for doing it.

This is my atonement.
2023-05-09 16:24:18 -07:00
Tim Hockin
93b2845bec
Codegen: subprojects openapi
Use the "subprojects" aspect of update-codegen to generat openapi for
the subprojects.  Next we can simplify and remove the generic support.

apiextensions-apiserver seems like it was ALWAYS broken:
k8s.io/apiextensions/ doesn't exist, but k8s.io/apiextensions-apiserver
does.

Fixing that causes different openapi results, obviously.
2023-05-09 16:24:17 -07:00
Marko Mudrinić
c8737346db
Export GOMAXPROCS environment variable
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-05-09 15:43:32 +02:00
Kubernetes Prow Robot
c44b2ed0d8
Merge pull request #117342 from kkkkun/update-etcd-deps-3.5.8
upgrade etcd deps to v3.5.8
2023-05-06 06:19:17 -07:00
kkkkun
2ebc0cc025 remove unwantedReferences
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-06 19:41:31 +08:00
kkkkun
c56839c0a1 etcd: Update version to 3.5.8
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-06 17:29:47 +08:00
Davanum Srinivas
a862a5f2d2 Use the right executable ss/netstat in log message
Ensure we log the same command we executed earlier
2023-05-05 20:23:01 +00:00
Kubernetes Prow Robot
bbbf7fd8ad
Merge pull request #117766 from dims/use-the-kubectl-we-built-local-up-cluster
[local-up-cluster] Use the kubectl we built and wait for node to be ready
2023-05-04 06:48:54 -07:00
Davanum Srinivas
5aca41af50
[local-up-cluster] Use the kubectl we built
Also wait for the Node to be ready!

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-04 07:19:23 -04:00
Davanum Srinivas
8524d21bf4
Bump Ginkgo Poll Progress parameters to a sane level
Here's what others in our ecosystem are doing:
https://cs.k8s.io/?q=GINKGO_POLL_PROGRESS_(AFTER%7CINTERVAL)&i=nope&files=&excludeFiles=&repos=

the logs currently are too big partially because of this
incessant output from the progress thingy

When someone wants to debug something, they can use this
set of parameters to something lower to capture these
additional logs.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-04 07:12:15 -04:00
SataQiu
1f7c07f355 scheduler: remove deprecated v1beta2 KubeSchedulerConfiguration 2023-05-03 21:43:19 +08:00
Alexander Zielenski
4721ec7519 include apiextensions types in apiextensions generated openapi
k8s_tag_files_matching looks for a slash after its argument, so the current value doesnt match anything

also update codegen

this is required for apiextensions-apiserver tests. After fixing apiextensions server tests to use type-aware SSA (instead of erroneously using untyped SSA) there were errors since none of the apiextensions types were actually used in the openapi given to tests.
2023-05-01 13:18:44 -07:00
Akhil Mohan
76fe41a996
chore: update cgroups and ttrpc versions
- update github.com/containerd/cgroups to v1.1.0
- update github.com/containerd/ttrpc to v1.2.1

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-04-27 20:46:23 -07:00
Mark Rossetti
4a6bc66e40
updating microsft/go-winio package to latest version
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-04-24 15:32:45 -07:00
Kubernetes Prow Robot
1def77f05c
Merge pull request #117551 from pohly/lint-pull-requests
golangci-lint: allow exceptions for Go naming convention
2023-04-24 09:51:02 -07:00
Patrick Ohly
4169d7d028 golangci-lint: allow exceptions for Go naming convention
In strict mode, stylecheck complains about Convert_* and SetDefaults_*
functions in Kubernetes because they use underscores. We want to allow that to
make the functions more readable.
2023-04-24 15:05:47 +02:00
Benjamin Elder
ed37e6986b uncomment exit trap to cleanup tmpdir 2023-04-21 16:16:53 -07:00
Benjamin Elder
63d44fdde5 retain KUBE_GOPATH on recursive kube::golang 2023-04-21 16:15:21 -07:00
Benjamin Elder
4d736a0435 cleanup update-mocks.sh
- remove unused tempdir
- use mktemp instead of creating tmpfile in repo
- normalize indent
2023-04-21 16:15:21 -07:00
Benjamin Elder
726992f9db call kube::golang::setup_env before setting up worktree 2023-04-21 16:15:21 -07:00
Benjamin Elder
11f3ef1ed7 drop linux/arm build warning, now that 1.27 is released, this is covered by the release notes
dims notes there have been no complaints so far
2023-04-20 15:47:57 -07:00
Kubernetes Prow Robot
aab9a7c262
Merge pull request #116385 from kinvolk/rata/local-up-chown
hack/local-up-cluster.sh: Always sudo chown the certs dir
2023-04-13 00:20:36 -07:00