147 Commits
Author SHA1 Message Date
Patrick Ohly 7bec3d14e0 update logcheck to v0.11.0, fix new findings
The updated logcheck now warns about passing a pointer as value where String
could crash if nil. The new findings are false positives, but there have been
real issues before and adding klog.SafePtr is cheap mitigation for false
positives.

The HandleError* wrappers around contextual logging are now annotated such that
the new logcheck knows that they do contextual logging. This revealed some real
issues (expecting printf-style formatting or missing keys, passing a *function*
instead of the function result).
2026-10-29 11:09:47 +01:00
Michael Aspinwall 9f7be5e876 controller-manager: deprecate ControllerClientBuilder.Config and ConfigOrDie
A raw rest.Config lets a controller build a client that bypasses the
client configuration and transport wrappers the controller manager
applies to the clients it builds, such as the leader election write gate
of KEP-6361. Deprecate Config and ConfigOrDie on ControllerClientBuilder
and on the cloud-provider copy of the interface; out-of-tree cloud
providers and controller managers that call them keep working, and the
configs they get still carry the controller manager's wrappers.

Add TypedClientBuilder, implemented by both in-tree builders, with the
clients controllers were building from raw configs: metadata, dynamic
and scale clients, WithRateLimits for controllers that need more QPS and
burst than the defaults, and WithDropManagedFields for the informer
clients. The controller managers hand the builder to their controllers,
and a forbidigo rule keeps in-tree code off the deprecated methods. Unit
tests cover the derived builders on both implementations.

DiscoveryClient's discovery-tuned limits become a floor rather than an
override, so a builder configured with higher limits keeps them; the
storage version migrator relies on that for its discovery client.

The HPA metrics and apiextensions clients still need a config and are
built in one lint-exempted place in the controller context, since
k8s.io/controller-manager does not depend on those client packages.

DynamicControllerClientBuilder cached the composed WrapTransport, so the
base config's wrapper was applied twice to every client after the first
one built under a service account name. Cache only the token wrapper.
2026-10-28 14:29:22 -07:00
Patrick Ohly 8532934eab golangci-lint: verify expected results
Unexpected linter reports are found when verify fails, but accidentally
disabling or breaking a linter check (for example, when editing the
configuration files or updating golangci-lint) could only be detected manually
by adding code which triggers the linter.

Now test cases in hack/testdata/golangci-lint provide expected linter
messages to detect such regressions. The test in test/integration/golangci-lint
verifies that all of them are reported and also fails when there are unexpected
reports for things which we intentionally do not enforce.

The test also verifies that all enabled linters are either covered or
documented as not being tested via "<linter> untested" comments. Stale comments
like that also cause a test failure.
2026-10-16 17:44:04 +02:00
Davanum Srinivas 50f3f436f1 test/images: bump agnhost to 2.66.1, nginx and glibc-dns-testing
Switch e2e tests to the freshly promoted test images:

- agnhost 2.66.1
- nginx 1.27.0-2 and 1.28.0-2
- glibc-dns-testing 2.1.1

Promoted in kubernetes/k8s.io#9787 and kubernetes/k8s.io#9788.
All four tags verified live on registry.k8s.io with digests
matching the promotion manifests.

The agnhost bump follows build/dependencies.yaml refPaths: the
manifest.go config, the kitten and nautilus BASEIMAGE files, and
the yaml fixtures that hardcode the tag.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-07-29 13:28:20 -07:00
suii2210 5e8541f445 test/images/agnhost: update image references 2026-07-05 07:21:22 +00:00
Jitesh Kumar 7bc0a4a16d test/images/agnhost: bump to 2.65.0
The new version includes a generic /envvar endpoint in netexec that
reads any named environment variable, enabling e2e tests to retrieve
spec.nodeName via the Downward API instead of relying on os.Hostname().

Ref: https://github.com/kubernetes/k8s.io/pull/9608
Signed-off-by: Jitesh Kumar <jiteshkumardj@gmail.com>
2026-06-16 00:05:07 +05:30
Amritansh Amritansh 64915c6459 Promote agnhost e2e test image to 2.64.0 2026-06-10 14:18:35 +05:30
Lubomir I. Ivanov bc2179d882 pause: fix version drift in various files
The latest pause version is 3.10.2 but due to the introduction
of the PATCH level version to the pause image (previously was
only MAJOR.MINOR), various files have remained on an older
version. Either 3.10 or 3.10.1. Our validation with
build/dependencies.yaml ./hack/verify-external-dependencies.sh
did not account for that.
2026-04-03 16:11:09 +02:00
Omer Aplatony 201fe11b03 Promote agnhost image to 2.63.0
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-02-05 17:21:34 +00:00
Davanum SrinivasandClaude Opus 4.5 9dda58194a Update agnhost to 2.61 and etcd to 3.6.7-0 in test manifests
Update outdated image versions across test manifests and add tracking
to build/dependencies.yaml for version drift detection via zeitgeist:

- agnhost: 2.32/2.53/2.54/2.57 → 2.61 (latest)
- etcd: 3.2.24 → 3.6.7-0
- kitten/nautilus BASEIMAGE: agnhost 2.57 → 2.61

and added etcd statefulset reference to existing etcd entry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-18 20:39:57 -05:00
ArkaSaha30 621482d68b update pause version to 3.10.1
This commit will update the pause version to 3.10.1 as per thread: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1741674313893029

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2025-07-09 16:38:14 +05:30
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
David Eads 55ba8b2cbb add --subresource to kubectl apply 2024-10-02 13:28:29 -04:00
HirazawaUi c29a19610a add tests 2024-06-26 01:07:24 +08:00
Lubomir I. Ivanov 5e290ebc90 switch k/k to pause version 3.10 2024-05-24 10:02:51 +03:00
mochizuki875 b63fa1300c Add keep options 2024-05-16 17:26:20 +00:00
Davanum Srinivas 2431a964af Drop hack/verify-govet-levee
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-04 21:06:52 -05: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
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
Mark Rossetti 534f052a8d Updating pause image refernces to 3.9
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-11-14 10:24:54 -08:00
Sascha Grunert f9707064cf Remove CRI v1alpha2
After the removal of dockershim we can finally also drop support for CRI
v1alpha2.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-11-03 09:13:43 +01:00
Mark Rossetti 40f3e624a6 Switching everything to use pause:3.8
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-07-21 14:53:15 -07:00
Davanum Srinivas 50bea1dad8 Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Davanum Srinivas f7ad09c447 Switch to pause 3.7
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-29 15:36:38 -04:00
Kevin Delgado fe3772890f add server-side validation support to kubectl 2022-03-26 03:45:13 +00:00
Kubernetes Prow Robot 19935de5a9 Merge pull request #107410 from margocrawf/master
Ensure static certs in kubeconfig override exec plugin
2022-03-08 11:34:21 -08:00
Margo Crawford f015fd66ce Check whether static cert is already configured in UpdateTransportConfig
- Also update test-cmd.sh to pass a signing ca to the kube controller
  manager, so CSRs work properly in integration tests.

Signed-off-by: Margo Crawford <margaretc@vmware.com>
2022-03-07 13:54:32 -08:00
Kubernetes Prow Robot a47c65929a Merge pull request #107810 from zlabjp/levee-v1-secret
Add v1.Secret to go-flow-levee analysis targets
2022-02-15 14:19:18 -08:00
Eddie Zaneski 040d575e9f Update sig-cli OWNERS
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2022-02-14 10:55:35 -07:00
Takashi Kusumi 3b9aeb0267 Add v1.Secret to go-flow-levee analysis targets 2022-01-27 11:59:35 +09:00
Arda Güçlü 43d8b3459b Add manually invalidate cache documentation into delete
When CRDs are deleted, discovery local cache is not invalidated.
This brings about `resource not found` error when new CRD with same name is created
with different fields(ie. changing scope from cluster-wide to namespaced).
Because this already deleted CRD still stays in serverresources.json and kubectl tries to use it.

This local cached files have 10 minutes TTL. After deletion, if user waits 10 minutes,
files will be expired and deleted and there will be no errors. However, 10 minutes is a long time
and cache needs to be invalidated after deletion occurs.

This PR adds a document into delete command by noting that there might be a need to invalidate discovery
cache when CRD is deleted. In addition to that this PR adds a test to catch this behavior.
2022-01-26 09:01:46 +03:00
Davanum Srinivas 9405e9b55e Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Claudiu Belu 18936d4785 updates pause image references
The pause:3.6 image has been published.

Also updates older / incorrect references.
2021-08-29 21:50:05 -07:00
Caleb WoodbineandClaudiu Belu bbb368b701 Update e2e test images url
Removes any reference from the registry gcr.io/kubernetes-e2e-test-images in
kubernetes/kubernetes, replacing it with k8s.gcr.io/kubernetes-e2e-test-images.
In some cases, the images had to be updated since a few things have changed since
their original implementation, most notably being the fact that some of the images
have been centralized into the agnhost image.

Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-07-27 22:01:43 -07:00
Michaël Lévesque-Dion a94aa0ea9a Update version of go-flow-levee for verify-govet-levee check. 2021-06-08 12:02:46 -04:00
Chok Yip Lau e43e9696cc Fixed sort-by not sorting Resources as expected 2021-05-25 21:37:52 -04:00
Sascha Grunert b167fc24d7 Update pause image to v3.5
Update dependencies and the test images to use pause 3.5. We also
provide a changelog entry for the new container image version.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-05-25 09:04:46 +02:00
David Eads ad0cff7b61 add --all-namespaces to kubectl annotate,label 2021-04-26 13:04:19 -04:00
David Eads 2fb8420756 update test-cmd to avoid removed beta APIs 2021-04-19 10:06:37 -04:00
Kubernetes Prow Robot e9115a041c Merge pull request #97168 from PurelyApplied/levee-config-owned-by-sig-security
Transfer ownership of logging analysis configuration to sig-security.
2021-03-09 16:07:17 -08:00
pacoxu 0c152cbbbe update pause to 3.4.1 for tests(e2e)
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-05 21:32:53 +08:00
pacoxu 8811275ea4 update pause image 3.4.1 for hack testdatas only
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-01 15:09:25 +08:00
Patrick Rhomberg 42fb39f116 Use full aliases. Add sig/security label. 2020-12-09 23:43:48 +00:00
Patrick Rhomberg 3559d752e3 Transfer ownership of logging analysis configuration to sig-security. 2020-12-09 19:15:46 +00:00
Patrick Rhomberg a3d483e965 Update cross-referencing for PRs. 2020-12-04 22:42:18 +00:00
Patrick Rhomberg 66c54ffc43 Refer to KEP rather than directly to documentation link. 2020-12-04 22:39:36 +00:00
Patrick Rhomberg 6488e89f96 Update config for go-flow-levee analysis
* Remove \b boundary for sinks; Unicode backspace \b != regexp boundary \b.
* Specify those source type fields that have not yet been tagged.
* Add exclusions for current false-positive set.
2020-12-01 23:35:32 +00:00
Patrick Rhomberg 90b85bf3fa KEP-1933: add static analysis target to hack/
* Add static analysis to hack/verify-govet-levee.sh for defense against
accidental logging of credentials.
* Add binary dependency to hack/tools/tools.go and associated go.mod, go.sum.
* Add analysis configuration to hack/testdata/levee/
2020-11-03 20:03:26 +00:00
Anders Eknert b423216a3b Presence of bearer token should cancel exec action
If a bearer token is present in a request, the exec credential plugin should accept that as the chosen method of authentication. Judging by an [earlier comment in exec.go](https://github.com/kubernetes/kubernetes/blob/c18bc7e9f7a27d7d197053d98c52896e1dc3bb3e/staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go#L217), this was already intended. This would however not work since UpdateTransportConfig would set the GetCert callback which would then get called by the transport, triggering the exec plugin action even with a token present in the request. See linked issue for further details.

See #87369 for further details.

Signed-off-by: Anders Eknert <anders.eknert@bisnode.com>
2020-07-02 12:12:32 +02:00
zhouya0 bbf41448f6 Fix kubectl create secret docker-registry 2020-05-15 12:14:03 +08:00