Compare commits

..

244 Commits

Author SHA1 Message Date
Kubernetes Publisher
68d28fb0b4 Update dependencies to v0.37.0-alpha.2 tag 2026-06-25 05:07:16 +00:00
Kubernetes Publisher
68262a1cf9 Merge pull request #139907 from ania-borowiec/remove_misleading_comments
Remove mentions about admission controllers from doc comments for  PodGroupTemplate.Priority and  PodGroupTemplate.PriorityClassName

Kubernetes-commit: 2a419be78ae256ef719071c6ae3bd46cb39b5b81
2026-06-23 17:05:47 +00:00
Ania Borowiec
fc42561c17 Remove mentions about admission controllers in PodGroupTemplate doc comments for Priority and PriorityClassName fields
Kubernetes-commit: f6fabaeb1e4c8607846402b52b6f6f4ba60c074b
2026-06-22 12:19:27 +00:00
Kubernetes Publisher
d04ac3067f Merge pull request #139867 from liggitt/json-v2-kube-openapi
Update kube-openapi to isolate from stdlib json/v2 prerelease

Kubernetes-commit: 2a799b273281aa952f457553e865050aba08bfe3
2026-06-19 01:04:47 +00:00
Jordan Liggitt
f04563ced1 Update kube-openapi to isolate from stdlib json/v2 prerelease
Kubernetes-commit: f45bf7803fa2fa86ea924a5cfe3503cb224fcbd1
2026-06-18 18:54:52 -04:00
Kubernetes Publisher
848305dfba Merge pull request #139825 from michaelasp/fixMutationTest
Fix dangling goroutine in mutation detector edge case

Kubernetes-commit: 55ac7c75fc03e69cff68075da901540c0f22b90e
2026-06-19 01:04:43 +00:00
Kubernetes Publisher
c18a3de8a3 Merge pull request #139755 from michaelasp/shutdownWait
Expose a way to wait for a controller listener to be fully shutdown

Kubernetes-commit: 7bdae3ff06a86acdf2b3cf9407b75b93c505e51f
2026-06-18 01:04:04 +00:00
Michael Aspinwall
29ceea8774 Fix timeout with dangling goroutine in mutation detector test
Kubernetes-commit: a332504c1abb8bedc564df94df424b8e6f11bc55
2026-06-17 17:49:48 +00:00
Kubernetes Publisher
f226f2f6e6 Merge pull request #139743 from antekjb/renamePodGroupScheduled
Rename PodGroupScheduled condition to PodGroupInitiallyScheduled

Kubernetes-commit: 47d52eabda121e12b5bedc59c8f3efef820f96c6
2026-06-17 15:34:44 +00:00
Kubernetes Publisher
cba7557c26 Merge pull request #139279 from antekjb/AllowForMinCountMutability
Make minCount mutable in Workload and PodGroup APIs

Kubernetes-commit: 176451642a3c25f18eaacba03417610aaa69a84b
2026-06-17 15:34:41 +00:00
Antoni Basista
f4285d806d Rename PodGroupScheduled condition to PodGroupInitiallyScheduled
Kubernetes-commit: 0d59683459ab25f1430b0740989ca63935bdaa47
2026-06-17 12:49:22 +00:00
Antoni Basista
c949b958f1 Make minCount mutable in Workload and PodGroup APIs
Kubernetes-commit: 61dc7df681ff4ad36809c10e5233ac97806a7780
2026-06-17 12:44:49 +00:00
Kubernetes Publisher
1e5bbe8452 Merge pull request #139520 from macsko/merge_featuregates
Merge GangScheduling and WorkloadAwarePreemption feature gates into GenericWorkload

Kubernetes-commit: 05f19de8edd6557dbe35403f0501ac3e97f600b3
2026-06-17 07:34:34 +00:00
Kubernetes Publisher
9f2f0bbab6 Merge pull request #139779 from PatrickLaabs/133935-clientgo
Replacing deprecated sets.NewString with generic implementation

Kubernetes-commit: c7381f90594a77851d051e4e18fcfbfb6e474b97
2026-06-16 23:34:35 +00:00
Kubernetes Publisher
23b19597fe Merge pull request #139586 from ania-borowiec/update_comment
Update doc comment for PodSpec.PreemptionPolicy to reflect the actual logic

Kubernetes-commit: 1436bc703dda6414a5b595f4b51ea6846535299d
2026-06-16 23:34:34 +00:00
Kubernetes Publisher
81deda607d Merge pull request #138999 from neolit123/1.37-client-go-generate-key-field-in-config
client-go: add Config.GenerateKey in certificate_manager.go

Kubernetes-commit: 0b19f2fae00634492409cf63e3c1998e77a5480f
2026-06-16 23:34:30 +00:00
PatrickLaabs
bb74650ccf Replacing deprecated sets.NewString with generic implementation
Kubernetes-commit: f3fc35faf035e6a7ad90d68a237d43b44de82280
2026-06-16 13:44:52 +02:00
Kubernetes Publisher
9fb400dccd Merge pull request #138080 from Lidang-Jiang/feat/dv-statefulset-selector-immutable
Migrate StatefulSet immutable fields to declarative validation

Kubernetes-commit: c7699a3b4b1f09a31ca0a985eaedce6ae502652c
2026-06-15 23:34:08 +00:00
Michael Aspinwall
ebfbc6844a Expose a way to wait for a controller listener to be fully shutdown
Kubernetes-commit: 338db9dde41f09aa094b61ef128e2d11327960ca
2026-06-15 17:52:00 +00:00
Lidang-Jiang
d8fe9715b9 Migrate StatefulSet immutable fields to declarative validation
Kubernetes-commit: 91341fc879394357dd24a7aaca3331cae1c2d6f6
2026-06-10 09:04:35 +08:00
Kubernetes Publisher
394ed525a6 Merge pull request #139101 from lalitc375/conditions
Setup metav1.Condition for declarative valdiations.

Kubernetes-commit: 8f8aa9aae157b88db6ba02836c57596496d3f684
2026-06-11 04:14:23 +00:00
Kubernetes Publisher
cfe83ef28c Merge pull request #139435 from xigang/rename_informer_metrics
client-go: Rename FIFO metrics file to informer metrics

Kubernetes-commit: 2f2ec717505fc9f75ddb91e6a2a14cadf2b0d95c
2026-06-10 00:12:34 +00:00
Kubernetes Publisher
2fb3fa6ff2 Merge pull request #129331 from pohly/log-client-go-portforward
client-go portforward + apiserver proxy: structured, contextual logging

Kubernetes-commit: 42a9d604c239d13a76bb5a3c3beb1c01c4779c59
2026-06-09 16:12:45 +00:00
Ania Borowiec
6a08ddec11 update doc comment for PreemptionPolicy to reflect the actual logic
Kubernetes-commit: 312919c2278f0d419b15f688578ae721966aa607
2026-06-09 11:11:54 +00:00
Kubernetes Publisher
c53b2772ec Merge pull request #137694 from Jefftree/client-go-throttle-err
client-go: return context error directly instead of wrapping as rate limiter error

Kubernetes-commit: 1fd96eb4bb023453099100f446393cab3f92c218
2026-06-08 20:09:17 +00:00
Kubernetes Publisher
0deb0beab3 Merge pull request #137988 from Jefftree/flake-fix
leaderelection: retry release on conflict from inflight renew

Kubernetes-commit: 6b364b1811ab7e9b3bc03a253b94fe6e18841d54
2026-06-06 03:35:59 +00:00
Maciej Skoczeń
c3667cb92d Merge GangScheduling and WorkloadAwarePreemption feature gates into GenericWorkload
Kubernetes-commit: 54ca619d4b3c31665d92868439118a4740c994a6
2026-06-05 12:48:52 +00:00
Kubernetes Publisher
6b1bbb2a13 Merge pull request #138488 from yliaog/master
DRA Extended Resource: promote to GA in 1.37

Kubernetes-commit: e0c1c5bd3d1896f9bb12b7881d84bcdc4bf0cf2b
2026-06-03 19:35:53 +00:00
Kubernetes Publisher
274207396a Merge pull request #139420 from dims/update-x-net-deps
Bump golang.org/x/net to HEAD for http2 configureServer ALPN fix

Kubernetes-commit: 5ffa4a018b34d0c0a438891cfe71834b10be4e0a
2026-06-02 19:35:09 +00:00
Davanum Srinivas
c637a8ce7e Bump golang.org/x/net to HEAD for http2 go1.27 wrap fixes
Updates golang.org/x/net to v0.55.1-0.20260602153038-42abb857022c to pick up
the go1.27 http2 "wrap" fixes:

- CL 782940 (golang/go#79642): configureServer registers the h2 and http/1.1
  ALPN protocols on s.TLSConfig.
- CL 785900 (golang/go#79778): ConfigureTransport/ConfigureTransports enable
  HTTP/2 on the transport and keep TLSClientConfig non-nil.

With both, the kube-apiserver secure-serving path and the client-go / apiserver
HTTP/2 clients negotiate HTTP/2 under go1.27 with no Kubernetes-side changes;
no workaround is needed.

Gerrit: https://go-review.googlesource.com/c/net/+/782940
Gerrit: https://go-review.googlesource.com/c/net/+/785900
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 544a4612cd73250f69e6a95f4b3de8b94112e594
2026-06-02 12:21:42 -04:00
xigang
0c1c0f1e14 client-go: Rename FIFO metrics file to informer metrics
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: fe0cc1d829e10077f11895674e3ce021884a85bb
2026-06-02 17:37:52 +08:00
Kubernetes Publisher
5d252d37f7 Merge pull request #135925 from jianzhangbjz/painc
Docs: event cache key generation functions require non-nil inputs

Kubernetes-commit: 451b50df783cc381f15c9c2a35d2948a699c249a
2026-05-28 21:01:30 +00:00
Kubernetes Publisher
3f75409d2a Merge pull request #139190 from Kartavyasonar/doc-configmap-binarydata-env-limitation
doc: clarify ConfigMap BinaryData not propagated to container env vars

Kubernetes-commit: 0be5dabcdf90e7d997b3de06144d8959d0eab7cd
2026-05-28 01:01:26 +00:00
Kartavya Sonar
778155c88d doc: clarify ConfigMap BinaryData not propagated to container env vars
Kubernetes-commit: be38e73900fdb0a1128e83d41ed11d483284b538
2026-05-27 12:34:32 +00:00
Kubernetes Publisher
87f45e924f Merge pull request #138653 from adrianmoisey/hpa-generation-conditions
HPA: Set ObservedGeneration in HPA conditions

Kubernetes-commit: b094736530bf98e7d3d1c766c6c67064f1d56029
2026-05-26 17:51:49 +00:00
Kubernetes Publisher
a35c5f8f96 Merge pull request #139258 from dims/update-x-net-deps
Bump golang.org/x/net from v0.54.0 to v0.55.0

Kubernetes-commit: 6790dcf1f60d0528576a8665ef3a807c7951bb8f
2026-05-23 13:52:13 +00:00
Davanum Srinivas
3952f1d02a Bump golang.org/x/net from v0.54.0 to v0.55.0
Fixes ci-kubernetes-e2e-kind-golang-tip and ci-kubernetes-unit-golang-tip,
which started failing under Go tip identifying as go1.27 with:

  vendor/google.golang.org/grpc/internal/transport/handler_server.go:271:18:
      undefined: http2.TrailerPrefix

In x/net v0.54.0, TrailerPrefix was defined only in http2/server.go, which
carries `//go:build !(go1.27 && !http2legacy)` and is therefore excluded
under go1.27. Upstream golang/net commit 1efab4271a moved TrailerPrefix
(and other symbols accidentally dropped by the go1.27 server wrapper) into
common files. That fix is released in v0.55.0.

Tracked in https://github.com/kubernetes/kubernetes/issues/139257

Kubernetes-commit: d7c6b52ac4b6387d740af2fea7f1dd007d71c64c
2026-05-23 08:06:24 -04:00
Kubernetes Publisher
7b85db3954 Merge pull request #139248 from dims/bump-golang.org/x/crypto-to-v0.52.0
Bump golang.org/x/crypto to v0.52.0

Kubernetes-commit: f6442409ad90cdd4b4826571f409e59a07ceb070
2026-05-22 21:51:59 +00:00
Kubernetes Publisher
3772a3df68 Merge pull request #138572 from dom4ha/promote-workload-api-v1alpha3
Converts the DisruptionMode enum field to struct as v1alpha3 and drops v1alpha2

Kubernetes-commit: 901087fb35049e1a7d115fd0c9d8586399468615
2026-05-22 21:51:57 +00:00
Kubernetes Publisher
c39cf12e43 Merge pull request #138287 from adrianmoisey/fix-typo
Fix typo on WaitForCacheSync comment

Kubernetes-commit: 65c1c32a9b221ce2fc13b91295691ca7e2257587
2026-05-22 21:51:53 +00:00
Davanum Srinivas
f8dcfdcb70 Bump golang.org/x/crypto to v0.52.0
Kubernetes-commit: 17a8f4f5c041b13b7ae5bff4a40a4f37fff13d51
2026-05-22 12:13:09 -04:00
Kubernetes Publisher
0328c36dee Merge pull request #137103 from arcceus/api-linter-apps-optionalorrequired
Enables the optionalorrequired linter for the apps API group

Kubernetes-commit: e136f39334a72b7d35069a97d373ccaa0211dcae
2026-05-22 01:51:13 +00:00
Kubernetes Publisher
d584c96c7a Merge pull request #136847 from liyuerich/commentstartautoscaling
enable commentstart check on autoscaling API group

Kubernetes-commit: 323e89513a2083dcb41e55762c1c9ee666dbe73b
2026-05-21 21:53:51 +00:00
Kubernetes Publisher
32e59e0509 Merge pull request #137852 from aojea/patch-6
Update OWNERS file to keep it up to date

Kubernetes-commit: 0388b43509233b9b4744200065d31ad1ae734419
2026-05-20 10:45:52 +00:00
Kubernetes Publisher
26991d8106 Merge pull request #139173 from Jefftree/bump-kube-openapi-bbf5c5577288
Bump kube-openapi to latest

Kubernetes-commit: 9bad8d66e7ff3d8fe2a0a23d68d560e9fdd34933
2026-05-19 22:46:11 +00:00
Jefftree
d89f2c0a74 Bump k8s.io/kube-openapi to bbf5c5577288
TAG=agy

CONV=c2ce531b-5959-4834-9544-afc09a93f52f

Kubernetes-commit: c52952f80ceffcf9123d63c0a8377b825b02fcc2
2026-05-19 20:35:22 +00:00
Kubernetes Publisher
88581e025b Merge pull request #138103 from adri1197/client-go-event-annotations
events: add AnnotatedEventRecorder interface into internal/events

Kubernetes-commit: f529c91dda103b71aef86a1ec5e41e3df720b8f9
2026-05-19 14:45:38 +00:00
Kubernetes Publisher
bdc99a38a9 Merge pull request #139143 from michaelasp/informerStoreFix
Fix informer store setting store version to noop

Kubernetes-commit: 0cf3c17f479853fe24b6b7ddaf05528747929fa3
2026-05-19 02:45:04 +00:00
Michael Aspinwall
6a38c1c8a4 Fix nil check for store metrics
Kubernetes-commit: e50a7f3dbc18bfcd0cd0179bfb65e03fedcc331e
2026-05-18 18:19:58 +00:00
dom4ha
81cba8bc15 Convert DisruptionMode from enum to struct
Kubernetes-commit: 72d770c6793550109883d9bab2f0a7d53d11a3f6
2026-05-18 14:12:20 +00:00
Lalit Chauhan
b5201bbace Generate Protos
Kubernetes-commit: c7576703f081b7658735871b78afadc7ef083444
2026-05-15 17:20:52 +00:00
Kubernetes Publisher
9dfd0befa6 Merge pull request #138260 from liggitt/inline-json
use `json:""` consistently for inlined fields

Kubernetes-commit: 12484ce715d4c2030d894ebb2841e2cb027db7d0
2026-05-13 18:45:48 +00:00
Lubomir I. Ivanov
b48f101b05 client-go: add Config.GenerateKey in certificate_manager.go
Add a new field GenerateKey in the Config struct that allows
the user to set a custom function that would generate
a private key of their choice.

If the field is not set, the default remains:
  ecdsa.GenerateKey(elliptic.P256(), rand.Reader)

Add unit tests for this code path, with key fixtures
and function overloading to avoid additional key generation.

Enforce minimum bits on the generated keys to ensure
they are secure with the function validateKeyStrength().
For RSA the minimum key size is 2048, for ECDSA the minimum
curve bits are 256. Unit test this function too.

Kubernetes-commit: dec94de30f90f7e7e2859701ffce79ef8b137e3d
2026-05-12 15:57:12 +02:00
dom4ha
c86813f4ba Remove v1alpha2 API definitions
Update client-go lister and informer imports to v1alpha3

Kubernetes-commit: 88948acc38c40c683c5d545aa14282885c6c2acb
2026-04-24 10:43:23 +00:00
dom4ha
ebcde46dda Add generated files for v1alpha3
Run code generation for v1alpha3

Kubernetes-commit: 6404ddc2b783e70ea9fbd5f019b282ec754a79a4
2026-04-27 08:30:14 +00:00
yliao
897ceddac2 promotion to GA (stable)
Kubernetes-commit: f28571781bc9bb76ed0cdb4e8ba759631503faa2
2026-04-20 20:06:27 +00:00
Adrian Moisey
927e750b6c Set generation condition for HPA
Kubernetes-commit: 8a31943e79107effe0495ea58081ade437bf47ba
2026-04-16 19:43:43 +02:00
arcceus
c6f16b36a1 revert WhenDeleted/WhenScaled to +optional
Kubernetes-commit: 012fc1b844c6be1d45a6f169f6344864dee4e8d3
2026-04-09 23:28:05 +05:30
Adrian Moisey
dcac84bd05 ./hack/update-codegen.sh
Kubernetes-commit: 0c3df692c41d185b3b7ac4e70f89fa95276f7492
2026-04-09 10:44:48 +02:00
Jordan Liggitt
06945f2b0e switch tag Get("json") to Lookup("json")
Kubernetes-commit: ef2e578f14fe666eb8a7296ea19f8284c1df5e7b
2026-04-07 18:12:54 -04:00
Jordan Liggitt
a16e1bb854 Drop meaningless ,inline from json tags
Kubernetes-commit: bed4a34ad8901d9a01efcb9594838f96ec9d4563
2026-04-07 13:30:08 -04:00
Jordan Liggitt
ef5f95859e Bump sigs.k8s.io/structured-merge-diff/v6
Kubernetes-commit: 8a5c4d9d58739782de5b142c77d08d8fb459372c
2026-04-14 14:27:54 -04:00
Kubernetes Publisher
14ef437cc6 Merge pull request #139001 from jpbetz/bump-kube-openapi-for-revert
Bump kube-openapi to pick up #609

Kubernetes-commit: 34e600ec497ff6bd81a0c6c98b0f764900fa2643
2026-05-13 02:45:26 +00:00
Joe Betz
f49c3b763f Bump kube-openapi to pick up API Definitions revert
Kubernetes-commit: 89549643b89eefccefdf1d30bb328e74914614c9
2026-05-12 11:09:49 -04:00
Kubernetes Publisher
11948c1336 Merge pull request #138657 from jpbetz/codegen-discovery
Enable validation-gen for all existing and future APIs

Kubernetes-commit: 553312e6c22a6a9c176f5530a18691c7f03b126d
2026-05-12 22:44:53 +00:00
Joe Betz
63b2f68438 Explicitly disable validation-gen where not needed
Kubernetes-commit: 9d65aeabb631d387ef1da15c0765eb8e297fb6aa
2026-05-07 17:49:35 -04:00
Kubernetes Publisher
ca52b81a29 Merge pull request #138931 from Jefftree/bump-kube-openapi
Bump kube-openapi to latest

Kubernetes-commit: 50bda3a6bf90bfa8157522cda5e91ffb0194f92f
2026-05-09 20:51:01 +00:00
Jefftree
c2ce71e1e5 Bump kube-openapi to 312035bf509b
Kubernetes-commit: 58400287bc6f58e228d5cecb798b04f2710ad7cc
2026-05-09 12:04:54 -04:00
Kubernetes Publisher
0582d760ec Merge pull request #138271 from Jefftree/remove-agg-v2beta1
Remove v2beta1 aggregated discovery support from clients

Kubernetes-commit: 5ad5004d594a97495d6005513787a54b5aa2972b
2026-05-07 20:50:23 +00:00
Kubernetes Publisher
0a31f6e5eb Merge pull request #138759 from soltysh/drop_job_features
Drop job features

Kubernetes-commit: af6d86c7cc933ce1ff7159bad1eceaf9a60144e3
2026-05-07 16:50:18 +00:00
Kubernetes Publisher
24705f39ff Merge pull request #138819 from skitt/goyaml-yaml-v2.4.4
Bump go.yaml.in/yaml/v2 to 2.4.4

Kubernetes-commit: 43fe7b425091a6581e0f6777ef89a215e229eebb
2026-05-06 20:50:28 +00:00
Stephen Kitt
f2e82a9540 Bump go.yaml.in/yaml/v2 to 2.4.4
This only changes tests to drop gopkg.in/check.v1, which helps our
dependency tree a little.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: edf0df348c217271f4ed7acee3b436c27e71df88
2026-05-06 18:24:52 +02:00
Kubernetes Publisher
d7e05a3637 Merge pull request #138786 from dims/update-x-packages
Update golang.org/x/* dependencies

Kubernetes-commit: 5d6e917ac112bf7f2b139da77c2e765784473bb2
2026-05-06 00:50:27 +00:00
Davanum Srinivas
818cfeb954 Update golang.org/x/* dependencies
- golang.org/x/exp: 944ab1f22d93 -> 746e56fc9e2f
- golang.org/x/mod: v0.34.0 -> v0.35.0
- golang.org/x/oauth2: v0.35.0 -> v0.36.0
- golang.org/x/time: v0.14.0 -> v0.15.0
- golang.org/x/tools: v0.43.0 -> v0.44.0

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 4b0e01df008f9f44bab98b0712ede29fdb6f4ccb
2026-05-05 07:22:08 -04:00
Kubernetes Publisher
535f2d0806 Merge pull request #138722 from qflen/fix/mountpath-doc-colon-129453
Fix v1.VolumeMount.MountPath doc to match validator (allow ':')

Kubernetes-commit: 209d50cef164494dc18586aca0bd082914e677ab
2026-05-04 20:50:03 +00:00
Kubernetes Publisher
14ae5b45e1 Merge pull request #138741 from dims/update-kube-openapi
bump k8s.io/kube-openapi to v0.0.0-20260502001324-b7f5293f4787

Kubernetes-commit: 0fe8ee192270e99e222cf04fb6492a4c584690eb
2026-05-04 20:50:00 +00:00
Maciej Szulik
e7adb43e4b Generated changes
Signed-off-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: 978f5741d81a448fd7e4339e5ca99c8c75c92862
2026-05-04 16:45:18 +02:00
Davanum Srinivas
47b7dd6ca6 bump k8s.io/kube-openapi to v0.0.0-20260502001324-b7f5293f4787
Updates k8s.io/kube-openapi across all staging modules and vendors the new
revision. Key changes upstream:

- builder/openapi.go, builder3/openapi.go: use common.EscapeJsonPointer()
  when keying definition names into swagger.Definitions / spec.Components.Schemas,
  fixing incorrect lookups for types whose names contain JSON-Pointer-reserved
  characters (e.g. '/', '~').

- pkg/generators/apidefinitions/loader.go (new): LoadAPIVersion() reads an
  apiversion.yaml from a source-tree directory and validates its TypeMeta,
  providing a declarative way to describe API versions in-tree.

- pkg/generators/apidefinitions/types.go (new): APIVersion type that carries
  the schemeGroupVersion / kindAPIVersion metadata consumed by the loader.

- pkg/generators/config.go, openapi.go, model_names.go: minor generator
  improvements accompanying the apidefinitions loader addition.

- pkg/generators/rules/list_type_streaming_tags.go: streaming-tag rule fix.

- pkg/schemaconv/openapi.go, proto_models.go: schema conversion cleanups.

- pkg/validation/validate/result.go: validation result cleanup.

Previous version: v0.0.0-20260317180543-43fb72c5454a
New version:      v0.0.0-20260502001324-b7f5293f4787

Kubernetes-commit: eaf347cecb168ee85fc77ffc9a5cda4eb99ce1ca
2026-05-01 20:50:32 -04:00
Kimon N
b46a0c233f Fix v1.VolumeMount.MountPath doc to match validator (allow ':')
The v1.VolumeMount.MountPath doc claims the path must not contain
':', but the validator does not enforce this. The internal type in
pkg/apis/core/types.go carries no such constraint, and existing
TestValidateVolumeMounts success cases use mountPath values like "d:",
"F:", and "G:\mount".

This is a doc-only change. The validator is unchanged; the public doc
now matches what the validator actually accepts. Regenerated proto and
openapi snapshots to propagate the doc update.

Signed-off-by: Kimon N. <nkimon00@gmail.com>

Kubernetes-commit: 6691ecaf2f5ce3076f3c61eca5355cc99535d1bd
2026-04-30 22:51:30 +02:00
Kubernetes Publisher
98a97d3bea Merge pull request #136709 from gzb1128/dra-cel-no-such-key-error-enhancement
DRA: improve CEL error message for "no such key" errors

Kubernetes-commit: c485ef21ab23ba1a244b2c9843868f1a6da54060
2026-04-29 19:15:56 +00:00
Kubernetes Publisher
224d0b9220 Merge pull request #138576 from p0lyn0mial/upstream-reflector-list-trace-obj-count
client-go/reflector: Add object count to reflector "Objects listed" trace step

Kubernetes-commit: 5ce17ed71b124a8c89414f929a58d536e008cce7
2026-04-28 11:16:22 +00:00
Kubernetes Publisher
f854ec26d2 Merge pull request #138340 from pacoxu/bump-unwanted
bump stretchr/objx to v0.5.3

Kubernetes-commit: ef1853d811fb004f24e73494b1753b7beb977390
2026-04-27 19:13:58 +00:00
Paco Xu
d0e1111cfa bump github.com/stretchr/objx to v0.5.3
Kubernetes-commit: 8730b0ebc99d0554e318138d2c83370a6bdef12c
2026-04-27 14:59:42 +08:00
Kubernetes Publisher
fbda1bea62 Merge pull request #138573 from dims/update-go-openapi-deps-rebase
Update go-openapi dependencies (jsonpointer, jsonreference, swag)

Kubernetes-commit: e9b95827ebf963f7bab0a1a8ddd90e408858c892
2026-04-26 03:13:14 +00:00
Kubernetes Publisher
34c8061b60 Merge pull request #138393 from humblec/bump-etcd-sdk-3.6.10
etcd: bump etcd sdk to v3.6.10

Kubernetes-commit: e1cf06b9b41f3534fd1ce475a18ef20d46e8f876
2026-04-25 15:17:53 +00:00
Humble Devassy Chirammal
cb70ef072c etcd: bump etcd sdk to v3.6.10
Bump go.etcd.io/etcd/{api,client/pkg,client,pkg,server}/v3 from v3.6.8 to v3.6.10.
go.etcd.io/etcd/raft/v3 is intentionally left unchanged (separate release cadence).

Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: 15492a41ed637237cf1891ef140544f64197643d
2026-04-25 09:08:49 +05:30
Kubernetes Publisher
9c68566d66 Merge pull request #138295 from kencochrane/retrywatcher-downgrade-410-gone-log
client-go/tools/watch: downgrade 410 Gone error to V(4) debug log in RetryWatcher

Kubernetes-commit: 301946d15e67a4a2e8a5fb8292eb836acd366d78
2026-04-24 19:14:37 +00:00
Lukasz Szaszkiewicz
768b463699 client-go/reflector: add object count to "Objects listed" trace step
Kubernetes-commit: c83716b7885647e089cd44f74090caaf95da7be6
2026-04-24 16:40:12 +02:00
Davanum Srinivas
236db84a02 Update go-openapi dependencies (jsonpointer, jsonreference, swag)
Bump go-openapi dependencies to latest versions:
- github.com/go-openapi/jsonpointer v0.21.0 → v0.22.4
- github.com/go-openapi/jsonreference v0.20.2 → v0.21.4
- github.com/go-openapi/swag v0.23.0 → v0.25.4

The new swag version has been restructured into a multi-module monorepo
with submodules (cmdutils, conv, fileutils, jsonname, jsonutils, loading,
mangling, netutils, stringutils, typeutils, yamlutils). As a result:
- mailru/easyjson and josharian/intern are no longer transitive deps
  and have been removed from vendor
- go-openapi/jsonpointer and go-openapi/swag no longer reference
  unwanted deps davecgh/go-spew, mailru/easyjson, or gopkg.in/yaml.v3
- Updated hack/unwanted-dependencies.json accordingly

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 693dc57f5753ce69f7d3f49f26bfefc9554e47e6
2026-04-24 08:13:31 -04:00
Kubernetes Publisher
5834c79c33 Merge pull request #138562 from dims/update-cbor-dep
Update github.com/fxamacker/cbor/v2 to v2.9.1

Kubernetes-commit: 6e4605d14e04ea9681b6dd6b5729c788e28e89b7
2026-04-24 11:13:58 +00:00
Kubernetes Publisher
1f2893e611 Merge pull request #138561 from dims/update-xnet-dep
Update golang.org/x/net to v0.53.0

Kubernetes-commit: 1f22abeebcb4e1ecae2f3dbcf3f0cd747ecfb3d6
2026-04-24 11:13:55 +00:00
Davanum Srinivas
ab9883c3cd Update github.com/fxamacker/cbor/v2 to v2.9.1
Parser hardening for the kube-apiserver CBOR deserializer (PRs #750,
#753, #757): fixes tag-1 epoch float64 overflow into time.Time fields
(directly reachable via DecTagOptional decode path), RawMessage clone
defense, and keyasint type-confusion fixes.

Kubernetes-commit: dc29a934e460eb29130de6724787ca1b677e31e0
2026-04-23 21:43:02 -04:00
Davanum Srinivas
e584095d82 Update golang.org/x/net to v0.53.0
Fixes CVE-2026-33814 (golang/go#78476): HTTP/2 Transport hangs
indefinitely when a peer sends a SETTINGS frame with MaxFrameSize=0.
This is reachable from kube-apiserver's OIDC, admission webhook,
and aggregated API client paths.

Kubernetes-commit: 12a2470693d86f63f4614048ffdd43dc393dd7e0
2026-04-23 21:36:05 -04:00
Ken Cochrane
fd78cbf903 client-go/tools/watch: downgrade 410 Gone error to V(4) debug log in RetryWatcher
Also check apierrors.IsResourceExpired in addition to IsGone.

Kubernetes-commit: 08e07a914281cda80b8541b444b6d6f1f8e754e2
2026-04-23 18:23:46 -04:00
Kubernetes Publisher
af852a6051 Merge pull request #138192 from skitt/otel-1.42
Bump otel to 1.43.0 and contrib to 0.68.0

Kubernetes-commit: 5ed1fd971d594a3cda7f7e26cd037e8be37f520f
2026-04-23 18:47:31 +00:00
Jefftree
d59f4e8465 Remove aggregated discovery v2beta1 client-side references
Kubernetes-commit: 6d48f50dcf41c11c72f511ca51b5aa8b580782af
2026-04-08 10:44:27 -04:00
Stephen Kitt
54edeb4bfe Bump otel to 1.43.0 and contrib to 0.68.0
See
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.41.0
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.42.0
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0
and
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.41.0
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.42.0
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.43.0
for details.

otelgrpc no longer produces "messages" span events so these are
removed from the tracing test.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 1a63916abee48d6356fbc2e6965433647e6cf073
2026-04-03 10:10:53 +02:00
Kubernetes Publisher
3273f3d7b7 Merge pull request #135708 from michaelschiff/informer-generated-docs
informer-gen generated comments reference non-existent method

Kubernetes-commit: 88bf9c97c4285de0d83e227159a9698015b3927e
2026-04-23 10:26:23 +00:00
Kubernetes Publisher
9dcacd934a Merge pull request #138070 from Jefftree/deprecate-multilock
Deprecate MultiLock in client-go leader election

Kubernetes-commit: cb9696a5c4ab8a45a741ef76017a38e31d6a010e
2026-04-23 02:24:21 +00:00
Kubernetes Publisher
f596361399 Merge pull request #135336 from carlory/clean-AnyVolumeDataSource
[1.37] Remove feature gate AnyVolumeDataSource

Kubernetes-commit: cbd6fe51c906f32ebbaa5970e449264470965e6f
2026-04-22 22:26:57 +00:00
Kubernetes Publisher
3c8a6967ba Merge pull request #138354 from dims/update-moby-spdystream-v0.5.1
Update github.com/moby/spdystream from v0.5.0 to v0.5.1

Kubernetes-commit: 02b979213695b4e3d707ceb5a79095ae7d81b7a0
2026-04-14 14:38:51 +00:00
Davanum Srinivas
6e6322efd1 Update github.com/moby/spdystream from v0.5.0 to v0.5.1
Kubernetes-commit: 7e9c2c8eef26f99aa2f94d8e09d6d32de86c7769

Kubernetes-commit: f6209104d25a6c0ea7605a73b9ec4085aacbca03
2026-04-13 13:57:52 -04:00
Adrian Fernandez De La Torre
e86b6659d9 events: add AnnotatedEventRecorder interface
Add a separate AnnotatedEventRecorder interface with an AnnotatedEventf
method that allows attaching annotations to events at creation time.
Implement it in recorderImpl, FakeRecorder, and EventRecorderAdapter.

Add a Verbose option to FakeRecorder that optionally includes action,
object kind/apiVersion, and annotations in event output. The default
format is unchanged.

Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com>

Kubernetes-commit: 31fe350b2b2065b49752adb4f68f1ea1c282058e
2026-03-30 15:43:47 +02:00
Jefftree
53b6fdc0a0 Deprecate MultiLock, UnknownLeader, and ConcatRawRecord in client-go leader election
Kubernetes-commit: 875a572f25bb7da59ccaf487d889658a10448a63
2026-03-27 15:06:39 -04:00
Jefftree
898f48977a client-go: use errors.Is for context errors in tryThrottleWithInfo
Kubernetes-commit: 9cde416114a98056b546a0b0132b11c882c8aa13
2026-03-27 13:20:02 -04:00
Kubernetes Publisher
b5cc94ef3b Merge pull request #136589 from tosi3k/preemption-mode
Add Workload-Aware Preemption fields to Workload and PodGroup APIs

Kubernetes-commit: c1ebc2c3e2f6aa1e4a5f8be5e2f78763d0da29eb
2026-03-24 11:02:08 +00:00
gzb1128
6fd7c180ef DRA: add hint for CEL "no such key" errors
When CEL expressions access non-existent map keys, add a helpful hint
suggesting optional chaining (.? followed by orValue()) or has() macro.

Kubernetes-commit: 5e2d5b9a621109bd89f2dbc4092e0123ab500c85
2026-03-24 16:09:26 +08:00
Jefftree
1b1630d32a leaderelection: retry release on conflict from inflight renew
Kubernetes-commit: 2bde6b664a167dd7352476f69cb9da03c5461b40
2026-03-23 21:25:05 -04:00
Antonio Ojea
c7b98b2ab5 Update OWNERS file to keep it up to day
clean up and update the OWNERS files under client-go so people that
is no longer active is moved to emeritus.

Kubernetes-commit: d4913ecba2f3c426257515c1de6c668d21ea7079
2026-03-18 17:01:42 +01:00
Jefftree
1de307a3cf client-go: return context error directly instead of wrapping as rate limiter error
Kubernetes-commit: f6fdd040225b125f425568a5ac558a909a576e41
2026-03-12 23:21:30 -04:00
Antoni Zawodny
1f6e0f4541 Add Workload-Aware Preemption fields to Workload and PodGroup APIs
Co-authored-by: Omar Sayed <omarsayed@google.com>

Kubernetes-commit: 59c9f75133f22ed24e944cf0b8a1a68e1c49af32
2026-03-12 17:25:06 +01:00
Kubernetes Publisher
df2d882697 Merge pull request #136989 from nojnhuh/podgroup-resourceclaim
KEP-5729: DRA: ResourceClaim Support for Workloads

Kubernetes-commit: b5a943f629904bda73a8f6784ad3cd8325ead57c
2026-03-23 19:02:58 +00:00
arcceus
729f9aeb66 addressing review comments
Kubernetes-commit: 383b22767c114c1231c06779374743594f6c2e5e
2026-03-11 01:08:24 +05:30
michaelschiff
71d7d2af1e run ./hack/udpate-codegen.sh
Kubernetes-commit: f4b14448e917dc384e071329c400b747eba77995
2026-02-13 11:53:32 -08:00
Jon Huhn
4eece5291a Workload API: PodGroup ResourceClaims (KEP-5729)
Kubernetes-commit: d80f384b702e4c6630e6f46b2926ab5e45553c97
2026-02-10 14:42:04 -06:00
Kubernetes Publisher
3d35c51207 Merge pull request #137190 from everpeace/KEP-5491-alpha
KEP-5491: DRA: List Types for Attributes [Alpha]

Kubernetes-commit: ef247770b50e7105eb7453c8bfd5279b5a3656ae
2026-03-21 11:02:46 +00:00
Kubernetes Publisher
0434117726 Merge pull request #137028 from nmn3m/feature/dra-resource-pool-status
KEP-5677: Add ResourcePoolStatusRequest API for DRA resource availability visibility

Kubernetes-commit: 15eaed180f8f4d1a6188922a8258392896f7dc4c
2026-03-21 03:02:38 +00:00
Nour
ba785be0ac Drop CSR analogy, mark ObjectMeta +required,reduce limits (maxItems=500, maxLength=128) for etcd safety, add Errors printer column
Signed-off-by: Nour <nurmn3m@gmail.com>

Kubernetes-commit: 8b9159baa41418bcc62592e9da3b878e7cd138ca
2026-03-18 05:17:28 +02:00
Nour
4a9c8783a9 Add ResourcePoolStatusRequest API types and generated code
Introduce the ResourcePoolStatusRequest resource type in the
resource.k8s.io/v1alpha3 API group, gated behind the
DRAResourcePoolStatus feature gate. This includes external and internal
type definitions, protobuf/OpenAPI generated code, client-go typed
clients, informers, listers, apply configurations, deepcopy, defaults,
conversion, fuzzer, declarative validation tags, and API discovery
metadata.

Kubernetes-commit: 29601b8628ac8ea512960bc373511ae46888e502
2026-03-17 14:25:06 +02:00
Kubernetes Publisher
0131054016 Merge pull request #137753 from adamkasztenny/fix-lease-optimistic-update-log-level-v2
Reduce log level for optimistic lease update fallback

Kubernetes-commit: 158b69d2234f2b07ba7b6c5e182fa9df417bdf73
2026-03-19 04:26:11 +00:00
Kubernetes Publisher
9b29e67df1 Merge pull request #136355 from enj/enj/i/tls_cache_gc
Add GC to client-go TLS cache

Kubernetes-commit: bf1abbf2e987883ffacaaf6f84218bcbfd444876
2026-03-19 04:26:09 +00:00
Kubernetes Publisher
4c2ee9a3e2 Merge pull request #136725 from pravk03/native-dra-2
Introduce support of DRA for Native Resources

Kubernetes-commit: 7a3a6cf4be719a2eaed14e48a701cbdd2f0e8400
2026-03-19 00:05:16 +00:00
Kubernetes Publisher
2fb6b9cac0 Merge pull request #137849 from bryantbiggs/deps/update-kube-openapi
deps: Update `kube-openapi` to drop `ginkgo/gomega` indirect deps

Kubernetes-commit: ec68099e62c85901c8d225705d55adfac26cf69d
2026-03-18 20:05:15 +00:00
Praveen Krishna
b2267f3d75 make update
Kubernetes-commit: f266fe4118e52605ba9cf02e1ab2ed68988d56e9
2026-03-18 14:18:22 +00:00
Bryant Biggs
382d307f87 dependencies: bump kube-openapi to drop ginkgo/gomega indirect deps
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which
moved the last ginkgo/gomega tests to stdlib testing and ran go mod
tidy, removing ginkgo/gomega from kube-openapi's go.mod.

This drops ginkgo/gomega as indirect deps from apimachinery. It also
prunes Masterminds/semver, google/pprof, and golang.org/x/tools from
client-go and other staging modules where they were only needed
through kube-openapi's ginkgo/gomega chain.

Contributes to kubernetes/kubernetes#127888

Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
2026-03-18 09:09:11 -05:00
Kubernetes Publisher
6c21384776 Merge pull request #137795 from ttsuuubasa/dra-binding-conditions-beta
DRA Device Binding Conditions: graduate to beta

Kubernetes-commit: 0d28578de14fce641a39d6415d2068e1f39283a4
2026-03-18 16:07:10 +00:00
Tsubasa Watanabe
69d2e66589 DRA Device Binding Conditions: run make update
Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>

Kubernetes-commit: 6bf9cd5053cf9b2b2b9ef7045a6705f928c949c6
2026-03-17 21:31:32 +09:00
Kubernetes Publisher
bb93391625 Merge pull request #137836 from BenTheElder/fix-api
Fix API serialization compatibility regression in VolumeMountStatus

Kubernetes-commit: a1293fe6b1e423869a28e35b5b8c297e2a6f3b5f
2026-03-18 04:04:24 +00:00
Kubernetes Publisher
828813ca69 Merge pull request #137271 from brejman/tas-constraints
KEP-5732: Add SchedulingConstraints to PodGroup API and use them in TopologyPlacement plugin

Kubernetes-commit: 299ab0d68a9d70b3c39d63210de47ac01d18e74b
2026-03-18 00:05:16 +00:00
Benjamin Elder
27bd9ce449 hack/update-codegen.sh
Kubernetes-commit: 9f60cc3c4e8ddb373b1816a7e28b159db08f6a30
2026-03-17 16:23:57 -07:00
Shingo Omura
15a9dffb52 KEP-5491: generated code for list attribute fields in DeviceAttribute API ("make update"-ed)
Kubernetes-commit: 3902f5611f29a80dad6c43618c1d87af7baa9637
2026-03-16 19:03:01 +09:00
Adam Kasztenny
ea7a7e7cf9 Reduce log level for optimistic lease update fallback
The "Failed to update lease optimistically, falling back to slow path"
message was logged at Error level, but this is expected behavior during
normal leader election when the optimistic update encounters a conflict.
The system gracefully falls back to the slow path (Get + Update), so
this is not a real error. Downgrade to V(2) Info to reduce log noise.

Kubernetes-commit: 04977a0ea4592bfaa70d5095a4cfe99dd4b847e1
2026-03-14 16:51:49 -04:00
Bartosz
61a40f5111 Add scheduling constraints to v1alpha2 pod group api
Add plugin to generate placements based on scheduling constraints

Co-authored-by: Antoni Zawodny <zawodny@google.com>

Kubernetes-commit: d9da8c7c4a25cee553720737fdec07006e063da1
2026-02-25 16:36:07 +00:00
Kubernetes Publisher
39f55294aa Merge pull request #137454 from haircommander/proc-mount-ga
KEP-4265: feature: promote ProcMountType to GA

Kubernetes-commit: 040ca59611d5bb5976ad4cb47f1e80f8c877d0d8
2026-03-17 08:00:09 +00:00
Peter Hunt
c73e37f377 proc mount: drop featuregate note on API
Signed-off-by: Peter Hunt <pehunt@redhat.com>

Kubernetes-commit: 389825754c8d3fe4292c38facc0bbb80ec8efdfd
2026-03-13 15:20:49 -04:00
Kubernetes Publisher
9dc763689d Merge pull request #137298 from dims/dsri/cri-streaming-option-a-hardcut
cri streaming option a hardcut - add new staging repositories `streaming` and `cri-streaming`

Kubernetes-commit: 2bd6c7fe3cb8663804dc6e7672ff01aeebc97274
2026-03-17 07:59:59 +00:00
Kubernetes Publisher
c07c271a94 Merge pull request #137398 from Rajneesh180/fix-client-go-nil-event-key-v4
client-go: fix goroutine hot-loop in StartEventWatcher on broadcaster shutdown

Kubernetes-commit: 8ebee69b1587a71efb23144300dcf34bdbf2d3b3
2026-03-12 20:51:03 +00:00
Kubernetes Publisher
2517e8773a Merge pull request #137170 from pohly/dra-device-taints-beta
DRA device taints: graduate to beta

Kubernetes-commit: 4e2bbc78bf097afa70b67cb2814623558ab5f0b4
2026-03-12 20:51:02 +00:00
Kubernetes Publisher
3505da0deb Merge pull request #136792 from rata/userns-goes-ga
feature: Migrate UserNamespacesSupport to GA

Kubernetes-commit: f7f694e5e066149a41a7f94394f84977fc6d0ea6
2026-03-12 20:51:00 +00:00
Kubernetes Publisher
97ac09639d Merge pull request #137419 from michaelasp/rvInformerMetrics
Add metric tracking the latest cached rv of informers

Kubernetes-commit: fdbea745459cc570d8fc975c5fcbe42511472aea
2026-03-11 00:39:29 +00:00
Kubernetes Publisher
9cdd63fee2 Merge pull request #137343 from gnufied/prevent-podscheduling-optin
Add API changes to prevent pod scheduling via CSIDriver object

Kubernetes-commit: d47f3f253bcd462a5bfe40625de09fb3a4bc5f2b
2026-03-11 00:39:28 +00:00
Kubernetes Publisher
32a3ac47cf Merge pull request #137495 from pohly/klog-update
dependencies: klog v2.140.0

Kubernetes-commit: 9d0495ec93f7942b9fd6482df79820376a447eee
2026-03-10 16:39:19 +00:00
Kubernetes Publisher
e807f52104 Merge pull request #136435 from Jefftree/leaderelection-client-efficiency
Update leasecandidate client to read from cache

Kubernetes-commit: 4e3e58ffbe28674a5125cff183e8dacf97b07775
2026-03-10 16:39:14 +00:00
Antoni Zawodny
a179e3b9fb Create Workload API v1alpha2 (#136976)
* Drop WorkloadRef field and introduce SchedulingGroup field in Pod API

* Introduce v1alpha2 Workload and PodGroup APIs, drop v1alpha1 Workload API

Co-authored-by: yongruilin <yongrlin@outlook.com>

* Run hack/update-codegen.sh

* Adjust kube-scheduler code and integration tests to v1alpha2 API

* Drop v1alpha1 scheduling API group and run make update

---------

Co-authored-by: yongruilin <yongrlin@outlook.com>

Kubernetes-commit: 3f094dc228318b89f1fef313543b960e35ca6e3e
2026-03-10 04:41:24 +00:00
Kubernetes Publisher
4bf554630d Merge pull request #132922 from yt2985/client-fix
Fix the client-go issue of reloading trust root CAs.

Kubernetes-commit: a01d2e6cd45f7a299b56cacdd8a2d35078bef9b6
2026-03-10 04:41:20 +00:00
Hemant Kumar
2e882c6ea6 Update comment and regenerate API docs
Kubernetes-commit: dede11365be89384facd8226bb547f186446bee5
2026-03-09 12:01:46 -04:00
Kubernetes Publisher
6f2c112d22 Merge pull request #137497 from atombrella/feature/modernize_activate_forvar
Lint: Activate modernize/forvar rule in golangci-lint.

Kubernetes-commit: 090693bd79c405df9122179f5e399adf77b8c023
2026-03-09 12:38:51 +00:00
Kubernetes Publisher
2f31bfec5d Merge pull request #135048 from yliaog/beta_promo
DRA Extended Resource: promote to Beta in 1.36

Kubernetes-commit: f5bafe93ac3edd34de7eb9d59bde9043201c43e5
2026-03-06 20:26:31 +00:00
Patrick Ohly
88da827ca3 dependencies: klog v2.140.0
klog hasn't been updated in Kubernetes for a few releases. Several
enhancements have accumulated that are worth having.

Kubernetes-commit: 56e0565c113107bdea398b075aba5bdef43489ed
2026-03-06 17:43:11 +01:00
Kubernetes Publisher
c826020ed9 Merge pull request #137358 from xigang/processlister_log
client-go/cache: add slow-handler tracing in processorListener

Kubernetes-commit: 1f5701a46d6edeb396531968dc8ed332bf69e5f4
2026-03-06 08:24:26 +00:00
Kubernetes Publisher
c3a1049f7e Merge pull request #137456 from liggitt/go126
Update go.mod to go 1.26, fix 1.26 vet errors

Kubernetes-commit: 800a58b7c515b3d5e2677f6af37f9ece186b67c0
2026-03-06 08:24:25 +00:00
Kubernetes Publisher
989fb5d38c Merge pull request #137473 from jpbetz/fix-set-transform
Fix SetTransform to correctly override per-informer transforms

Kubernetes-commit: 3dceb579f797c88564d03a7bdf91ba8108ffd820
2026-03-06 08:24:22 +00:00
Kubernetes Publisher
294ecb1d8c Merge pull request #137304 from aaron-prindle/fieldsv1-encapsulation
refactor: fieldsv1 encapsulation via accessors and deprecation of direct "Raw" field usage

Kubernetes-commit: 4915f3f8b38318826654199003775d348d3cdafb
2026-03-06 04:24:12 +00:00
Joe Betz
c7f8506da0 Fix informer factory generation and add test
Kubernetes-commit: c0addb352e284feda34667f0a36c06da9f1cf2a6
2026-03-05 20:06:01 -05:00
Kubernetes Publisher
78536fe27c Merge pull request #137451 from dims/update-google-protobuf-deadcode-fix
Update google.golang.org/protobuf to v1.36.12-0.20260120151049-f2248ac996af to prevent file size explosion in go 1.26

Kubernetes-commit: 77c013637cb40e1b5d2b26664dc7b297f1ff2693
2026-03-05 20:24:49 +00:00
Rita Zhang
06163fb266 Move DRAAdminAccess feature to GA (#137373)
* Move DRAAdminAccess feature to GA

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

* address comments

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

---------

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

Kubernetes-commit: c4f88de33e02882e758da8667cfcaf939ed7bc1a
2026-03-05 20:24:46 +00:00
Davanum Srinivas
388997a877 Update google.golang.org/protobuf to v1.36.12-0.20260120151049-f2248ac996af
Pins google.golang.org/protobuf to HEAD commit f2248ac996afc39b3df0777cdcc269f6ade50b07
(v1.36.12-0.20260120151049-f2248ac996af) which includes fixes for dead code
elimination issues surfaced by Go 1.26's reflect changes.

Xref: https://github.com/golang/protobuf/issues/1704
Xref: https://github.com/kubernetes/kubernetes/issues/137445
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: c8826e0d235fde75d02643bd700179ed79897ad6
2026-03-05 09:36:13 -05:00
Kubernetes Publisher
a72ad3ccbc Merge pull request #137349 from Jefftree/fix-model-name-bounding-dirs
Pass --readonly-pkg to openapi-gen in kube_codegen.sh

Kubernetes-commit: ef8a14f679491f858968f49a847c393a3a3fc5e2
2026-03-05 04:26:03 +00:00
Kubernetes Publisher
9f41e94324 Merge pull request #137066 from cnuss/fix/issues/136823
client-go/cache: fix logging

Kubernetes-commit: 8020ce8511aab076f939b104c973b84cb7a1afc3
2026-03-05 00:25:36 +00:00
Mads Jensen
d91024383a Lint: Activate modernize/forvar rule in golangci-lint.
Kubernetes-commit: dd32d7c324b97d259b99c1464802d9e3ca706a94
2026-03-05 00:11:40 +01:00
Michael Aspinwall
aae801378e Add metric tracking the latest cached rv of informers
Kubernetes-commit: 9fb9e933b2ebae2d94edd29b7dec2c1df9e625a6
2026-03-04 22:13:54 +00:00
Aaron Prindle
3e4de9e6b4 refactor: update in-tree FieldsV1 consumers to use format-specific accessors
Kubernetes-commit: e57b3a74f37754c9455a3debafd25c88d434e69d
2026-03-04 21:44:21 +00:00
Jefftree
e45d8623ff update kube-openapi
Kubernetes-commit: 721eea74e75dc95bafbfa450bb2309e494abf45c
2026-03-04 15:33:47 -05:00
Rajneesh180
187c42c884 client-go: guard ResultChan() close in StartEventWatcher
When watch.Broadcaster.Shutdown() is called it drains all queued events
then calls closeAll(), which closes every watcher's result channel.
eventBroadcasterImpl.Shutdown() calls Broadcaster.Shutdown() first,
then calls the cancellation context's cancel() function.  Between those
two steps there is a window in which the result channel is closed while
the cancellation context is still live.

Without the two-value channel receive the goroutine in StartEventWatcher
would spin on the already-closed channel: each select iteration
immediately receives the zero-value watch.Event, the type assertion
fails (nil interface, ok == false), and the loop continues burning CPU
until the select scheduler eventually picks the cancelationCtx.Done()
case.

Guard against this by reading the ok boolean from the channel receive:

  case watchEvent, ok := <-watcher.ResultChan():
    if !ok {
      return
    }

This is the correct and idiomatic Go pattern for a channel that may be
closed by its producer.  Note that when this return path is taken the
broadcaster has already delivered every queued event (Broadcaster.Shutdown
blocks until the distribute loop exits before closeAll runs), so no
events are silently dropped.

Add a regression test (TestStartEventWatcherExitsOnDirectShutdown) that
creates a broadcaster without an external context so Shutdown() is
fully synchronous, starts a watcher, and verifies the goroutine exits
cleanly via goleak.VerifyNone.

Signed-off-by: Rajneesh180 <rajneeshrehsaan48@gmail.com>

Kubernetes-commit: 95c15b54069922b0a66c198a064577ea0a160694
2026-03-04 16:05:26 +05:30
Kubernetes Publisher
2dd466fcfe Merge pull request #137291 from everettraven/upstream/dv/maxLength-fixup
[Declarative Validation] Bring `k8s:maxLength` tag in line with OpenAPI `maxLength` validation semantics

Kubernetes-commit: e08e598df07bc929679ef046418992a8205da18f
2026-03-04 00:25:37 +00:00
Kubernetes Publisher
486be0fbf9 Merge pull request #135196 from harche/i133202
KEP-4680: Add message field support to DRA device health reporting

Kubernetes-commit: be6162afb876e60ded92780786519c976fc0be08
2026-03-03 20:25:21 +00:00
Kubernetes Publisher
e243a98fa8 Merge pull request #137167 from pohly/dra-device-taints-update-timestamp
DRA device taints: automatically bump TimeAdded when changing effect

Kubernetes-commit: 13010f06b270df96c4f558bdadcad93970000a53
2026-03-03 20:25:19 +00:00
xigang
f6c2d7ca65 client-go/cache: add slow-handler tracing in processorListener
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: ac1eb12281bdc7fb7e0269fb4bb914369b92bb64
2026-03-03 13:07:08 +08:00
Kubernetes Publisher
55e741a004 Merge pull request #137296 from michaelasp/fixListenerDeadlock
Fix listener deadlock in shared informer

Kubernetes-commit: 1879769b9354b6e47a13dac831aec6fe3e0368b6
2026-03-03 00:24:45 +00:00
Hemant Kumar
27966b2574 Update generated code
Kubernetes-commit: 143c56ddeb8ba470102d5145bbfafca898999763
2026-03-02 17:00:43 -05:00
tinatingyu
8776b282cc client-go CA rotation
Kubernetes-commit: b806a3207beb1afabc3d3d93fbadba38ffb8a110
2026-03-02 20:40:00 +00:00
Davanum Srinivas
9926c67348 staging: extract CRI streaming modules with client-go compatibility
Extract streaming code into dedicated staging modules while keeping stable
compatibility APIs for external client-go consumers.

This commit:
- adds `k8s.io/cri-streaming` for CRI exec/attach/portforward server code
- adds `k8s.io/streaming` as the canonical home for shared transport
  primitives (`httpstream`, `spdy`, `wsstream`, runtime helpers)
- switches in-tree transport consumers to `k8s.io/streaming`
- removes in-tree kubelet CRI streaming package
- preserves NO_PROXY/no_proxy CIDR handling in extracted SPDY proxier logic
- adds deprecated `k8s.io/apimachinery/pkg/util/httpstream` compatibility
  wrappers (`httpstream`, `spdy`, `wsstream`) backed by `k8s.io/streaming`
- restores exported client-go SPDY/portforward API signatures to
  apimachinery `httpstream` types for downstream compatibility
- adds streaming-native client-go adapters/constructors so in-tree callers
  can use `k8s.io/streaming` without changing external compatibility APIs
- deduplicates SPDY-over-websocket dial negotiation shared by compat and
  streaming tunneling dialers
- logs dropped unknown stream types in `RemoveStreams` adapter fallbacks to
  improve compatibility-path debuggability
- adds integration coverage for the streaming-upgrader-to-client-go-compat
  adapter path against a real cri-streaming exec endpoint
- clarifies kubectl streaming import aliasing to avoid `httpstream` package
  ambiguity
- updates tests, import restrictions, publishing metadata, and vendor/module
  metadata for the new staging modules

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 1ee1ff97fb7f9755a44d29bee0c80d2ccbed68dc
2026-02-28 19:40:07 -05:00
Eddie
c86837f7ed Promote sig-storage feature MutableCSINodeAllocatableCount to GA (#136230)
* Promote MutableCSINodeAllocatableCount to GA

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Lock MutableCSINodeAllocatableCount feature gate to default

Signed-off-by: Eddie Torres <torredil@amazon.com>

---------

Signed-off-by: Eddie Torres <torredil@amazon.com>

Kubernetes-commit: 41bb4b6a8b4e0f15ab7ffcc6369c68bc599fb957
2026-02-28 08:42:18 +00:00
Kubernetes Publisher
2f21ae3478 Merge pull request #137272 from pmengelbert/pmengelbert/kuberc_name_to_command/1
Rename `name` to `command` in kuberc credentialPluginAllowlist entries

Kubernetes-commit: cf876463cdf5571d2051096859779d9d210074b3
2026-02-27 20:42:02 +00:00
Bryce Palmer
b59431fbc5 update-codegen: regenerate generated files
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>

Kubernetes-commit: 729792e8700780f9cfbb4a14e74621ef219444c1
2026-02-27 15:23:12 -05:00
Michael Aspinwall
54ee8fecae Fix deadlock when listeners get added before processing starts
Kubernetes-commit: 0ce498ff21296f44dfa980d8679c0b7697e2d6b8
2026-02-27 18:55:39 +00:00
Kubernetes Publisher
f037d681ac Merge pull request #137286 from humblec/update-vendored-dependencies
Update vendored dependencies ( gomega/cadvisor)

Kubernetes-commit: 3f2ebc50eecfaeda23df4435dc82422fa65425ed
2026-02-27 16:41:07 +00:00
Humble Devassy Chirammal
99791c7452 dependencies: bump gomega to v1.39.1 and ginkgo to v2.28.1
Kubernetes-commit: 600d188f2b02eea974509062c04186309065ff16
2026-02-27 15:48:21 +05:30
Kubernetes Publisher
1f07d6645b Merge pull request #137189 from dhruv7539/codex/getlogs-reactor-support
client-go: make fake Pods.GetLogs honor reactors

Kubernetes-commit: 44b486f43c9792e812f849d9509449ac69edf55c
2026-02-27 03:58:18 +00:00
Kubernetes Publisher
efbad1b7ed Merge pull request #135775 from bitoku/no-noexec
Update OCI image volume type description to remove "noexec" attribute

Kubernetes-commit: 7d70fe491d50ebbc14a0495ee09fa0e922a2ff82
2026-02-27 03:58:16 +00:00
Hemant Kumar
73f4fa85e7 Update generated fields
Kubernetes-commit: 7d9e61be7ef21576e42ed533a233d7e985358b84
2026-02-26 15:49:52 -05:00
Kubernetes Publisher
f66040b9dc Merge pull request #137261 from tchap/kcm-le-check-context-canceled
client-go/leaderelection: Short-circuit on context canceled

Kubernetes-commit: 0a68f9849435bc5015e4e0ae5b4b661bb927b6db
2026-02-26 19:36:48 +00:00
Peter Engelbert
b840391f92 Rename AllowlistEntry clientcmd.Name to Command
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>

Kubernetes-commit: 505b937babc9ab0061ed346ec0278a3a605664ac
2026-02-26 13:27:46 -05:00
dhruv7539
1349319d7c client-go: error on invalid fake pod logs reactor object
Kubernetes-commit: 3ed316397734e59e9a39c662f70de1b86192db17
2026-02-26 09:58:23 -08:00
Ondra Kupka
8a32b4087c client-go/leaderelection: Check context canceled
The change introduced in 59cd1d0b3bb378f40a639e21b615f4df1d4a5a14
causes PollUntilContextTimeout to call the condition function even when
the context is canceled already. This is unnecessary in our case and
only leads to one extra loop of processing and extra error messages.
This change makes the renew loop behave like it did before the change.

Kubernetes-commit: aa494f8174d745c3d9842f3d48272a3c2d6dcbcc
2026-02-26 12:04:01 +01:00
Kubernetes Publisher
764b57d771 Merge pull request #129339 from pohly/log-client-go-features
client-go features: ignore contextual logging

Kubernetes-commit: 31d35e649098be997d31a6bbf9f6a982c486b0ab
2026-02-25 11:35:15 +00:00
dhruv7539
f1d9ba91c7 client-go: keep fake pod log action compatible
Kubernetes-commit: 60c697419d2695108a054d704334778e3d945a6c
2026-02-23 10:35:50 -08:00
Kubernetes Publisher
62f2159da2 Merge pull request #136937 from p0lyn0mial/upstream-reflector-list-unsupported-table
client-go/reflector: reject Table format resources in List and Watch paths

Kubernetes-commit: 3bc0b290e9c1cd81db1ed5119b242b5dfce931af
2026-02-23 18:10:18 +00:00
Kubernetes Publisher
00e45797cb Merge pull request #136923 from jpbetz/mock-limitations-docs
Explain limitations and maintenance policy of fake client

Kubernetes-commit: 21d8cca01dbec9e5e584d5684b2b3a8e8cd9364c
2026-02-23 10:10:45 +00:00
dhruv7539
e8eab37058 client-go: make fake Pods.GetLogs honor reactors
Kubernetes-commit: 3d41b434c0e88e9f74e38fe654d7b5bfd77090d0
2026-02-22 14:47:29 -08:00
Kubernetes Publisher
efc4692504 Merge pull request #135313 from oduludo/enable-commentstart-apiserverinternal
commentstart lint fixes for apiserverinternal API group

Kubernetes-commit: 8bfda5d315977489bd8a2fb1cfceaebd1ee7db8d
2026-02-21 22:09:34 +00:00
Ludo van Orden
648a945fad updated generated code
Kubernetes-commit: 156fc7981c8b8b0f4253420f47e3ad561e389ab9
2026-02-20 23:59:35 +01:00
Kubernetes Publisher
6b803d4e11 Merge pull request #136392 from skitt/unsupported-typo
Align IsWatchListSemanticsUnSupported comment

Kubernetes-commit: 15a2107890558876c35db3e44420575d657ac3a0
2026-02-20 18:10:21 +00:00
Patrick Ohly
f6cd0c0583 DRA device taints: generated files
Kubernetes-commit: 7d2781a0c3c02e2ad47714698f86175cd8b6ec72
2026-02-20 13:19:38 +01:00
Patrick Ohly
67f0d98034 DRA device taints: automatically bump TimeAdded when changing effect
In practice, TimeAdded is managed by the API server. When admins used
DeviceTaintRule to simulate eviction, then change the effect to really evict,
it is useful to calculate tolerations based on the time when that second
update happened. Therefore the TimeAdded field gets bumped automatically
when changing the effect.

Kubernetes-commit: f28dc4139208e64fe2882cd44d548c25020f2e3a
2026-02-20 12:35:40 +01:00
Kubernetes Publisher
100af76fc5 Merge pull request #137101 from richabanker/informer-metric-latency
Add processing latency metric for RealFIFO

Kubernetes-commit: 7336e04752a3ce946697c3524ed40104d6086b73
2026-02-20 02:13:22 +00:00
Jordan Liggitt
97646e5606 Fix vet error
Kubernetes-commit: 45900a1debee388738f299c0a001ed01e8b25208
2026-02-17 16:42:55 -05:00
Jordan Liggitt
103162f118 Bump to go 1.26
Kubernetes-commit: f291ae40b03afaaf49cca43b650bfbd05f4babee
2026-02-17 16:05:07 -05:00
Copilot
78fb6ed2e1 client-go/cache: Remove reflector context cancellation logging
The error returned from Until() is solely from context cancellation
which is expected behavior when the reflector is stopped. Logging
this as an error (or even at V(4)) creates unnecessary noise.

Kubernetes-commit: cc483208aa306b8c4078d4118cf78a10e58481ec
2026-02-16 22:04:52 -05:00
Richa Banker
59f55827e6 Add processing latency metric for RealFIFO
Kubernetes-commit: d049bd123391f4c1a86e493888560d8549a52dc2
2026-02-16 15:15:47 -08:00
Kubernetes Publisher
70ab833f66 Merge pull request #136039 from lalitc375/map-graduation
Promote MutatingAdmissionPolicy to v1 (GA)

Kubernetes-commit: b08fa0cdf18610be74d9741cf361446a5f42ff76
2026-02-18 22:09:27 +00:00
Rodrigo Campos
1d4002e88b Remove references to UserNamespacesSupport feature gate from core types
It's GA now. To regenerate the files I did:
        make WHAT=cmd/kube-apiserver
        make update

While we are there, remove the reference that the field is alpha.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>

Kubernetes-commit: 8db51091e82490bccc0018763ba7e05ffb8ab458
2026-02-12 11:14:43 +01:00
Rodrigo Campos
a63d33951d staging/testdata: Remove UserNamespacesSupport reference
This is just a sed to remove the old data from the text fixtures too.

While two files are clearly test data given that they include testdata
in their name, these two is not so obvious but are also test data:

	* openapi/swagger-with-shared-parameters.json: is referenced in "staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_test.go",
          in particular in this part: ´filepath.Join("..", "..", "artifacts", "openapi", "swagger-with-shared-parameters.json")´

	* batch.k8s.io_v1.json: is in
	  `staging/src/k8s.io/kubectl/pkg/explain/v2/templates/plaintext_test.go`,
          in a "//go:embed batch.k8s.io_v1.json".

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>

Kubernetes-commit: 8d0f80e4ed87658c0e05b9db0690927547be6ad5
2026-02-13 16:04:51 +01:00
Joe Betz
8304d788bb Explain limitations and maintenance policy of fake client
Kubernetes-commit: bce392d1a7dbbe1112d8113ec6539826bfdfcdca
2026-02-10 16:49:53 -05:00
Lukasz Szaszkiewicz
7b594c4c71 reflector: reject Table format resources in List and Watch paths
Kubernetes-commit: a46b1903a5426ede16d021b49c96d3f4ba7aea4d
2026-02-10 21:42:42 +01:00
liyuerich
fcb4eb8245 enable commentstart check on autoscaling API group
Signed-off-by: liyuerich <yue.li@daocloud.io>

Kubernetes-commit: ba3d29dbcf3f466ea8922d254870007b05958da3
2026-02-09 11:39:46 +08:00
Jefftree
d6503fcc3e Update leasecandidate client to read from cache
Kubernetes-commit: 5a306036a53754ce26938cedd89b2ddf3b105aa2
2026-01-22 16:55:50 +00:00
Stephen Kitt
80c1d965be Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: af5317bb8842ba758b92bd169056eb9a666198b8
2026-01-21 14:06:32 +01:00
Monis Khan
f5fc1e5f67 Add GC to client-go TLS cache
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: fa9a1fe5f7084c0a1371d87e880c1a9e58f935a4
2026-01-16 14:58:52 -05:00
yliao
e924e3f2c5 codegen
Kubernetes-commit: 58da2e682f1ecba5d848da4810c49ad6baf886a1
2026-01-14 21:34:37 +00:00
Lalit Chauhan
2ca150601d promote MutatingAdmissionPolicy to v1: add types and generated code
Kubernetes-commit: 5505c010fd7c29d24b2718ae8659a4296cb2cc37
2025-12-29 19:15:16 +00:00
Kubernetes Publisher
e334b2d6e7 Merge pull request #136895 from youwalther65/csr-create
Add CertificateSigningRequest create log entry for default kubelet debug level V2

Kubernetes-commit: 4edf082c406416b170d923e8f2c2cee69d933ae6
2026-02-18 06:10:00 +00:00
Kubernetes Publisher
6cda0df027 Merge pull request #136824 from cnuss/issues/136823
client-go: Replace deprecated BackoffManager with DelayFunc in Reflector

Kubernetes-commit: fb78de873af5e2611776f0c5093d994a9331f698
2026-02-13 04:27:35 +00:00
Kubernetes Publisher
fd1b7118fd Merge pull request #134675 from JoelSpeed/enable-kal-optionalorrequired-apiserver-internal
Enforce either optional or required tag on apiserverinternal API group

Kubernetes-commit: 9571e19da950a23312100fbb7c5d4fe76ce0413c
2026-02-13 04:27:34 +00:00
Kubernetes Publisher
ca54862893 Merge pull request #134827 from michaelasp/rvStore
Add Resource Version query and Bookmarks to thread safe store

Kubernetes-commit: 03da2455859aacb1e542e1e46a4c8b41750d55dc
2026-02-13 04:27:31 +00:00
Kubernetes Publisher
7aaede7872 Merge pull request #136921 from dims/dump-from-utils
Move dump package from apimachinery to k8s.io/utils

Kubernetes-commit: 5b63a8c68e8e4d417ab3758c7a80118c2db27ac9
2026-02-12 20:52:28 +00:00
Joel Speed
2c400a844a Restore omitempty on ServerStorageVersion fields
Kubernetes-commit: 82a9a99a44ce2c41fc07dfcd8651d89652659976
2026-02-12 17:59:07 +00:00
Kubernetes Publisher
9f57ca57bd Merge pull request #136729 from ahmedtd/podcert-pkcs10
Pod Certificates: Add StubPKCS10Request; migrate in-tree usages

Kubernetes-commit: 54489c1a338ba521f36f5b73667f03a8e164d18e
2026-02-12 00:52:04 +00:00
Kubernetes Publisher
0efa7daafd Merge pull request #136925 from michaelasp/pipeFeatureGate
Pipe feature gate of unlockWhileProcessing

Kubernetes-commit: 7b999810bf37c025ba146e3e1feae80b44eac6d6
2026-02-11 08:51:42 +00:00
Kubernetes Publisher
82ed9ba53e Merge pull request #135395 from pohly/apimachinery-wait-for-cache-sync
apimachinery + client-go + device taint eviction unit test: context-aware Start/WaitFor, waiting through channels

Kubernetes-commit: eb09a3c23e3c3905c89e996fcec2c02ba8c4bb0e
2026-02-11 08:51:41 +00:00
Kubernetes Publisher
07f99e4437 Merge pull request #135256 from natasha41575/pod-gen-field
remove Pod Generation feature gate from field descriptions

Kubernetes-commit: 99d4b4d426b751cc7ca3f7b3e118c899af8fbfde
2026-02-11 00:51:49 +00:00
Michael Aspinwall
b8c6b3c159 Pipe feature gates
Kubernetes-commit: 718ebb6dfc7a5a64ee17821a0de177e3a1eb11f0
2026-02-10 22:39:18 +00:00
Davanum Srinivas
decb8c0791 Move dump package from apimachinery to k8s.io/utils
Replace all imports of k8s.io/apimachinery/pkg/util/dump with
k8s.io/utils/dump across the repo. The apimachinery dump package
now contains deprecated wrapper functions that delegate to
k8s.io/utils/dump for backwards compatibility.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 550cc8645bedcc8b187e0ebeb52ead29d5631a32
2026-02-10 15:20:41 -05:00
Jens-Uwe Walther
18a54f0a40 Add CertificateSigningRequest create log entry for default kubelet debug level V2
Kubernetes-commit: b7bd70192397c5d52c18a5f85e87cec66ccc9a9f
2026-02-09 21:12:39 +01:00
Christian Nuss
b5668cea26 client-go: Replace deprecated BackoffManager with DelayFunc in Reflector
Move backoff documentation comments to var block for better discoverability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Kubernetes-commit: 33ebd41b2c1abdc03beabd9ccff3428a8fd46473
2026-02-07 12:04:08 -05:00
Taahir Ahmed
3721aecc15 Pod Certificates: make update
Kubernetes-commit: c76efb3a145830f40ee042b8823e83a973e24372
2026-02-03 20:26:42 -08:00
Michael Aspinwall
139a95c065 Plumb bookmark RVs to controller for observation
Kubernetes-commit: 428b903cd990762a2588fa471791d9c8c747c196
2026-01-28 22:30:06 +00:00
Michael Aspinwall
d883e606da Add rv query to store
Kubernetes-commit: 9c6ac550efa6e721c85b0f1074f26f734286fba9
2026-01-28 22:29:39 +00:00
Jian Zhang
cca86bddbd Add documentation for non-nil event requirement in cache key functions
Signed-off-by: Jian Zhang <jiazha@redhat.com>

Kubernetes-commit: 7035a837b5c5de89fc4fb41c8878ae1657695c60
2025-12-24 12:38:39 +08:00
Ayato Tokubi
1f85fd1a13 Update OCI image volume type description to remove "noexec" attribute
Signed-off-by: Ayato Tokubi <atokubi@redhat.com>

Kubernetes-commit: aa1e24659ee18378426fa3b83616c7d96e098bbe
2025-12-16 16:57:37 +00:00
Patrick Ohly
ff8083eb1d client-go informers: context-aware Start + WaitForCacheSync
Passing a context to StartWithContext enables context-aware reflector
logging. This is the main remaining source of log spam (output to stderr
instead of per-test logger) in controller unit tests.

WaitForCacheSynceWithContext takes advantage of the new cache.WaitFor +
NamedHasSynced functionality to finish "immediately" (= no virtual time
passed) in a synctest bubble. While at it, the return type gets improved so
that a failure is easier to handle.

Kubernetes-commit: 5ff323de791df88880f6e065f5de4b445e5c90ed
2025-11-21 16:23:44 +01:00
Patrick Ohly
e70bc766e0 client-go cache: wait for cache sync via channels, better logging
The main advantage is that waiting on channels creates a causal relationship
between goroutines which is visible to synctest. When a controller in a
synctest bubble does a WaitFor in a test's background goroutine for the
controller, the test can use synctest.Wait to wait for completion of cache
sync, without requiring any test specific "has controller synced" API. Without
this, the test had to poll or otherwise wait for the controller.

The polling in WaitForCacheSync moved the virtual clock forward by a random
amount, depending on how often it had to check in wait.Poll. Now tests can be
written such that all events during a test happen at a predictable time. This
will be demonstrated in a separate commit for the
pkg/controller/devicetainteviction unit test.

The benefit for normal production is immediate continuation when the last
informer is synced (not really a problem, but still...) and more important,
nicer logging thanks to the names associated with the thing that is being
waited for. The caller decides whether logging is enabled or disabled and
describes what is being waited for (typically informer caches, but maybe also
event handlers or even something else entirely as long as it implements the
DoneChecker interface).

Before:

    Waiting for caches to sync
    Caches are synced

After:

    Waiting for="cache and event handler sync"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.Pod"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.ResourceClaim"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.ResourceSlice"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.DeviceClass"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1alpha3.DeviceTaintRule"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.ResourceClaim + event handler k8s.io/kubernetes/pkg/controller/devicetainteviction.(*Controller).Run"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.Pod + event handler k8s.io/kubernetes/pkg/controller/devicetainteviction.(*Controller).Run"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1alpha3.DeviceTaintRule + event handler k8s.io/kubernetes/pkg/controller/devicetainteviction.(*Controller).Run"
    Done waiting for="cache and event handler sync" instance="SharedIndexInformer *v1.ResourceSlice + event handler k8s.io/kubernetes/pkg/controller/devicetainteviction.(*Controller).Run"

The "SharedIndexInformer *v1.Pod" is also how this appears in metrics.

Kubernetes-commit: fdcbb6cba9a04c028b158bf66d505df7431f63fe
2025-11-18 12:39:11 +01:00
Patrick Ohly
b37e79caad client-go cache: allow passing name+logger to DeltaFIFO, RealFIFO and Reflector
This improves logging and enables more informative waiting for cache sync in a
following commit. It addresses one klog.TODO in the Reflector.

The RealFIFOOptions and InformerOptions structs get extended the same way as
DeltaFIFOOptions before: a logger may be set, but it's not required. This is
not an API break.

That the name has to be passed separately is a bit annoying at first glance
because it could also be set directly on the logger through WithName, but
keeping it separate is better:
- name can be set without providing a logger
- name can be defaulted
- less code in the caller when passing through a logger and adding
  the name only in the field
- last but not least, extracting the name is not supported in a portable
  manner by logr

All in-tree references in production code get updated.

While at it, logging in the fifos gets updated to follow best practices: if
some code encounters an abnormal situation and then continues, it should use
utilruntime.HandleErrorWithLogger instead of normal error logging.

Existing "logger" fields get moved to the top because that is a more common
place for such a read-only field.

Kubernetes-commit: 45251e5f654e6c052659d110cd721f9fbe185191
2025-11-18 18:09:46 +01:00
carlory
6a81dca7e6 run make update
Signed-off-by: carlory <baofa.fan@daocloud.io>

Kubernetes-commit: 95460ea1f897a497d01641986e38cb56b5565bed
2025-11-18 17:35:11 +08:00
carlory
333a3455d5 Remove feature gate AnyVolumeDataSource
Signed-off-by: carlory <baofa.fan@daocloud.io>

Kubernetes-commit: 9a1b8cbe492cae9943160c5eaeba7b3caf1cf7c5
2025-11-18 17:26:20 +08:00
Natasha Sarkar
1ee3eb7041 remove Pod Generation feature gate from field descriptions
Kubernetes-commit: d5dabfcd658def79f6b1e1c3c680d5c1711e24f7
2025-11-11 16:44:33 +00:00
Kubernetes Publisher
8fcd3c218f Merge pull request #136826 from alvaroaleman/bumpv0.32
Bump structured merge diff to v6.3.2

Kubernetes-commit: 65f09e605cb206b2e5fcff4d69a4ae8acf62dbc3
2026-02-10 20:21:19 +00:00
Kubernetes Publisher
c6e2e47b31 Merge pull request #136455 from pohly/client-go-simpleclient-undeprecation
fake client-go: un-deprecate NewSimpleClientset

Kubernetes-commit: 09e1c9fe0ec3d3a61fa71c43610b42e1e3f53612
2026-02-10 00:00:21 +00:00
Alvaro Aleman
c02524f944 Bump structured merge diff to v6.3.2
Diff: https://github.com/kubernetes-sigs/structured-merge-diff/compare/v6.3.1...v6.3.2

It's just one change that prevents a NPD when an embedded pointer to a
struct is encountered.

Kubernetes-commit: f59cfe60ef2063e2383ebef416f9da05196903d6
2026-02-07 13:49:48 -05:00
Patrick Ohly
aac099e7c2 fake client-go: un-deprecate NewSimpleClientset
NewSimpleClientset was marked as deprecated when NewClientset was
introduced. This has caused some confusion:
- Not all packages have NewClientset (https://github.com/kubernetes/kubernetes/issues/135980).
- Tests that work with NewSimpleClientset fail when
  switched to NewClientset (https://github.com/kubernetes/kubernetes/issues/136327)
  because of missing CRD support (https://github.com/kubernetes/kubernetes/issues/126850).

It doesn't seem burdensome to keep NewSimpleClientset around forever. Some unit
tests may even prefer to use it when they don't need server-side apply (less
overhead). Therefore there is no need to deprecate it.

This avoids churn in the eco system because contributors no longer create PRs
"because the linter complains about the usage of a deprecated function".

Kubernetes-commit: e80da21868059f789c90105a00481fa8cef169e1
2026-01-23 11:20:40 +01:00
Carlos Eduardo Arango Gutierrez
7bb07cbe8e KEP-4680: Add message field support to DRA device health reporting
Author: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-Authored-By: Harshal Patil <12152047+harche@users.noreply.github.com>

Signed-off-by: Harshal Patil <12152047+harche@users.noreply.github.com>

Kubernetes-commit: ad6c155449e38d7cca22230fdb99ae02b65ccb59
2025-11-10 15:50:09 -05:00
Joel Speed
d416af4df4 Update generated code
Kubernetes-commit: 0ebf47cb080a207a4829ce8e604e51bb494d63fb
2025-10-23 11:11:45 +01:00
Patrick Ohly
3db82856dc client-go features: ignore contextual logging
The client-go feature gates implementation logs information about feature
states at V(1). Changing that would imply changing the Enabled method, which is
very intrusive because there are many callers which are not expected to log and
thus don't have access to a contextual logger.

The code is not active in Kubernetes components, those use the clientAdapter to
make client-go use the normal feature gate implementation, which doesn't log
anything. Therefore the code doesn't get changed and only annotated so that
logcheck won't complain.

Kubernetes-commit: ee9d998d6e0c89bcf2b39fc011bfbc916060d451
2024-12-09 13:00:47 +01:00
Patrick Ohly
23c1f4e30f client-go portforward + apiserver proxy: structured, contextual logging
When debugging, it helps to keep output from different connections
separate. This can be done with contextual logging and using different loggers
for each connection.

Cancellation is handled separately for requests. Therefore the new APIs only
add support for passing a logger instance.

Kubernetes-commit: a325a4223395dfa71005b8e5dd8ea60bd91d9329
2024-12-04 15:21:11 +01:00
443 changed files with 12540 additions and 3382 deletions

5
OWNERS
View File

@@ -2,7 +2,6 @@
approvers:
- aojea
- caesarxuchao
- deads2k
- liggitt
- smarterclayton
@@ -12,8 +11,6 @@ approvers:
- enj
reviewers:
- aojea
- apelisse
- caesarxuchao
- deads2k
- jpbetz
- liggitt
@@ -27,4 +24,6 @@ reviewers:
labels:
- sig/api-machinery
emeritus_approvers:
- apelisse
- caesarxuchao
- lavalamp

View File

@@ -1,6 +1,7 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- apelisse
- jpbetz
- api-approvers
emeritus_approvers:
- apelisse

View File

@@ -0,0 +1,81 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ApplyConfigurationApplyConfiguration represents a declarative configuration of the ApplyConfiguration type for use
// with apply.
//
// ApplyConfiguration defines the desired configuration values of an object.
type ApplyConfigurationApplyConfiguration struct {
// expression will be evaluated by CEL to create an apply configuration.
// ref: https://github.com/google/cel-spec
//
// Apply configurations are declared in CEL using object initialization. For example, this CEL expression
// returns an apply configuration to set a single field:
//
// Object{
// spec: Object.spec{
// serviceAccountName: "example"
// }
// }
//
// Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of
// values not included in the apply configuration.
//
// CEL expressions have access to the object types needed to create apply configurations:
//
// - 'Object' - CEL type of the resource object.
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
//
// CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
//
// - 'object' - The object from the incoming request. The value is null for DELETE requests.
// - 'oldObject' - The existing object. The value is null for CREATE requests.
// - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
// - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
// - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
// - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
// For example, a variable named 'foo' can be accessed as 'variables.foo'.
// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
// request resource.
//
// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
// object. No other metadata properties are accessible.
//
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
// Required.
Expression *string `json:"expression,omitempty"`
}
// ApplyConfigurationApplyConfiguration constructs a declarative configuration of the ApplyConfiguration type for use with
// apply.
func ApplyConfiguration() *ApplyConfigurationApplyConfiguration {
return &ApplyConfigurationApplyConfiguration{}
}
// WithExpression sets the Expression field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Expression field is set to the value of the last call.
func (b *ApplyConfigurationApplyConfiguration) WithExpression(value string) *ApplyConfigurationApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,105 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// JSONPatchApplyConfiguration represents a declarative configuration of the JSONPatch type for use
// with apply.
//
// JSONPatch defines a JSON Patch.
type JSONPatchApplyConfiguration struct {
// expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).
// ref: https://github.com/google/cel-spec
//
// expression must return an array of JSONPatch values.
//
// For example, this CEL expression returns a JSON patch to conditionally modify a value:
//
// [
// JSONPatch{op: "test", path: "/spec/example", value: "Red"},
// JSONPatch{op: "replace", path: "/spec/example", value: "Green"}
// ]
//
// To define an object for the patch value, use Object types. For example:
//
// [
// JSONPatch{
// op: "add",
// path: "/spec/selector",
// value: Object.spec.selector{matchLabels: {"environment": "test"}}
// }
// ]
//
// To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example:
//
// [
// JSONPatch{
// op: "add",
// path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"),
// value: "test"
// },
// ]
//
// CEL expressions have access to the types needed to create JSON patches and objects:
//
// - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.
// See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,
// integer, array, map or object. If set, the 'path' and 'from' fields must be set to a
// [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL
// function may be used to escape path keys containing '/' and '~'.
// - 'Object' - CEL type of the resource object.
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
//
// CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
//
// - 'object' - The object from the incoming request. The value is null for DELETE requests.
// - 'oldObject' - The existing object. The value is null for CREATE requests.
// - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
// - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
// - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
// - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
// For example, a variable named 'foo' can be accessed as 'variables.foo'.
// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
// request resource.
//
// CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)
// as well as:
//
// - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).
//
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
// Required.
Expression *string `json:"expression,omitempty"`
}
// JSONPatchApplyConfiguration constructs a declarative configuration of the JSONPatch type for use with
// apply.
func JSONPatch() *JSONPatchApplyConfiguration {
return &JSONPatchApplyConfiguration{}
}
// WithExpression sets the Expression field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Expression field is set to the value of the last call.
func (b *JSONPatchApplyConfiguration) WithExpression(value string) *JSONPatchApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,274 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MutatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicy type for use
// with apply.
//
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
type MutatingAdmissionPolicyApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicy.
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
}
// MutatingAdmissionPolicy constructs a declarative configuration of the MutatingAdmissionPolicy type for use with
// apply.
func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfiguration {
b := &MutatingAdmissionPolicyApplyConfiguration{}
b.WithName(name)
b.WithKind("MutatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractMutatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from
// mutatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
// ExtractMutatingAdmissionPolicyFrom provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) {
b := &MutatingAdmissionPolicyApplyConfiguration{}
err := managedfields.ExtractInto(mutatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingAdmissionPolicy"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(mutatingAdmissionPolicy.Name)
b.WithKind("MutatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from
// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a
// MutatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
// ExtractMutatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) {
return ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy, fieldManager, "")
}
func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *MutatingAdmissionPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *MutatingAdmissionPolicyApplyConfiguration) WithSpec(value *MutatingAdmissionPolicySpecApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration {
b.Spec = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *MutatingAdmissionPolicyApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *MutatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *MutatingAdmissionPolicyApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *MutatingAdmissionPolicyApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View File

@@ -0,0 +1,284 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MutatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBinding type for use
// with apply.
//
// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources.
// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators
// configure policies for clusters.
//
// For a given admission request, each binding will cause its policy to be
// evaluated N times, where N is 1 for policies/bindings that don't use
// params, otherwise N is the number of parameters selected by the binding.
// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).
//
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
// MutatingAdmissionPolicyBinding constructs a declarative configuration of the MutatingAdmissionPolicyBinding type for use with
// apply.
func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b := &MutatingAdmissionPolicyBindingApplyConfiguration{}
b.WithName(name)
b.WithKind("MutatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractMutatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from
// mutatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
// ExtractMutatingAdmissionPolicyBindingFrom provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) {
b := &MutatingAdmissionPolicyBindingApplyConfiguration{}
err := managedfields.ExtractInto(mutatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingAdmissionPolicyBinding"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(mutatingAdmissionPolicyBinding.Name)
b.WithKind("MutatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from
// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a
// MutatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
// ExtractMutatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) {
return ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding, fieldManager, "")
}
func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *MutatingAdmissionPolicyBindingSpecApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration {
b.Spec = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View File

@@ -0,0 +1,75 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// MutatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use
// with apply.
//
// MutatingAdmissionPolicyBindingSpec defines the specification of the MutatingAdmissionPolicyBinding.
type MutatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to.
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
// Required.
PolicyName *string `json:"policyName,omitempty"`
// paramRef specifies the parameter resource used to configure the admission control policy.
// It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy.
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied.
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
// matchResources limits what resources match this binding and may be mutated by it.
// Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and
// matchConditions before the resource may be mutated.
// When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints
// and matchConditions must match for the resource to be mutated.
// Additionally, matchResources.resourceRules are optional and do not constraint matching when unset.
// Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required.
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
// '*' matches CREATE, UPDATE and CONNECT.
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
}
// MutatingAdmissionPolicyBindingSpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use with
// apply.
func MutatingAdmissionPolicyBindingSpec() *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
return &MutatingAdmissionPolicyBindingSpecApplyConfiguration{}
}
// WithPolicyName sets the PolicyName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PolicyName field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
b.PolicyName = &value
return b
}
// WithParamRef sets the ParamRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamRef field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
b.ParamRef = value
return b
}
// WithMatchResources sets the MatchResources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchResources field is set to the value of the last call.
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
b.MatchResources = value
return b
}

View File

@@ -0,0 +1,172 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
)
// MutatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicySpec type for use
// with apply.
//
// MutatingAdmissionPolicySpec defines the desired behavior of the admission policy.
type MutatingAdmissionPolicySpecApplyConfiguration struct {
// paramKind specifies the kind of resources used to parameterize this policy.
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
// If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
// If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// matchConstraints specifies what resources this policy is designed to validate.
// The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints.
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
// MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding.
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
// '*' matches CREATE, UPDATE and CONNECT.
// Required.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// variables contain definitions of variables that can be used in composition of other expressions.
// Each variable is defined as a named CEL expression.
// The variables defined here will be available under `variables` in other expressions of the policy
// except matchConditions because matchConditions are evaluated before the rest of the policy.
//
// The expression of a variable can refer to other variables defined earlier in the list but not those after.
// Thus, variables must be sorted by the order of first appearance and acyclic.
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
// mutations contain operations to perform on matching objects.
// mutations may not be empty; a minimum of one mutation is required.
// mutations are evaluated in order, and are reinvoked according to
// the reinvocationPolicy.
// The mutations of a policy are invoked for each binding of this policy
// and reinvocation of mutations occurs on a per binding basis.
Mutations []MutationApplyConfiguration `json:"mutations,omitempty"`
// failurePolicy defines how to handle failures for the admission policy. Failures can
// occur from CEL expression parse errors, type check errors, runtime errors and invalid
// or mis-configured policy definitions or bindings.
//
// A policy is invalid if paramKind refers to a non-existent Kind.
// A binding is invalid if paramRef.name refers to a non-existent resource.
//
// failurePolicy does not define how validations that evaluate to false are handled.
//
// Allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
// matchConditions is a list of conditions that must be met for a request to be validated.
// Match conditions filter requests that have already been matched by the matchConstraints.
// An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.
//
// If a parameter object is provided, it can be accessed via the `params` handle in the same
// manner as validation expressions.
//
// The exact matching logic is (in order):
// 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
// 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
// 3. If any matchCondition evaluates to an error (but none are FALSE):
// - If failurePolicy=Fail, reject the request
// - If failurePolicy=Ignore, the policy is skipped
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding
// as part of a single admission evaluation.
// Allowed values are "Never" and "IfNeeded".
//
// Never: These mutations will not be called more than once per binding in a single admission evaluation.
//
// IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of
// order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only
// reinvoked when mutations change the object after this mutation is invoked.
// Required.
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
}
// MutatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicySpec type for use with
// apply.
func MutatingAdmissionPolicySpec() *MutatingAdmissionPolicySpecApplyConfiguration {
return &MutatingAdmissionPolicySpecApplyConfiguration{}
}
// WithParamKind sets the ParamKind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamKind field is set to the value of the last call.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
b.ParamKind = value
return b
}
// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchConstraints field is set to the value of the last call.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
b.MatchConstraints = value
return b
}
// WithVariables adds the given value to the Variables field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Variables field.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVariables")
}
b.Variables = append(b.Variables, *values[i])
}
return b
}
// WithMutations adds the given value to the Mutations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Mutations field.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMutations(values ...*MutationApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMutations")
}
b.Mutations = append(b.Mutations, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *MutatingAdmissionPolicySpecApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}
// WithReinvocationPolicy sets the ReinvocationPolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ReinvocationPolicy field is set to the value of the last call.
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithReinvocationPolicy(value admissionregistrationv1.ReinvocationPolicyType) *MutatingAdmissionPolicySpecApplyConfiguration {
b.ReinvocationPolicy = &value
return b
}

View File

@@ -32,7 +32,7 @@ import (
//
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
type MutatingWebhookConfigurationApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// webhooks is a list of webhooks and the affected resources and operations.

View File

@@ -0,0 +1,72 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
)
// MutationApplyConfiguration represents a declarative configuration of the Mutation type for use
// with apply.
//
// Mutation specifies the CEL expression which is used to apply the Mutation.
type MutationApplyConfiguration struct {
// patchType indicates the patch strategy used.
// Allowed values are "ApplyConfiguration" and "JSONPatch".
// Required.
PatchType *admissionregistrationv1.PatchType `json:"patchType,omitempty"`
// applyConfiguration defines the desired configuration values of an object.
// The configuration is applied to the admission object using
// [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff).
// A CEL expression is used to create apply configuration.
ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"`
// jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object.
// A CEL expression is used to create the JSON patch.
JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"`
}
// MutationApplyConfiguration constructs a declarative configuration of the Mutation type for use with
// apply.
func Mutation() *MutationApplyConfiguration {
return &MutationApplyConfiguration{}
}
// WithPatchType sets the PatchType field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PatchType field is set to the value of the last call.
func (b *MutationApplyConfiguration) WithPatchType(value admissionregistrationv1.PatchType) *MutationApplyConfiguration {
b.PatchType = &value
return b
}
// WithApplyConfiguration sets the ApplyConfiguration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ApplyConfiguration field is set to the value of the last call.
func (b *MutationApplyConfiguration) WithApplyConfiguration(value *ApplyConfigurationApplyConfiguration) *MutationApplyConfiguration {
b.ApplyConfiguration = value
return b
}
// WithJSONPatch sets the JSONPatch field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the JSONPatch field is set to the value of the last call.
func (b *MutationApplyConfiguration) WithJSONPatch(value *JSONPatchApplyConfiguration) *MutationApplyConfiguration {
b.JSONPatch = value
return b
}

View File

@@ -30,7 +30,7 @@ type NamedRuleWithOperationsApplyConfiguration struct {
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
ResourceNames []string `json:"resourceNames,omitempty"`
// RuleWithOperations is a tuple of Operations and Resources.
RuleWithOperationsApplyConfiguration `json:",inline"`
RuleWithOperationsApplyConfiguration `json:""`
}
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with

View File

@@ -35,7 +35,7 @@ type RuleWithOperationsApplyConfiguration struct {
Operations []admissionregistrationv1.OperationType `json:"operations,omitempty"`
// Rule is embedded, it describes other criteria of the rule, like
// APIGroups, APIVersions, Resources, etc.
RuleApplyConfiguration `json:",inline"`
RuleApplyConfiguration `json:""`
}
// RuleWithOperationsApplyConfiguration constructs a declarative configuration of the RuleWithOperations type for use with

View File

@@ -32,7 +32,7 @@ import (
//
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
type ValidatingAdmissionPolicyApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicy.

View File

@@ -42,7 +42,7 @@ import (
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.

View File

@@ -32,7 +32,7 @@ import (
//
// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
type ValidatingWebhookConfigurationApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// webhooks is a list of webhooks and the affected resources and operations.

View File

@@ -32,7 +32,7 @@ import (
//
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
type MutatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicy.

View File

@@ -42,7 +42,7 @@ import (
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.

View File

@@ -31,7 +31,7 @@ type NamedRuleWithOperationsApplyConfiguration struct {
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
ResourceNames []string `json:"resourceNames,omitempty"`
// RuleWithOperations is a tuple of Operations and Resources.
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
v1.RuleWithOperationsApplyConfiguration `json:""`
}
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with

View File

@@ -32,7 +32,7 @@ import (
//
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicy.

View File

@@ -42,7 +42,7 @@ import (
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.

View File

@@ -32,7 +32,7 @@ import (
//
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
type MutatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicy.

View File

@@ -42,7 +42,7 @@ import (
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.

View File

@@ -33,7 +33,7 @@ import (
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.
type MutatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// webhooks is a list of webhooks and the affected resources and operations.

View File

@@ -31,7 +31,7 @@ type NamedRuleWithOperationsApplyConfiguration struct {
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
ResourceNames []string `json:"resourceNames,omitempty"`
// RuleWithOperations is a tuple of Operations and Resources.
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
v1.RuleWithOperationsApplyConfiguration `json:""`
}
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with

View File

@@ -32,7 +32,7 @@ import (
//
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicy.

View File

@@ -42,7 +42,7 @@ import (
// Adding/removing policies, bindings, or params can not affect whether a
// given (policy, binding, param) combination is within its own CEL budget.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.

View File

@@ -33,7 +33,7 @@ import (
// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.
type ValidatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// webhooks is a list of webhooks and the affected resources and operations.

View File

@@ -24,15 +24,16 @@ package v1alpha1
// An API server instance reports the version it can decode and the version it
// encodes objects to when persisting objects in the backend.
type ServerStorageVersionApplyConfiguration struct {
// The ID of the reporting API server.
// apiServerID is the ID of the reporting API server.
APIServerID *string `json:"apiServerID,omitempty"`
// The API server encodes the object to this version when persisting it in
// encodingVersion the API server encodes the object to when persisting it in
// the backend (e.g., etcd).
EncodingVersion *string `json:"encodingVersion,omitempty"`
// decodableVersions are the encoding versions the API server can handle to decode.
// The API server can decode objects encoded in these versions.
// The encodingVersion must be included in the decodableVersions.
DecodableVersions []string `json:"decodableVersions,omitempty"`
// The API server can serve these versions.
// servedVersions lists all versions the API server can serve.
// DecodableVersions must include all ServedVersions.
ServedVersions []string `json:"servedVersions,omitempty"`
}

View File

@@ -32,12 +32,13 @@ import (
//
// Storage version of a specific resource.
type StorageVersionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata.
// The name is <group>.<resource>.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec is an empty spec. It is here to comply with Kubernetes API style.
// spec is an empty spec. It is here to comply with Kubernetes API style.
Spec *apiserverinternalv1alpha1.StorageVersionSpec `json:"spec,omitempty"`
// API server instances report the version they can decode and the version they
// status on the version the API server instance can decode from and
// encode objects to when persisting objects in the backend.
Status *StorageVersionStatusApplyConfiguration `json:"status,omitempty"`
}

View File

@@ -28,17 +28,17 @@ import (
//
// Describes the state of the storageVersion at a certain point.
type StorageVersionConditionApplyConfiguration struct {
// Type of the condition.
// type of the condition.
Type *apiserverinternalv1alpha1.StorageVersionConditionType `json:"type,omitempty"`
// Status of the condition, one of True, False, Unknown.
// status of the condition, one of True, False, Unknown.
Status *apiserverinternalv1alpha1.ConditionStatus `json:"status,omitempty"`
// If set, this represents the .metadata.generation that the condition was set based upon.
// observedGeneration represents the .metadata.generation that the condition was set based upon, if field is set.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// Last time the condition transitioned from one status to another.
// lastTransitionTime is the last time the condition transitioned from one status to another.
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
// The reason for the condition's last transition.
// reason for the condition's last transition.
Reason *string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
// message is a human readable string indicating details about the transition.
Message *string `json:"message,omitempty"`
}

View File

@@ -24,14 +24,15 @@ package v1alpha1
// API server instances report the versions they can decode and the version they
// encode objects to when persisting objects in the backend.
type StorageVersionStatusApplyConfiguration struct {
// The reported versions per API server instance.
// storageVersions lists the reported versions per API server instance.
StorageVersions []ServerStorageVersionApplyConfiguration `json:"storageVersions,omitempty"`
// If all API server instances agree on the same encoding storage version,
// then this field is set to that version. Otherwise this field is left empty.
// commonEncodingVersion is set to an encoding storage version if all API server
// instances share that same version. If they don't share one storage version, this
// field is left empty.
// API servers should finish updating its storageVersionStatus entry before
// serving write operations, so that this field will be in sync with the reality.
CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty"`
// The latest available observations of the storageVersion's state.
// conditions lists the latest available observations of the storageVersion's state.
Conditions []StorageVersionConditionApplyConfiguration `json:"conditions,omitempty"`
}

View File

@@ -41,7 +41,7 @@ import (
// it may be subject to name and representation changes in future releases, and clients should not
// depend on its stability. It is primarily for internal use by controllers.
type ControllerRevisionApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// DaemonSet represents the configuration of a daemon set.
type DaemonSetApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// Deployment enables declarative updates for Pods and ReplicaSets.
type DeploymentApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
type ReplicaSetApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// If the Labels of a ReplicaSet are empty, they are defaulted to
// be the same as the Pod(s) that the ReplicaSet manages.
// Standard object's metadata.

View File

@@ -38,7 +38,7 @@ import (
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSetApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -43,7 +43,7 @@ import (
// it may be subject to name and representation changes in future releases, and clients should not
// depend on its stability. It is primarily for internal use by controllers.
type ControllerRevisionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -34,7 +34,7 @@ import (
// more information.
// Deployment enables declarative updates for Pods and ReplicaSets.
type DeploymentApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Specification of the desired behavior of the Deployment.

View File

@@ -40,7 +40,7 @@ import (
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec defines the desired identities of pods in this set.
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`

View File

@@ -36,7 +36,7 @@ type StatefulSetSpecApplyConfiguration struct {
// TODO: Consider a rename of this field.
Replicas *int32 `json:"replicas,omitempty"`
// selector is a label query over pods that should match the replica count.
// If empty, defaulted to labels on the pod template.
// It must match the pod template's labels.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// template is the object that describes the pod that will be created if

View File

@@ -43,7 +43,7 @@ import (
// it may be subject to name and representation changes in future releases, and clients should not
// depend on its stability. It is primarily for internal use by controllers.
type ControllerRevisionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -34,7 +34,7 @@ import (
// more information.
// DaemonSet represents the configuration of a daemon set.
type DaemonSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -34,7 +34,7 @@ import (
// more information.
// Deployment enables declarative updates for Pods and ReplicaSets.
type DeploymentApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Specification of the desired behavior of the Deployment.

View File

@@ -34,7 +34,7 @@ import (
// more information.
// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
type ReplicaSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// If the Labels of a ReplicaSet are empty, they are defaulted to
// be the same as the Pod(s) that the ReplicaSet manages.
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

View File

@@ -30,7 +30,7 @@ import (
//
// Scale represents a scaling request for a resource.
type ScaleApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.

View File

@@ -40,7 +40,7 @@ import (
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec defines the desired identities of pods in this set.
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`

View File

@@ -32,8 +32,8 @@ import (
//
// configuration of a horizontal pod autoscaler.
type HorizontalPodAutoscalerApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"`

View File

@@ -23,7 +23,7 @@ package v1
//
// specification of a horizontal pod autoscaler.
type HorizontalPodAutoscalerSpecApplyConfiguration struct {
// reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
// scaleTargetRef is the reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
// and will set the desired number of pods by using its Scale subresource.
ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"`
// minReplicas is the lower limit for the number of replicas to which the autoscaler

View File

@@ -29,8 +29,8 @@ import (
//
// Scale represents a scaling request for a resource.
type ScaleApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
metav1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Spec *ScaleSpecApplyConfiguration `json:"spec,omitempty"`

View File

@@ -34,7 +34,7 @@ import (
// autoscaler, which automatically manages the replica count of any resource
// implementing the scale subresource based on the metrics specified.
type HorizontalPodAutoscalerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata is the standard object metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -42,6 +42,10 @@ type HorizontalPodAutoscalerConditionApplyConfiguration struct {
// message is a human-readable explanation containing details about
// the transition
Message *string `json:"message,omitempty"`
// observedGeneration represents the .metadata.generation that the condition was set based upon.
// For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
// with respect to the current state of the instance.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
}
// HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with
@@ -89,3 +93,11 @@ func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value s
b.Message = &value
return b
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.ObservedGeneration = &value
return b
}

View File

@@ -43,7 +43,7 @@ type MetricStatusApplyConfiguration struct {
// Kubernetes, and have special scaling options on top of those available
// to normal per-pod metrics using the "pods" source.
Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"`
// container resource refers to a resource metric (such as those specified in
// containerResource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing a single container in each pod in the
// current scale target (e.g. CPU or memory). Such metrics are built in to
// Kubernetes, and have special scaling options on top of those available

View File

@@ -32,7 +32,7 @@ type MetricValueStatusApplyConfiguration struct {
// averageValue is the current value of the average of the
// metric across all relevant pods (as a quantity)
AverageValue *resource.Quantity `json:"averageValue,omitempty"`
// currentAverageUtilization is the current value of the average of the
// averageUtilization is the current value of the average of the
// resource metric across all relevant pods, represented as a percentage of
// the requested value of the resource for the pods.
AverageUtilization *int32 `json:"averageUtilization,omitempty"`

View File

@@ -28,7 +28,7 @@ type ObjectMetricStatusApplyConfiguration struct {
Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"`
// current contains the current value for the given metric
Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"`
// DescribedObject specifies the descriptions of a object,such as kind,name apiVersion
// describedObject specifies the descriptions of a object,such as kind,name apiVersion
DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"`
}

View File

@@ -32,7 +32,7 @@ import (
//
// CronJob represents the configuration of a single cron job.
type CronJobApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// Job represents the configuration of a single job.
type JobApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -69,9 +69,6 @@ type JobStatusApplyConfiguration struct {
Failed *int32 `json:"failed,omitempty"`
// The number of pods which are terminating (in phase Pending or Running
// and have a deletionTimestamp).
//
// This field is beta-level. The job controller populates the field when
// the feature gate JobPodReplacementPolicy is enabled (enabled by default).
Terminating *int32 `json:"terminating,omitempty"`
// completedIndexes holds the completed indexes when .spec.completionMode =
// "Indexed" in a text format. The indexes are represented as decimal integers

View File

@@ -32,7 +32,7 @@ import (
//
// CronJob represents the configuration of a single cron job.
type CronJobApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -41,7 +41,7 @@ import (
// (with the "kubernetes.io/kube-apiserver-client" signerName),
// or to obtain certificates from custom non-Kubernetes signers.
type CertificateSigningRequestApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the certificate request, and is immutable after creation.
// Only the request, signerName, expirationSeconds, and usages fields can be set on creation.

View File

@@ -46,7 +46,7 @@ import (
// anchors for that signer. Admission control is used to enforce that only users
// with permissions on the signer can create or modify the corresponding bundle.
type ClusterTrustBundleApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata contains the object metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the signer (if any) and trust anchors.

View File

@@ -32,7 +32,7 @@ import (
//
// Describes a certificate signing request
type CertificateSigningRequestApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the certificate request, and is immutable after creation.
// Only the request, signerName, expirationSeconds, and usages fields can be set on creation.

View File

@@ -46,7 +46,7 @@ import (
// anchors for that signer. Admission control is used to enforce that only users
// with permissions on the signer can create or modify the corresponding bundle.
type ClusterTrustBundleApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata contains the object metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the signer (if any) and trust anchors.

View File

@@ -35,7 +35,7 @@ import (
//
// Kubelets use this API to implement podCertificate projected volumes
type PodCertificateRequestApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// metadata contains the object metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the details about the certificate being requested.

View File

@@ -62,8 +62,7 @@ type PodCertificateRequestSpecApplyConfiguration struct {
// `kubernetes.io` signers will never issue certificates with a lifetime
// longer than 24 hours.
MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"`
// pkixPublicKey is the PKIX-serialized public key the signer will issue the
// certificate to.
// The PKIX-serialized public key the signer will issue the certificate to.
//
// The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521,
// or ED25519. Note that this list may be expanded in the future.
@@ -74,9 +73,14 @@ type PodCertificateRequestSpecApplyConfiguration struct {
// setting a status.conditions entry with a type of "Denied" and a reason of
// "UnsupportedKeyType". It may also suggest a key type that it does support
// in the message field.
//
// Deprecated: This field is replaced by StubPKCS10Request. If
// StubPKCS10Request is set, this field must be empty. Signer
// implementations should extract the public key from the StubPKCS10Request
// field.
PKIXPublicKey []byte `json:"pkixPublicKey,omitempty"`
// proofOfPossession proves that the requesting kubelet holds the private
// key corresponding to pkixPublicKey.
// A proof that the requesting kubelet holds the private key corresponding
// to pkixPublicKey.
//
// It is contructed by signing the ASCII bytes of the pod's UID using
// `pkixPublicKey`.
@@ -93,9 +97,31 @@ type PodCertificateRequestSpecApplyConfiguration struct {
// golang library function crypto/ecdsa.SignASN1)
//
// If the key is an ED25519 key, the the signature is as described by the
// [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by
// the golang library crypto/ed25519.Sign).
// [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the
// golang library crypto/ed25519.Sign).
//
// Deprecated: This field is replaced by StubPKCS10Request. If
// StubPKCS10Request is set, this field must be empty.
ProofOfPossession []byte `json:"proofOfPossession,omitempty"`
// A PKCS#10 certificate signing request (DER-serialized) generated by
// Kubelet using the subject private key.
//
// Most signer implementations will ignore the contents of the CSR except to
// extract the subject public key. The API server automatically verifies the
// CSR signature during admission, so the signer does not need to repeat the
// verification. CSRs generated by kubelet are completely empty.
//
// The subject public key must be one of RSA3072, RSA4096, ECDSAP256,
// ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in
// the future.
//
// Signer implementations do not need to support all key types supported by
// kube-apiserver and kubelet. If a signer does not support the key type
// used for a given PodCertificateRequest, it must deny the request by
// setting a status.conditions entry with a type of "Denied" and a reason of
// "UnsupportedKeyType". It may also suggest a key type that it does support
// in the message field.
StubPKCS10Request []byte `json:"stubPKCS10Request,omitempty"`
// unverifiedUserAnnotations allow pod authors to pass additional information to
// the signer implementation. Kubernetes does not restrict or validate this
// metadata in any way.
@@ -199,6 +225,16 @@ func (b *PodCertificateRequestSpecApplyConfiguration) WithProofOfPossession(valu
return b
}
// WithStubPKCS10Request adds the given value to the StubPKCS10Request field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the StubPKCS10Request field.
func (b *PodCertificateRequestSpecApplyConfiguration) WithStubPKCS10Request(values ...byte) *PodCertificateRequestSpecApplyConfiguration {
for i := range values {
b.StubPKCS10Request = append(b.StubPKCS10Request, values[i])
}
return b
}
// WithUnverifiedUserAnnotations puts the entries into the UnverifiedUserAnnotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the UnverifiedUserAnnotations field,

View File

@@ -32,7 +32,7 @@ import (
//
// Lease defines a lease concept.
type LeaseApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the specification of the Lease.

View File

@@ -33,7 +33,7 @@ import (
// LeaseCandidate defines a candidate for a Lease object.
// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
type LeaseCandidateApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the specification of the Lease.

View File

@@ -32,7 +32,7 @@ import (
//
// Lease defines a lease concept.
type LeaseApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the specification of the Lease.

View File

@@ -33,7 +33,7 @@ import (
// LeaseCandidate defines a candidate for a Lease object.
// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
type LeaseCandidateApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
v1.TypeMetaApplyConfiguration `json:""`
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec contains the specification of the Lease.

View File

@@ -33,7 +33,7 @@ import (
// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
// Deprecated: This API is deprecated in v1.19+
type ComponentStatusApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// ConfigMap holds configuration data for pods to consume.
type ConfigMapApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
@@ -54,6 +54,8 @@ type ConfigMapApplyConfiguration struct {
// the Data field, this is enforced during validation process.
// Using this field will require 1.10+ apiserver and
// kubelet.
// Note: BinaryData keys are not currently propagated to container env vars
// via ConfigMapKeyRef or ConfigMapRef env sources; only Data keys are used.
BinaryData map[string][]byte `json:"binaryData,omitempty"`
}

View File

@@ -26,9 +26,10 @@ package v1
//
// The contents of the target ConfigMap's Data field will represent the
// key-value pairs as environment variables.
// Keys in the BinaryData field are not currently propagated to container env vars.
type ConfigMapEnvSourceApplyConfiguration struct {
// The ConfigMap to select from.
LocalObjectReferenceApplyConfiguration `json:",inline"`
LocalObjectReferenceApplyConfiguration `json:""`
// Specify whether the ConfigMap must be defined
Optional *bool `json:"optional,omitempty"`
}

View File

@@ -24,8 +24,9 @@ package v1
// Selects a key from a ConfigMap.
type ConfigMapKeySelectorApplyConfiguration struct {
// The ConfigMap to select from.
LocalObjectReferenceApplyConfiguration `json:",inline"`
// The key to select.
LocalObjectReferenceApplyConfiguration `json:""`
// The key to select from the ConfigMap's Data field.
// Keys in the BinaryData field are not currently propagated to container env vars.
Key *string `json:"key,omitempty"`
// Specify whether the ConfigMap or its key must be defined
Optional *bool `json:"optional,omitempty"`

View File

@@ -29,7 +29,7 @@ package v1
// Note that this is identical to a configmap volume source without the default
// mode.
type ConfigMapProjectionApplyConfiguration struct {
LocalObjectReferenceApplyConfiguration `json:",inline"`
LocalObjectReferenceApplyConfiguration `json:""`
// items if unspecified, each key-value pair in the Data field of the referenced
// ConfigMap will be projected into the volume as a file whose name is the
// key and content is the value. If specified, the listed keys will be

View File

@@ -28,7 +28,7 @@ package v1
// the items element is populated with specific mappings of keys to paths.
// ConfigMap volumes support ownership management and SELinux relabeling.
type ConfigMapVolumeSourceApplyConfiguration struct {
LocalObjectReferenceApplyConfiguration `json:",inline"`
LocalObjectReferenceApplyConfiguration `json:""`
// items if unspecified, each key-value pair in the Data field of the referenced
// ConfigMap will be projected into the volume as a file whose name is the
// key and content is the value. If specified, the listed keys will be

View File

@@ -49,7 +49,7 @@ import (
//
// Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.
type EndpointsApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -38,7 +38,7 @@ type EphemeralContainerApplyConfiguration struct {
// specific to ephemeral containers. Fields in common with Container are in the
// following inlined struct so than an EphemeralContainer may easily be converted
// to a Container.
EphemeralContainerCommonApplyConfiguration `json:",inline"`
EphemeralContainerCommonApplyConfiguration `json:""`
// If set, the name of the container from PodSpec that this ephemeral container targets.
// The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container.
// If not set then the ephemeral container uses the namespaces configured in the Pod spec.

View File

@@ -37,7 +37,7 @@ import (
// continued existence of events with that Reason. Events should be
// treated as informative, best-effort, supplemental data.
type EventApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// LimitRange sets resource usage limits for each kind of resource in a Namespace.
type LimitRangeApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -33,7 +33,7 @@ import (
// Namespace provides a scope for Names.
// Use of multiple namespaces is optional.
type NamespaceApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -33,7 +33,7 @@ import (
// Node is a worker node in Kubernetes.
// Each node will have a unique identifier in the cache (i.e. in etcd).
type NodeApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -0,0 +1,75 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
corev1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
)
// NodeAllocatableResourceClaimStatusApplyConfiguration represents a declarative configuration of the NodeAllocatableResourceClaimStatus type for use
// with apply.
//
// NodeAllocatableResourceClaimStatus describes the status of node allocatable resources allocated via DRA.
type NodeAllocatableResourceClaimStatusApplyConfiguration struct {
// ResourceClaimName is the resource claim referenced by the pod that resulted in this node allocatable resource allocation.
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
// Containers lists the names of all containers in this pod that reference the claim.
Containers []string `json:"containers,omitempty"`
// Resources is a map of the node-allocatable resource name to the aggregate quantity allocated to the claim.
Resources map[corev1.ResourceName]resource.Quantity `json:"resources,omitempty"`
}
// NodeAllocatableResourceClaimStatusApplyConfiguration constructs a declarative configuration of the NodeAllocatableResourceClaimStatus type for use with
// apply.
func NodeAllocatableResourceClaimStatus() *NodeAllocatableResourceClaimStatusApplyConfiguration {
return &NodeAllocatableResourceClaimStatusApplyConfiguration{}
}
// WithResourceClaimName sets the ResourceClaimName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimName field is set to the value of the last call.
func (b *NodeAllocatableResourceClaimStatusApplyConfiguration) WithResourceClaimName(value string) *NodeAllocatableResourceClaimStatusApplyConfiguration {
b.ResourceClaimName = &value
return b
}
// WithContainers adds the given value to the Containers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Containers field.
func (b *NodeAllocatableResourceClaimStatusApplyConfiguration) WithContainers(values ...string) *NodeAllocatableResourceClaimStatusApplyConfiguration {
for i := range values {
b.Containers = append(b.Containers, values[i])
}
return b
}
// WithResources puts the entries into the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Resources field,
// overwriting an existing map entries in Resources field with the same key.
func (b *NodeAllocatableResourceClaimStatusApplyConfiguration) WithResources(entries map[corev1.ResourceName]resource.Quantity) *NodeAllocatableResourceClaimStatusApplyConfiguration {
if b.Resources == nil && len(entries) > 0 {
b.Resources = make(map[corev1.ResourceName]resource.Quantity, len(entries))
}
for k, v := range entries {
b.Resources[k] = v
}
return b
}

View File

@@ -34,7 +34,7 @@ import (
// It is analogous to a node.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
type PersistentVolumeApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
type PersistentVolumeClaimApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -53,8 +53,8 @@ type PersistentVolumeClaimSpecApplyConfiguration struct {
// * An existing PVC (PersistentVolumeClaim)
// If the provisioner or an external controller can support the specified data source,
// it will create a new volume based on the contents of the specified data source.
// When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef,
// and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified.
// dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be
// copied to dataSource when dataSourceRef.namespace is not specified.
// If the namespace is specified, then dataSourceRef will not be copied to dataSource.
DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"`
// dataSourceRef specifies the object from which to populate the volume with data, if a non-empty
@@ -78,7 +78,6 @@ type PersistentVolumeClaimSpecApplyConfiguration struct {
// specified.
// * While dataSource only allows local objects, dataSourceRef allows objects
// in any namespaces.
// (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
// (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"`
// volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.

View File

@@ -31,7 +31,7 @@ type PersistentVolumeSpecApplyConfiguration struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
Capacity *corev1.ResourceList `json:"capacity,omitempty"`
// persistentVolumeSource is the actual volume backing the persistent volume.
PersistentVolumeSourceApplyConfiguration `json:",inline"`
PersistentVolumeSourceApplyConfiguration `json:""`
// accessModes contains all ways the volume can be mounted.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`

View File

@@ -33,7 +33,7 @@ import (
// Pod is a collection of containers that can run on a host. This resource is created
// by clients and scheduled onto hosts.
type PodApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -32,7 +32,6 @@ type PodConditionApplyConfiguration struct {
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
Type *corev1.PodConditionType `json:"type,omitempty"`
// If set, this represents the .metadata.generation that the pod condition was set based upon.
// The PodObservedGenerationTracking feature gate must be enabled to use this field.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// Status is the status of the condition.
// Can be True, False, Unknown.

View File

@@ -27,6 +27,14 @@ package v1
//
// It adds a name to it that uniquely identifies the ResourceClaim inside the Pod.
// Containers that need access to the ResourceClaim reference it with this name.
//
// When the DRAWorkloadResourceClaims feature gate is enabled and this Pod
// belongs to a PodGroup, a PodResourceClaim is matched to a
// PodGroupResourceClaim if all of their fields are equal (Name,
// ResourceClaimName, and ResourceClaimTemplateName). A matched claim references
// a single ResourceClaim shared across all Pods in the PodGroup, reserved for
// the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual
// Pods.
type PodResourceClaimApplyConfiguration struct {
// Name uniquely identifies this resource claim inside the pod.
// This must be a DNS_LABEL.
@@ -46,6 +54,16 @@ type PodResourceClaimApplyConfiguration struct {
// generated component, will be used to form a unique name for the
// ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.
//
// When the DRAWorkloadResourceClaims feature gate is enabled and the pod
// belongs to a PodGroup that defines a PodGroupResourceClaim with the same
// Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the
// ResourceClaim generated for the PodGroup. All pods in the group that
// define an equivalent PodResourceClaim matching the
// PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same
// generated ResourceClaim. ResourceClaims generated for a PodGroup are
// owned by the PodGroup and their lifecycles are tied to the PodGroup
// instead of any individual pod.
//
// This field is immutable and no changes will be made to the
// corresponding ResourceClaim by the control plane after creating the
// ResourceClaim.

View File

@@ -30,9 +30,16 @@ type PodResourceClaimStatusApplyConfiguration struct {
// which implies that the string must be a DNS_LABEL.
Name *string `json:"name,omitempty"`
// ResourceClaimName is the name of the ResourceClaim that was
// generated for the Pod in the namespace of the Pod. If this is
// unset, then generating a ResourceClaim was not necessary. The
// pod.spec.resourceClaims entry can be ignored in this case.
// generated for the Pod in the namespace of the Pod.
//
// When the DRAWorkloadResourceClaims feature is enabled and the
// corresponding PodResourceClaim matches a PodGroupResourceClaim
// made by the Pod's PodGroup, then this is the name of the
// ResourceClaim generated and reserved for the PodGroup.
//
// If this is unset, then generating a ResourceClaim was not
// necessary. The pod.spec.resourceClaims entry can be ignored in
// this case.
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
}

View File

@@ -0,0 +1,46 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// PodSchedulingGroupApplyConfiguration represents a declarative configuration of the PodSchedulingGroup type for use
// with apply.
//
// PodSchedulingGroup identifies the runtime scheduling group instance that a Pod belongs to.
// The scheduler uses this information to apply workload-aware scheduling semantics.
// Exactly one field must be specified.
type PodSchedulingGroupApplyConfiguration struct {
// PodGroupName specifies the name of the standalone PodGroup object
// that represents the runtime instance of this group.
// Must be a DNS subdomain.
PodGroupName *string `json:"podGroupName,omitempty"`
}
// PodSchedulingGroupApplyConfiguration constructs a declarative configuration of the PodSchedulingGroup type for use with
// apply.
func PodSchedulingGroup() *PodSchedulingGroupApplyConfiguration {
return &PodSchedulingGroupApplyConfiguration{}
}
// WithPodGroupName sets the PodGroupName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PodGroupName field is set to the value of the last call.
func (b *PodSchedulingGroupApplyConfiguration) WithPodGroupName(value string) *PodSchedulingGroupApplyConfiguration {
b.PodGroupName = &value
return b
}

View File

@@ -172,6 +172,8 @@ type PodSpecApplyConfiguration struct {
EnableServiceLinks *bool `json:"enableServiceLinks,omitempty"`
// PreemptionPolicy is the Policy for preempting pods with lower priority.
// One of Never, PreemptLowerPriority.
// When Priority Admission Controller is enabled, it prevents users from setting
// this field. The admission controller populates this field from PriorityClassName.
// Defaults to PreemptLowerPriority if unset.
PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty"`
// Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
@@ -233,7 +235,6 @@ type PodSpecApplyConfiguration struct {
// When set to false, a new userns is created for the pod. Setting false is useful for
// mitigating container breakout vulnerabilities even allowing users to run their
// containers as root without actually having root privileges on the host.
// This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.
HostUsers *bool `json:"hostUsers,omitempty"`
// SchedulingGates is an opaque list of values that if specified will block scheduling the pod.
// If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the
@@ -273,14 +274,19 @@ type PodSpecApplyConfiguration struct {
// This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters.
// Requires the HostnameOverride feature gate to be enabled.
HostnameOverride *string `json:"hostnameOverride,omitempty"`
// WorkloadRef provides a reference to the Workload object that this Pod belongs to.
// This field is used by the scheduler to identify the PodGroup and apply the
// correct group scheduling policies. The Workload object referenced
// by this field may not exist at the time the Pod is created.
// This field is immutable, but a Workload object with the same name
// may be recreated with different policies. Doing this during pod scheduling
// SchedulingGroup provides a reference to the immediate scheduling runtime
// grouping object that this Pod belongs to.
// This field is used by the scheduler to identify the group and apply the
// correct group scheduling policies. The association with a group also
// impacts other lifecycle aspects of a Pod that are relevant in a wider context
// of scheduling like preemption, resource attachment, etc. If not specified,
// the Pod is treated as a single unit in all of these aspects.
// The group object referenced by this field may not exist at the time the
// Pod is created.
// This field is immutable, but a group object with the same name may be
// recreated with different policies. Doing this during pod scheduling
// may result in the placement not conforming to the expected policies.
WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"`
SchedulingGroup *PodSchedulingGroupApplyConfiguration `json:"schedulingGroup,omitempty"`
}
// PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with
@@ -678,10 +684,10 @@ func (b *PodSpecApplyConfiguration) WithHostnameOverride(value string) *PodSpecA
return b
}
// WithWorkloadRef sets the WorkloadRef field in the declarative configuration to the given value
// WithSchedulingGroup sets the SchedulingGroup field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the WorkloadRef field is set to the value of the last call.
func (b *PodSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *PodSpecApplyConfiguration {
b.WorkloadRef = value
// If called multiple times, the SchedulingGroup field is set to the value of the last call.
func (b *PodSpecApplyConfiguration) WithSchedulingGroup(value *PodSchedulingGroupApplyConfiguration) *PodSpecApplyConfiguration {
b.SchedulingGroup = value
return b
}

View File

@@ -139,6 +139,12 @@ type PodStatusApplyConfiguration struct {
// applied at the pod level if pod-level requests or limits are set in
// PodSpec.Resources
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
// NodeAllocatableResourceClaimStatuses contains the status of node-allocatable resources
// that were allocated for this pod through DRA claims. This includes resources currently
// reported in v1.Node `status.allocatable` that are not extended resources
// (see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#extended-resources).
// Examples include "cpu", "memory", "ephemeral-storage", and hugepages.
NodeAllocatableResourceClaimStatuses []NodeAllocatableResourceClaimStatusApplyConfiguration `json:"nodeAllocatableResourceClaimStatuses,omitempty"`
}
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with
@@ -341,3 +347,16 @@ func (b *PodStatusApplyConfiguration) WithResources(value *ResourceRequirementsA
b.Resources = value
return b
}
// WithNodeAllocatableResourceClaimStatuses adds the given value to the NodeAllocatableResourceClaimStatuses field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the NodeAllocatableResourceClaimStatuses field.
func (b *PodStatusApplyConfiguration) WithNodeAllocatableResourceClaimStatuses(values ...*NodeAllocatableResourceClaimStatusApplyConfiguration) *PodStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithNodeAllocatableResourceClaimStatuses")
}
b.NodeAllocatableResourceClaimStatuses = append(b.NodeAllocatableResourceClaimStatuses, *values[i])
}
return b
}

View File

@@ -32,7 +32,7 @@ import (
//
// PodTemplate describes a template for creating copies of a predefined pod.
type PodTemplateApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -25,7 +25,7 @@ package v1
// alive or ready to receive traffic.
type ProbeApplyConfiguration struct {
// The action taken to determine the health of a container
ProbeHandlerApplyConfiguration `json:",inline"`
ProbeHandlerApplyConfiguration `json:""`
// Number of seconds after the container has started before liveness probes are initiated.
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`

View File

@@ -32,7 +32,7 @@ import (
//
// ReplicationController represents the configuration of a replication controller.
type ReplicationControllerApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// If the Labels of a ReplicationController are empty, they are defaulted to
// be the same as the Pod(s) that the replication controller manages.
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

View File

@@ -41,6 +41,9 @@ type ResourceHealthApplyConfiguration struct {
//
// In future we may want to introduce the PermanentlyUnhealthy Status.
Health *corev1.ResourceHealthStatus `json:"health,omitempty"`
// Message provides human-readable context for Health (e.g. "ECC error count exceeded threshold").
// This field is populated by the kubelet when ResourceHealthStatusMessage is enabled if the DRA plugin returns a message, and is null otherwise.
Message *string `json:"message,omitempty"`
}
// ResourceHealthApplyConfiguration constructs a declarative configuration of the ResourceHealth type for use with
@@ -64,3 +67,11 @@ func (b *ResourceHealthApplyConfiguration) WithHealth(value corev1.ResourceHealt
b.Health = &value
return b
}
// WithMessage sets the Message field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Message field is set to the value of the last call.
func (b *ResourceHealthApplyConfiguration) WithMessage(value string) *ResourceHealthApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -32,7 +32,7 @@ import (
//
// ResourceQuota sets aggregate quota restrictions enforced per namespace
type ResourceQuotaApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -33,7 +33,7 @@ import (
// Secret holds secret data of a certain type. The total bytes of the values in
// the Data field must be less than MaxSecretSize bytes.
type SecretApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`

View File

@@ -28,7 +28,7 @@ package v1
// key-value pairs as environment variables.
type SecretEnvSourceApplyConfiguration struct {
// The Secret to select from.
LocalObjectReferenceApplyConfiguration `json:",inline"`
LocalObjectReferenceApplyConfiguration `json:""`
// Specify whether the Secret must be defined
Optional *bool `json:"optional,omitempty"`
}

View File

@@ -24,7 +24,7 @@ package v1
// SecretKeySelector selects a key of a Secret.
type SecretKeySelectorApplyConfiguration struct {
// The name of the secret in the pod's namespace to select from.
LocalObjectReferenceApplyConfiguration `json:",inline"`
LocalObjectReferenceApplyConfiguration `json:""`
// The key of the secret to select from. Must be a valid secret key.
Key *string `json:"key,omitempty"`
// Specify whether the Secret or its key must be defined

Some files were not shown because too many files have changed in this diff Show More