Compare commits

...

292 Commits

Author SHA1 Message Date
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
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
Jefftree
53b6fdc0a0 Deprecate MultiLock, UnknownLeader, and ConcatRawRecord in client-go leader election
Kubernetes-commit: 875a572f25bb7da59ccaf487d889658a10448a63
2026-03-27 15:06:39 -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
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
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
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
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
Kubernetes Publisher
67ce519612 Merge pull request #135782 from richabanker/fifo-identity-metric
Add identifier-based queue depth metrics for RealFIFO

Kubernetes-commit: 8972957668a174bbb589f167817130e0f2d352a9
2026-02-06 03:52:42 +00:00
Richa Banker
12b64ed22e Wire InformerName through SharedIndexInformer
Kubernetes-commit: 96386809339faee1169d163749cb4b7d354bec1e
2026-02-05 11:45:38 -08:00
Richa Banker
5fee0e4466 Generate informers with InformerName support
Kubernetes-commit: 1fec293a1d9fc53e0e3f1a6a3fe6f8970110c1a7
2026-02-05 11:42:54 -08:00
Richa Banker
117e93e87c Add FIFO queue depth metrics
Kubernetes-commit: 864357774f24ee17b2bc7bde84eb5b87cc7ab95b
2026-02-05 11:42:20 -08:00
Kubernetes Publisher
c148db9511 Merge pull request #136747 from dims/use-k8s-utils-btree
Use btree from k8s.io/utils instead of github.com/google/btree

Kubernetes-commit: dc1ec1211e4f54064ba6dafd8aac46ac3d4379b4
2026-02-05 11:42:33 +00:00
Kubernetes Publisher
aa31c74d1f Merge pull request #136694 from michaelasp/addEmulationToClientGo
Add the ability to update locked features in client-go testing

Kubernetes-commit: 365fd08d5898a099cdc40eaf2a53d5a40125b1f0
2026-02-05 02:04:32 +05:30
Davanum Srinivas
4ba33933bd Use btree from k8s.io/utils instead of github.com/google/btree
The google/btree package is deprecated, so switch to the maintained
fork in k8s.io/utils/third_party/forked/golang/btree.

API differences:
- NewG -> New
- BTreeG[T] -> BTree[T]

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

Kubernetes-commit: a328ca88ad662119bbf129cd1107fabd8dd9f539
2026-02-04 09:19:58 -05:00
Michael Aspinwall
88493c6cb6 Lock InOrderInformers to true by default
Kubernetes-commit: 566a01682fe526812b5f12453908864827300b6f
2026-02-03 21:54:29 +00:00
Michael Aspinwall
c752307a85 Add SetForTesting for testing feature gates
Kubernetes-commit: 8099c570428806404b1a400143156c2ed0c67658
2026-02-03 21:49:09 +00:00
Kubernetes Publisher
65608ffa8e Merge pull request #136601 from michaelasp/realFifoGA
Set RealFIFO to GA in 1.36

Kubernetes-commit: 1861c1a07244e8e9430aaf588722dd22287c471e
2026-02-04 03:42:25 +00:00
Kubernetes Publisher
f651faf894 Merge pull request #136509 from pohly/client-go-informer-deadlock
client-go informers: fix potential deadlock

Kubernetes-commit: cc0fdc1fe2cfada52875a0c5fa115f69b4dd477a
2026-01-29 21:44:57 +00:00
Kubernetes Publisher
ada74e06af Merge pull request #136424 from JoelSpeed/podgroup-union
Mark PodGroupPolicy up with openapi union member tags

Kubernetes-commit: 8f4c197169bd4454bef3f7fc47ce02a324d51c76
2026-01-29 21:44:56 +00:00
Richa Banker
50ef81ad18 Add identity tracking for queue items
Kubernetes-commit: db27f4c1234a50e3157373c060ac8ba71c513500
2026-01-28 19:01:51 -08:00
Kubernetes Publisher
f3637bd93c Merge pull request #136583 from michaelasp/watchListRVEnforcement
Ensure resource version callbacks aren't called preemptively in reflector

Kubernetes-commit: ebc5660fa5c37e5e2f4bc85aff7f181d03955a9c
2026-01-29 01:49:03 +00:00
Michael Aspinwall
072a1958db Set RealFIFO to GA in 1.36
Kubernetes-commit: 7107e2f3500091155ac54a2d16a0eb0a9b557d1c
2026-01-28 22:37:37 +00:00
Kubernetes Publisher
2d68c1db51 Merge pull request #135106 from bkhadars/enable-commentstart1
enable commentstart check on admissionregistration API group

Kubernetes-commit: a41a5c35d38479df7bfa462ec24221a5198a0e5f
2026-01-28 17:44:36 +00:00
Kubernetes Publisher
a48da785a9 Merge pull request #129332 from pohly/log-client-go-clientcmd
client-go command: structured, contextual logging

Kubernetes-commit: 1c9da264ab83ac34efd0422711e1a222ffcb1b03
2026-01-28 13:44:55 +00:00
Kubernetes Publisher
67189d0e25 Merge pull request #136582 from yongruilin/master_kubeopenapi-format
Bump k8s.io/kube-openapi to latest and enable numeric format validation

Kubernetes-commit: b90909e4325d5375af7deb190585a5e9885c288d
2026-01-28 01:44:00 +00:00
Michael Aspinwall
ef73fc0205 Add enforcement for rv update in watchlist to preserve the rv ordering invariant
Kubernetes-commit: 35d29e4772261b283498e04148b89cef64fd6297
2026-01-27 23:09:17 +00:00
yongruilin
2d1d3a8458 Bump k8s.io/kube-openapi to latest
Kubernetes-commit: 65b579a036fa3b230f9c5e22d449fe9e4790078e
2026-01-27 21:39:39 +00:00
Kubernetes Publisher
146146cf95 Merge pull request #136574 from pohly/revert-129344-log-client-go-apimachinery-network-util
Revert "apimachinery: contextual logging in network util code"

Kubernetes-commit: 99a2c5c6346ad84976f9bda40034670a97950f24
2026-01-27 17:44:25 +00:00
Patrick Ohly
b0c7207279 Revert "apimachinery: contextual logging in network util code"
Kubernetes-commit: 9d65b9be20e5ee0a4ef34f0ba071d35987da4ab0
2026-01-27 17:21:02 +01:00
Kubernetes Publisher
5b20bd05fc Merge pull request #136441 from kannon92/remove-alpha-api-dra
remove alpha comments for GA or beta resource fields

Kubernetes-commit: be658b44f32ee69146505094ac3a03418832f9b6
2026-01-27 17:44:24 +00:00
Patrick Ohly
3590eb7f48 client-go informers: replace time.Sleep with callback
While time.Sleep is what the test needs, maybe an arbitrary hook invocation is
more acceptable in the production code because it is more general.

Kubernetes-commit: 2ec0305d728bf5ce8f8df314a18e71aa120a00cf
2026-01-27 14:47:37 +01:00
Patrick Ohly
889b95a769 client-go informers: fix potential deadlock
In the unlikely situation that sharedProcessor.distribute was triggered by a
resync before sharedProcessor.run had a chance to start the listeners, the
sharedProcessor deadlocked: sharedProcessor.distribute held a read/write lock
on listenersLock while being blocked on the write to the listener's
channel. The listeners who would have read from those weren't get started
because sharedProcessor.run was blocked trying to get a read lock for
listenersLock.

This gets fixed by releasing the read/write lock in sharedProcessor.distribute
while waiting for all listeners to be started. Because either all or no
listeners are started, the existing global listenersStarted boolean is
sufficient.

The TestListenerResyncPeriods tests now runs twice, with and without the
artificial delay. It gets converted to a synctest, so it executes quickly
despite the time.Sleep calls and timing is deterministic. The enhanced log
output confirms that with the delay, the initial sync completes later:

    === RUN   TestListenerResyncPeriods
        shared_informer_test.go:236: 0s: listener3: handle: pod1
        shared_informer_test.go:236: 0s: listener3: handle: pod2
        shared_informer_test.go:236: 0s: listener1: handle: pod1
        shared_informer_test.go:236: 0s: listener1: handle: pod2
        shared_informer_test.go:236: 0s: listener2: handle: pod1
        shared_informer_test.go:236: 0s: listener2: handle: pod2
        shared_informer_test.go:236: 2s: listener2: handle: pod1
        shared_informer_test.go:236: 2s: listener2: handle: pod2
        shared_informer_test.go:236: 3s: listener3: handle: pod1
        shared_informer_test.go:236: 3s: listener3: handle: pod2
    --- PASS: TestListenerResyncPeriods (0.00s)
    === RUN   TestListenerResyncPeriodsDelayed
        shared_informer_test.go:236: 1s: listener1: handle: pod1
        shared_informer_test.go:236: 1s: listener1: handle: pod2
        shared_informer_test.go:236: 1s: listener2: handle: pod1
        shared_informer_test.go:236: 1s: listener2: handle: pod2
        shared_informer_test.go:236: 1s: listener3: handle: pod1
        shared_informer_test.go:236: 1s: listener3: handle: pod2
        shared_informer_test.go:236: 2s: listener2: handle: pod1
        shared_informer_test.go:236: 2s: listener2: handle: pod2
        shared_informer_test.go:236: 3s: listener3: handle: pod1
        shared_informer_test.go:236: 3s: listener3: handle: pod2
    --- PASS: TestListenerResyncPeriodsDelayed (0.00s)

Kubernetes-commit: e6ef79b2f6bb05205652e4fe48ffa523d9e3a1ec
2026-01-23 19:38:52 +01:00
Kevin Hannon
0c949f1da7 remove alpha comments for GA or beta DRA fields
Kubernetes-commit: 159eb4cd7719a1c5de2c332e811a2b598ee1a4d2
2026-01-22 17:03:40 -05:00
Joel Speed
cb71398117 Mark PodGroupPolicy up with openapi union member tags
Kubernetes-commit: a984ba0bd9a5d0b25026d8d56c191faacc7b52ec
2026-01-22 11:28:50 +00:00
Kubernetes Publisher
c5e14be254 Merge pull request #136410 from michaelasp/addToReviewer
Add michaelasp to client-go/tools/cache reviewers

Kubernetes-commit: 290b358acda398439f0fb6ad027b59b45777d6fa
2026-01-22 05:49:06 +00:00
Michael Aspinwall
36db2c5c73 Add michaelasp to client-go cache reviewers
Kubernetes-commit: 8418cf16d7d918804db1b040338ffc3c164cff8d
2026-01-21 21:46:59 +00:00
Kubernetes Publisher
511abf454d Merge pull request #136362 from dims/update-opentelemetry-v1.39.0
Update OpenTelemetry dependencies to latest versions

Kubernetes-commit: 69eb15ee58c9cb20b90007e9b064dfb78b66a867
2026-01-21 21:43:59 +00:00
Kubernetes Publisher
98fd4cc5ca Merge pull request #136264 from michaelasp/unlockWhileProcess
Ensure that processing does not block queue writers in RealFIFO

Kubernetes-commit: dff962ddbb0f5928086029e45a2fa63c28341c57
2026-01-21 21:43:57 +00:00
Davanum Srinivas
51d0341059 Update OpenTelemetry dependencies to latest versions
Core packages (opentelemetry-go):
- go.opentelemetry.io/otel: v1.38.0 → v1.39.0
- go.opentelemetry.io/otel/metric: v1.38.0 → v1.39.0
- go.opentelemetry.io/otel/trace: v1.38.0 → v1.39.0
- go.opentelemetry.io/otel/sdk: v1.38.0 → v1.39.0

Exporters:
- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.34.0 → v1.39.0
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.34.0 → v1.39.0

Contrib instrumentation (opentelemetry-go-contrib):
- go.opentelemetry.io/contrib/.../otelhttp: v0.61.0 → v0.64.0
- go.opentelemetry.io/contrib/.../otelrestful: v0.44.0 → v0.64.0

Protocol definitions (opentelemetry-proto-go):
- go.opentelemetry.io/proto/otlp: v1.5.0 → v1.9.0

Notable changes:
- Go 1.24 is now the minimum required version (Go 1.23 support dropped) for OTEL components
- Performance: ~4x improvement in histogram concurrent operations; xxhash
  replaces fnv for attribute hashing
- Fixed goroutine leak in span processors when context is canceled
- otelrestful migrated semantic conventions from v1.20.0 to v1.34.0
  (e.g., http.method → http.request.method)
- Partial OTLP export errors now surfaced instead of being silently dropped
- otelrestful no longer depends on json-iterator/go, modern-go/concurrent,
  or modern-go/reflect2; unwanted-dependencies.json updated accordingly

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

Kubernetes-commit: c40ea60b9f193fbead586f9fd6cc26f7b77312ff
2026-01-20 17:20:21 -05:00
Kubernetes Publisher
ff70f47ee2 Merge pull request #135322 from carlory/rm-portworx
[1.36] Remove intree volume plugin portworx

Kubernetes-commit: d047572e817aafc3af859c191d79d954cf1855d9
2026-01-19 17:43:40 +00:00
Michael Aspinwall
914300b800 Add benchmarks for adding objects with slow handlers
Kubernetes-commit: 082f38d97bb68e77347b48dd5b29023b1a357373
2026-01-16 00:47:09 +00:00
Michael Aspinwall
f5283a4822 Ensure that processing does not block queue writers
Kubernetes-commit: 40c01b99a7bac05f6de438d67dd20a60333a0ac4
2026-01-16 00:46:52 +00:00
carlory
9cbf88a315 run hack/update-vendor.sh
Signed-off-by: carlory <baofa.fan@daocloud.io>

Kubernetes-commit: 299ec97e6fa2295ccc14d22f501280164377914a
2025-11-13 10:54:21 +08:00
Kubernetes Publisher
1a68af1383 Merge pull request #136212 from dims/update-security-deps-jan2026-v2
Update security and stability dependencies

Kubernetes-commit: a94970c0c5de0fa56b0ed82823850db7e0257685
2026-01-16 13:31:47 +00:00
Davanum Srinivas
95129d1f2f Update security and stability dependencies
This PR updates several dependencies addressing security vulnerabilities,
stability fixes, and authentication improvements.

- golang.org/x/crypto: v0.46.0 -> v0.47.0
  - Includes latest X509 root certificate bundle updates
  - Security hardening for cryptographic operations
  - Foundation dependency for TLS and authentication

- github.com/golang-jwt/jwt/v5: v5.2.2 -> v5.3.0
  - IMPORTANT: v5.2.2 patched vulnerability GHSA-mh63-6h87-95cp (token
    validation security issue) - this update ensures we have the fix
  - Adds multiple audience validation support for JWT tokens
  - Go 1.21 minimum requirement (code modernization)
  - Replaced legacy interface{} with modern any keyword

- golang.org/x/net: v0.48.0 -> v0.49.0
  - HTTP/2 priority scheduler improvements (RFC 9218)
  - WebSocket security enhancements
  - Network layer stability fixes

- go.uber.org/zap: v1.27.0 -> v1.27.1
  - Fix: Prevent Object from panicking on nils (PR #1501)
  - Fix: Race condition in WithLazy (PR #1511)
  - Both fixes improve logging stability in concurrent scenarios

- github.com/godbus/dbus/v5: v5.2.0 -> v5.2.2
  - Security: Disabled SHA1 authentication by default on non-Windows
    platforms (v5.2.0 change now inherited)
  - Performance: Multiple optimizations reducing memory allocations
  - Fix: Alignment issues in decoder operations
  - Fix: Allow more than 32 containers/struct fields in a signature

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

Kubernetes-commit: 5b478645cdb3be5ed92a21d2f7b417b6328cfa6e
2026-01-13 23:08:03 -05:00
Kubernetes Publisher
518241d079 Merge pull request #136008 from michaelasp/atomicResync
Add atomic resync operation for real fifo

Kubernetes-commit: b82b03b9240e13b72635a39304b352afdf6a1fde
2026-01-16 01:32:19 +00:00
Michael Aspinwall
2f59c18c8b Add atomic resync and remove usage of store in FIFO
Kubernetes-commit: 6fbaebc054fc61f4775bb3a803beba7e924e266b
2026-01-15 20:22:36 +00:00
Kubernetes Publisher
24e4401379 Merge pull request #136143 from pohly/client-go-fake-list-and-watch-fix
client-go testing: fix List+Watch support

Kubernetes-commit: 8392659d3c90fea03be805968b53ec7a05dea183
2026-01-15 17:32:16 +00:00
Kubernetes Publisher
14e71d2850 Merge pull request #135462 from michaelasp/atomicReplace
Add atomic replace in client-go

Kubernetes-commit: 8322d26d1f0384f98baf6b640af58a471eb66f19
2026-01-15 01:32:08 +00:00
Michael Aspinwall
aad3a6de89 Add support for ReplacedAll delta handling
Kubernetes-commit: 3d585f1c500be795dfaf24e2c6a7b024986481c1
2026-01-14 13:46:37 -05:00
Michael Aspinwall
0a8284b969 Plumb AtomicFIFO options into controller/store construction
Kubernetes-commit: 022fec7ba8b0e2c71e1f38634a31f296d0090b31
2026-01-14 13:23:12 -05:00
Michael Aspinwall
06f647297d Add AtomicFIFO feature gate
Kubernetes-commit: 9e25c19199ece559f91615cc70947da64e740fce
2026-01-14 12:39:28 -05:00
Michael Aspinwall
2cb222485f Guard against unexpected delta types in batch processing
Kubernetes-commit: 64f780c1ecd7e9ec0989cb3ebd584cd9249a4c8c
2026-01-14 12:41:04 -05:00
Michael Aspinwall
14f3889b62 Make PopBatch process a single-item batch identically to Pop
Kubernetes-commit: b8470beda4e4a17ad38e9a58ce86c96f420bb720
2026-01-14 13:18:37 -05:00
Michael Aspinwall
759b00eb22 Expand controller unit test coverage
Kubernetes-commit: 1c29ee7e7b5e039b8df1a5cb75798c0359ca73d9
2026-01-14 13:08:26 -05:00
Michael Aspinwall
4678a135e1 Plumb keyFunc to informer/controller/delta handling
Kubernetes-commit: 4171c8cff8e79d3624f7e3bc83513fbec1671a24
2026-01-14 13:04:31 -05:00
Michael Aspinwall
c38fc0fb1f Refactor RealFIFO#Replace delete/update handling to reconcileReplacement
Kubernetes-commit: b94e610244ea8e37bcade7eec7e77be0ff61e572
2026-01-14 12:56:32 -05:00
Michael Aspinwall
f3701130c2 Fix Replaced delta documentation
Kubernetes-commit: ebd6959b126bad49c305d8088103455ce13241b2
2026-01-14 12:45:13 -05:00
Michael Aspinwall
548663c679 Refactor delta addition/clearing
Kubernetes-commit: 2dad39751d993757b3f218fda93a380a450a2257
2026-01-14 12:44:38 -05:00
Patrick Ohly
bb190d443d client-go testing: start ResourceVersion at 1 for empty set
List should never return "0", that has a special meaning in queries.

Kubernetes-commit: 3783a720e7278466859fe140d2bfbbfb054f5313
2026-01-14 12:19:32 +01:00
Patrick Ohly
70ee41c382 client-go testing: include event handler in List+Watch unit test
The event handler must receive both object (the initial one from List, the
newer one from Watch) and it must be considered synced.

Kubernetes-commit: 359aff0552ed3b60d544158e5edf33d28492f01a
2026-01-14 11:57:24 +01:00
Kubernetes Publisher
d8ad3ab106 Merge pull request #136162 from dims/update-security-deps-jan2026
Update security-critical authentication and protobuf dependencies

Kubernetes-commit: c29a5d73a6fd04896033fe615c259f2949c5e94f
2026-01-14 01:31:55 +00:00
Davanum Srinivas
179e2aab49 Update security-critical authentication and protobuf dependencies
This PR updates security-critical dependencies addressing authentication
and data parsing vulnerabilities.

**Authentication Security:**
- github.com/coreos/go-oidc: v2.3.0 -> v2.5.0
  - Security fix: Now verifies token signature BEFORE validating payload
  - Prevents potential processing of tampered tokens before cryptographic
    verification

- github.com/cyphar/filepath-securejoin: v0.6.0 -> v0.6.1
  - Security fix: Fixed seccomp fallback logic - library now properly falls
    back to safer O_PATH resolver when openat2(2) is denied by seccomp-bpf
  - Fixed file descriptor leak in openat2 wrapper during RESOLVE_IN_ROOT

- cyphar.com/go-pathrs: v0.2.1 -> v0.2.2
  - Companion update to filepath-securejoin

**Protobuf Security:**
- google.golang.org/protobuf: v1.36.8 -> v1.36.11
  - Security fix: Added recursion limit check in lazy decoding validation
  - Prevents potential stack exhaustion attacks via maliciously crafted
    protobuf messages
  - Also adds support for URL chars in type URLs in text-format

These updates are critical for:
- OIDC authentication in kube-apiserver
- Container filesystem path resolution (used by container runtimes)
- Protobuf message parsing throughout the codebase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: c825d80bbf2c82666192c329478a686fa3a1d5dc
2026-01-11 16:50:37 -05:00
Kubernetes Publisher
0b06cf5bf0 Merge pull request #129344 from pohly/log-client-go-apimachinery-network-util
apimachinery: contextual logging in network util code

Kubernetes-commit: c6be0527684a967c1b0dd14486ae2241832723f0
2026-01-13 21:32:02 +00:00
Kubernetes Publisher
934ba1dfa5 Merge pull request #136161 from dims/update-golang-x-deps-jan2026
Update golang.org/x dependencies to latest versions

Kubernetes-commit: 1c894014ebe25e0b042efa91698284f527493d90
2026-01-13 01:36:55 +00:00
Davanum Srinivas
07c57c562d Update golang.org/x dependencies to latest versions
updates the golang.org/x package family to newer releases:

- golang.org/x/crypto: v0.45.0 -> v0.46.0
- golang.org/x/net: v0.47.0 -> v0.48.0
- golang.org/x/sys: v0.38.0 -> v0.40.0
- golang.org/x/time: v0.9.0 -> v0.14.0
- golang.org/x/oauth2: v0.30.0 -> v0.34.0
- golang.org/x/text: v0.31.0 -> v0.33.0
- golang.org/x/term: v0.37.0 -> v0.39.0
- golang.org/x/sync: v0.18.0 -> v0.19.0
- golang.org/x/mod: v0.29.0 -> v0.32.0
- golang.org/x/tools: v0.38.0 -> v0.40.0
- golang.org/x/exp: 8a7402abbf56 -> 944ab1f22d93

Security & Stability:
- x/crypto: Updated X509 root certificate bundle
- x/net: HTTP/2 PING optimization to reduce DoS detection triggers,
  data race fix in trace RenderEvents
- x/sys: Fixed out-of-bounds memory access in sockaddrIUCVToAny
- x/time: Fixed rate limiter overflow when using very low rates that
  could cause the limiter to jam open

Performance:
- x/time: ~19% improvement in Sometimes.Do when no interval configured

Maintenance:
- Various vet diagnostic fixes for Go 1.26 compatibility
- Dependency updates across the golang.org/x ecosystem

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

Kubernetes-commit: 0e67c56a8f26ace2889fd24e098b78e13f9bbffe
2026-01-11 16:25:45 -05:00
Patrick Ohly
42c6ae81ab client-go testing: fix List+Watch support
56448506075c3db1d added support for List+Watch to a fake client-go instance.
However, that support was not quite working yet as seen when analyzing a test
flake:

- List returned early when there were no objects, without adding the
  ResourceVersion. The ResourceVersion should have been "0" instead.
- When encountering "" as ResourceVersion, Watch didn't deliver
  any objects. That was meant to preserve compatibility with clients
  which don't expect objects from a Watch, but the right semantic of
  "" is "Start at most recent", which includes delivering existing
  objects.

Tests which meddle with the List implementation via a reactor (like
clustertrustbundlepublisher) have to be aware that Watch now may
return objects when given an empty ResourceVersion.

Kubernetes-commit: 6bfa727bee264f5d7e4471066c1b48a28d0c1929
2026-01-09 16:54:10 +01:00
Kubernetes Publisher
811a272277 Merge pull request #136108 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.27.4, gomega v1.39.0

Kubernetes-commit: 758ef0ffbce5cbca7a893d839dde892d79c2738f
2026-01-08 22:43:17 +00:00
Patrick Ohly
2e32132ba0 dependencies: ginkgo v2.27.4, gomega v1.39.0
Latest release of both. The CurrentTreeConstructionNodeReport fix
is needed before being able to use it in the E2E framework.

Kubernetes-commit: f8a0c80ed81711f6add7a765d22b56d2d41ac522
2026-01-08 16:53:03 +01:00
Kubernetes Publisher
52d9854c37 Merge pull request #136068 from aojea/leader_race_time
fix leader election data race reading observedtime

Kubernetes-commit: 0f4705e12e12439b37e81ea6df2318def4b4a2c5
2026-01-07 18:34:00 +00:00
Kubernetes Publisher
2f784525d5 Merge pull request #135959 from pohly/client-go-testing-list-and-watch-race
client-go testing: support List+Watch with ResourceVersion

Kubernetes-commit: fe36b79c2ab54cd7cc10733ca50e5642e2304f86
2026-01-07 14:33:55 +00:00
Kubernetes Publisher
736bd66226 Merge pull request #132145 from inkel/inkel/client-go/improve-bearerauthrt-roundtrip-perf
fix(client): Concatenate string instead of using `fmt.Sprintf`

Kubernetes-commit: ed17ca808f5db19c9309ffa32694885d2f30ca7a
2026-01-07 14:33:53 +00:00
Antonio Ojea
7761b3a081 leaderelection RWlock
We need to lock on observedTime reads to avoid races, before we were
only locking to read the observed record.

Use a RW lock since there are much more reads that writes.

Kubernetes-commit: d5ac0e408a0a1e50197e1b599b9b8b2e505bfe46
2026-01-07 13:16:25 +00:00
Kubernetes Publisher
65de5216f1 Merge pull request #134798 from aditigupta96/fix-runwithcontext-apimachinery
apimachinery: Use informer.RunWithContext in various components

Kubernetes-commit: 6af6361e3b6a5eafc8349b05227afff54e0594ed
2026-01-07 02:39:25 +00:00
Kubernetes Publisher
c9ded7e60b Merge pull request #136053 from tchap/kcm-leader-election-thread-mgmt
leasecandidate: Improve goroutine management

Kubernetes-commit: 3edae6c1c49958fd10a708d9cc8c4c9e7f5fb6e8
2026-01-06 20:59:08 +05:30
Ondra Kupka
0728b482e1 leasecandidate: Improve goroutine management
Make sure all goroutines are terminated when Run returns.

Kubernetes-commit: 498896ec4270b790e971a6fb01a292aa4c8cdfe0
2026-01-06 10:43:05 +01:00
Patrick Ohly
58e70dff3d client-go testing: support List+Watch with ResourceVersion
Quite a lot of unit tests set up informers with a fake client, do
informerFactory.WaitForCacheSync, then create or modify objects. Such tests
suffered from a race: because the fake client only delivered objects to the
watch after the watch has been created, creating an object too early caused
that object to not get delivered to the informer.

Usually the timing worked out okay because WaitForCacheSync typically slept a
bit while polling, giving the Watch call time to complete, but this race has
also gone wrong occasionally. Now with WaitForCacheSync returning more promptly
without polling (work in progress), the race goes wrong more often.

Instead of working around this in unit tests it's better to improve the fake
client such that List+Watch works reliably, regardless of the timing. The fake
client has traditionally not touched ResourceVersion in stored objects and
doing so now might break unit tests, so the added support for ResourceVersion
is intentionally limited to List+Watch.

The test simulates "real" usage of informers. It runs in a synctest bubble and
completes quickly:

    go  test -v .
    === RUN   TestListAndWatch
        listandwatch_test.go:67: I0101 01:00:00.000000] Listed configMaps="&ConfigMapList{ListMeta:{ 1  <nil>},Items:[]ConfigMap{ConfigMap{ObjectMeta:{cm1  default    0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},Data:map[string]string{},BinaryData:map[string][]byte{},Immutable:nil,},},}" err=null
        listandwatch_test.go:79: I0101 01:00:00.000000] Delaying Watch...
        listandwatch_test.go:90: I0101 01:00:00.100000] Caches synced
        listandwatch_test.go:107: I0101 01:00:00.100000] Created second ConfigMap
        listandwatch_test.go:81: I0101 01:00:00.100000] Continuing Watch...
    --- PASS: TestListAndWatch (0.00s)
    PASS
    ok  	k8s.io/client-go/testing/internal	0.009s

Some users of the fake client need to be updated to avoid test failures:
- ListMeta comparisons have to be updated.
- Optional: pass ListOptions into tracker.Watch. It's optional because
  the implementation behaves as before when options are missing,
  but the List+Watch race fix only works when options are passed.

Kubernetes-commit: 56448506075c3db1d16b5bbf0c581b833a4646f1
2025-12-27 21:57:54 +01:00
Kubernetes Publisher
d9d16a9e17 Merge pull request #135391 from jpbetz/smd-6_3_1
Bump structured-merge-diff to pick up flake fix and bug fixes

Kubernetes-commit: 6f92c01979b7666f6631a556a8626e21b88d1f2a
2025-12-23 14:30:15 +00:00
Kubernetes Publisher
af9dcc3651 Merge pull request #135867 from dims/pin-versions-of-dbus-and-otelgrpc-to-avoid-breakage
Pin versions of dbus and otelgrpc to avoid breakage

Kubernetes-commit: dce2e8cef737ebce3a4d13d74654c50bcb244846
2025-12-21 02:29:37 +00:00
Davanum Srinivas
aa82641b9d updated to last known good dependencies for otelgrpc and dbus
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 60cce0abd05d31f74ece404e584f53c915a7f3d5
2025-12-20 15:27:53 -05:00
Kubernetes Publisher
687c6c1315 Merge pull request #135836 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.27.3 + gomega v1.38.3

Kubernetes-commit: 268bdbe214ac64b5a31a59cfae6b96f3a1585bd3
2025-12-19 18:29:40 +00:00
Kubernetes Publisher
1078d9cd6f Merge pull request #135845 from skitt/drop-armon-circbuf
Replace armon/circbuf with k8s.io/utils/buffer

Kubernetes-commit: 0ea38248603ce745956d779787874cfd91ca29ae
2025-12-19 18:29:38 +00:00
Stephen Kitt
85ab7843a2 Replace armon/circbuf with k8s.io/utils/buffer
This uses the new generic fixed ring implementation in k8s.io/utils.

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

Kubernetes-commit: 3653ae2b9a7768da89e47ef84d503ae9cf0b910b
2025-12-19 09:59:41 +01:00
Kubernetes Publisher
f36ae1f45e Merge pull request #135840 from michaelasp/makeDeterministic
Fix issue with TestReplaceEvents not sending history deterministically

Kubernetes-commit: 09ca6040f7a0d6f80cd74fbbd9691341190b092f
2025-12-19 06:29:13 +00:00
Michael Aspinwall
e07f72a3ec Fix issue with test not sending history deterministically
Kubernetes-commit: 2b330f0357cb825de0dc196b426c858b2bba7f2c
2025-12-19 00:45:43 +00:00
Kubernetes Publisher
66d2ca7fea Merge pull request #135832 from liggitt/test-replace-flake
Make TestReplaceEvents deterministic for delete event comparison

Kubernetes-commit: e07199dbc63e4aaa448f173045161ab209c71ec8
2025-12-18 18:29:04 +00:00
Kubernetes Publisher
ba82880ed7 Merge pull request #135539 from dims/move-httpcache-to-third_party/forked
move httpcache to third_party/forked

Kubernetes-commit: 04d866b37de3aefac063b2b6e12f11b30701c9ff
2025-12-18 18:29:02 +00:00
Jordan Liggitt
8e36d0d305 Make TestReplaceEvents deterministic for delete event comparison
Kubernetes-commit: fb288e3ce164e86f590768d8dce92152e9ea0bbe
2025-12-18 09:54:56 -05:00
Patrick Ohly
a01f268c3e dependencies: ginkgo v2.27.3 + gomega v1.38.3
This fixes some issues found in Kubernetes (data race in ginkgo CLI, gomega
formatting) and helps with diagnosing OOM killing in CI jobs (exit status of
processes).

The modified gomega formatting shows up in some of the output tests for the E2E
framework. They get updated accordingly.

Kubernetes-commit: db841afdbb193ea7d612472c7cc4c7b3f58eb676
2025-12-16 14:32:00 +01:00
Davanum Srinivas
f0e0dbdb4b move httpcache to third_party/forked
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: ab1ffaf12e243798df20a5c98192b8d108ba9a9b
2025-12-01 21:58:55 -05:00
Kubernetes Publisher
8f891d54a2 Merge pull request #135665 from michaelasp/replaceTest
Add test for replace events in client-go controller

Kubernetes-commit: 9d8404426fc33f6fbb2e5180b2e80f685b16bbd6
2025-12-18 14:29:09 +00:00
Kubernetes Publisher
d008946b23 Merge pull request #135615 from soltysh/drop_autoscaling_v2betaX
Drop autoscaling v2beta1 and v2beta2

Kubernetes-commit: 508074f023a82230a3af03a3827e7fa1aebbaa7a
2025-12-18 14:29:08 +00:00
Kubernetes Publisher
1aef261f0a Merge pull request #135371 from Nikateen/contextual-logging-leaderelection
Use contextual logging in leaderelection

Kubernetes-commit: 3558d1e9ce6829e91b6e81bcf96dda03b21f6258
2025-12-18 06:33:06 +00:00
Kubernetes Publisher
ca2dee6d05 Merge pull request #135324 from p0lyn0mial/upstream-watchlist-unsupported-wl-better-docs
client-go/reflector: Improve WatchListClient disabled log message for clarity

Kubernetes-commit: 13b10dc70fb018204a4175db96889e7811093c2c
2025-12-18 06:33:04 +00:00
Kubernetes Publisher
b960c92ed7 Merge pull request #135183 from enj/patch-11
Add enj to k8s.io/client-go approvers

Kubernetes-commit: d24c46b1d96d6299395dde872c392a9f54fdf716
2025-12-18 06:33:01 +00:00
Kubernetes Publisher
0d964cc386 Merge pull request #132807 from iholder101/feature/ImageVolumeWithDigest
[KEP-5365] Implement Image Volume with Digest

Kubernetes-commit: e14cdadc5a7b3c735782993d7899c9ea5df6e7b0
2025-12-18 02:29:38 +00:00
Michael Aspinwall
7d2828a105 Add test for replace events in controller
Kubernetes-commit: 6b977a28e90a1f369de91b07a13213ec05a5a426
2025-12-08 16:18:46 +00:00
Maciej Szulik
8dc82bbe31 Generated changes
Signed-off-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: 583ddba56983d77a0a8c77c3bc7aaac9885c8690
2025-12-05 11:53:07 +01:00
Kubernetes Publisher
a296bd743c Merge pull request #135591 from p0lyn0mial/upstream-watchlist-reflector-log-fallback
downgrade reflector watchlist fallback log to V(4)

Kubernetes-commit: 9293f9326d41e1e4ad53096ef180dd6ab0f9c699
2025-12-05 02:33:54 +00:00
Kubernetes Publisher
6a962375ad Merge pull request #135580 from serathius/client-go-transformer
Embed proper interface in TransformingStore to ensure DeltaFIFO and RealFIFO are implementing it

Kubernetes-commit: 04e8064bccebd04981ee0094457550c9de4f92e3
2025-12-04 22:33:40 +00:00
Kubernetes Publisher
453ad29ccd Merge pull request #135536 from dims/bump-x/crypto-to-v0.45.0
Bump golang.org/x/crypto to v0.45.0

Kubernetes-commit: de61f598953ccd3e3950cdeda02740af2881048f
2025-12-04 22:33:40 +00:00
Lukasz Szaszkiewicz
4e4a2b723a downgrade reflector watchlist fallback log to V(4)
Kubernetes-commit: 3f42ca14011e972ee439a27d47415bc7574f2317
2025-12-04 16:14:19 +01:00
Jordan Liggitt
715440da15 Use transformer in consistency checker
Kubernetes-commit: 91368adbb556286942d996c60ab6cc39306415b7
2025-11-26 15:19:00 -05:00
Joe Betz
521671e60d hack/pin-dependency.sh sigs.k8s.io/structured-merge-diff/v6 v6.3.1
Kubernetes-commit: 5129fa152b3628ee65c060d3e2f59f69d271f7a6
2025-11-21 08:53:57 -05:00
Nikateen
a361bc1602 Use contextual logging in leaderelection
Update leaderelection package to use contextual logging variants:
- Replace wait.JitterUntil with wait.JitterUntilWithContext
- Replace wait.Until with wait.UntilWithContext

This enables proper contextual logging support as part of the
structured logging migration.

Ref #126379

Kubernetes-commit: c5b64ebf2ef8619fb96c35f3a613b1b945ebe0f2
2025-11-20 21:30:05 +05:30
Lukasz Szaszkiewicz
4fa8366691 client-go/reflector: Improve WatchListClient disabled log message for clarity
Kubernetes-commit: f4c24b5ef52272fe5e473e92fe5f98bee844f8aa
2025-11-17 09:25:33 +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
Mo Khan
f6ec69ec64 Add enj to k8s.io/client-go approvers
Kubernetes-commit: f184f40979338c9180819da5b2b10f43275d1ae0
2025-11-06 09:16:21 -05:00
Itamar Holder
5223424e9f Add auto-generated code and boilerplate
Signed-off-by: Itamar Holder <iholder@redhat.com>

Kubernetes-commit: af66766bf5799661860235c04154f26f391a269a
2025-11-05 10:16:26 +02:00
Basheer
bd70455c5c update generated code
Kubernetes-commit: eb343a9049032fd0a9f39da30ba679c5882730e7
2025-11-04 22:07:21 +05:30
Joel Speed
d416af4df4 Update generated code
Kubernetes-commit: 0ebf47cb080a207a4829ce8e604e51bb494d63fb
2025-10-23 11:11:45 +01:00
Aditi Gupta
9e310140a3 apimachinery: Use informer.RunWithContext in various components
Kubernetes-commit: 915866f0e414d0afc4f1cc883d86a51a66d74e15
2025-10-22 14:48:54 -07:00
Valerian Roche
fdc4054b9d Add unit tests for Data Consistency Detector
Kubernetes-commit: 76da8d6de027a4bf62601d45b8d72f8fa627ab5c
2025-07-28 13:53:34 -04:00
Valerian Roche
59300dbe2a [client-go #1415] Embed proper interface in TransformingStore to ensure DeltaFIFO and RealFIFO are implementing it
Signed-off-by: Valerian Roche <valerian.roche@datadoghq.com>

Kubernetes-commit: 88c20d46a4e5ca8db7519c81856a358c919ae262
2025-07-28 13:53:34 -04:00
Leandro López (inkel)
b821346005 Concatenate string instead of using fmt.Sprintf
The call to `fmt.Sprintf` does virtually the same as concatenating the
strings, but incurs in minor overhead from having to call a function,
and performs an additional allocation.

I've made a small benchmark for this and when run against current
`master` and this branch, the results are significant for this
function:

    goos: darwin
    goarch: arm64
    pkg: k8s.io/client-go/transport
    cpu: Apple M1 Pro
                              │ bart.base.log │           bart.concat.log            │
                              │    sec/op     │    sec/op     vs base                │
    BearerAuthRoundTripper-10    361.3n ± 31%   295.5n ± 11%  -18.21% (p=0.000 n=20)

                              │ bart.base.log │          bart.concat.log          │
                              │     B/op      │    B/op     vs base               │
    BearerAuthRoundTripper-10      768.0 ± 0%   752.0 ± 0%  -2.08% (p=0.000 n=20)

                              │ bart.base.log │          bart.concat.log           │
                              │   allocs/op   │ allocs/op   vs base                │
    BearerAuthRoundTripper-10      6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=20)

Considering this method is likely used in many installations, the
gains, while small, adds up to bigger savings

Kubernetes-commit: 92a0e422df2d0d36c25f0b5c829c571b93250600
2025-06-06 08:27:49 -03:00
Patrick Ohly
d55310b9f9 client-go remotecommand: structured, contextual logging
The API for the package already had a context, so all that was missing was to
extract and use the logger from that.

Kubernetes-commit: 1620b2707623036f5133cf8045da89411d2c4345
2024-12-20 13:50:01 +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
5da30e54b3 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: e47b186e6ba3cbc9c732409ef9037e883ea80da1
2024-12-09 13:00:47 +01:00
Patrick Ohly
09da9b25fa client-go auth: contextual logging
No API changes are needed. In one case, a context is passed in via the
http.Request. In others there is simply no need to change the calls.

Kubernetes-commit: 4f241c04af7a86970aeab0a3e0198df807a04b86
2024-12-09 12:56:03 +01:00
Patrick Ohly
ecaf85d034 client-go remotecommand: structured, contextual logging
The API for the package already had a context, so all that was missing was to
extract and use the logger from that.

Kubernetes-commit: 0690af4710a5b322163564d82b95b90417ae3644
2024-12-20 13:50:01 +01:00
Patrick Ohly
24500c1c50 client-go clientcmd: exclude from structured, contextual logging
The only log output is for error messages which should normally not occur. It's
also likely that users expect to see exactly those messages, so it's better to
not touch them.

Kubernetes-commit: 8701f481ff6e24257021f07afcec67df2aef27dc
2024-12-04 15:39:14 +01:00
Patrick Ohly
e01401eb86 client-go clientcmd: exclude from structured, contextual logging
The only log output is for error messages which should normally not occur. It's
also likely that users expect to see exactly those messages, so it's better to
not touch them.

Kubernetes-commit: 1ec1248a6555be7ca7a0827061cdd3ef162f6c45
2024-12-04 15:39:14 +01:00
Patrick Ohly
e3793792ba 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: dfdf07bb531aa8a397f3c74e5eec851130325971
2024-12-04 15:21:11 +01:00
Patrick Ohly
8101e94f49 restmapper + discovery: add context-aware APIs
The main purpose is to replace context.TODO with a context provided by the
caller. A secondary purpose is to enable contextual logging.

Modifying the existing interfaces and APIs would have a big impact on the
ecosystem. This is a no-go. Instead, the following approach was taken:

- All interfaces get duplicated in a *WithContext variant where the methods
  also have a *WithContext suffix and the ctx parameter. All methods are
  treated this way except for obvious local get methods (like RESTClient)
  because it cannot be ruled out entirely that some implementation may
  need a context.

- Implementations of these interfaces implement both method variants
  which is possible because the method names are different.
  The old methods are implemented as thin wrappers around the updated
  code which is now the body of the new methods or shared helpers.
  In some cases there is additional overhead (type checks, potentially
  additional allocations) when using the old methods.

- To*WithContext helpers bridge from the old to the new interfaces. They
  try a type cast first. Because the in-tree implementations implement
  both, they can be used directly. For other implementations wrappers
  are used.

- All old APIs and interfaces are marked as deprecated. There is no
  intent to ever remove them, but consumers should be made aware
  that there are now better alternatives. Implementations also
  get marked this way even if nothing ever calls them directly
  because it shows which code, at least theoretically, could get
  removed.

- Existing unit tests do not get updated to the new APIs. This gives
  us unit test coverage of the old and new API because the old
  APIs call the new ones.

- In-tree consumers will be updated in follow-up PRs. This is likely
  to be a longer process. Because of the deprecation comment,
  `hack/golangci-lint.sh -n` can be used to find code which needs
  to be updated.

Kubernetes-commit: 025b844bcabe0212c4dd56395ee18481602d7c65
2024-12-06 17:38:06 +01:00
Patrick Ohly
d7581d0654 client-go watch: implement interface with pointer
I wasn't entirely sure whether this should return a value or a pointer to
satisfy the interface. Both works, so I benchmarked it elsewhere (REST
mapper). Mem allocs are the same (one alloc/call), but returning a value is 10%
slower when calling one method.

What I then benchmarked is whether pointer vs value receiver in the wrapper
makes a difference. Converting from value receiver (what I had before) to
pointer receiver reduced call overhead by 6%. That's because with a value
receiver, Go has to auto-generate a variant with pointer receiver and calls the
value receiver through that.

That can be seen in a debugger (call stack) and when setting breakpoints:

    (dlv) b restMapperWrapper.KindForWithContext
    Command failed: Location "restMapperWrapper.KindForWithContext" ambiguous: k8s.io/apimachinery/pkg/api/meta.restMapperWrapper.KindForWithContext, k8s.io/apimachinery/pkg/api/meta.(*restMapperWrapper).KindForWithContext…

Conventional wisdom is to define types with value receiver because those can be
called also on unmutable instances, making them more flexible.

But for types which will only ever be used via a pointer, I think pointer
receiver is better for the reasons above (small performance difference, easier
to debug).

Kubernetes-commit: b21dcbcaa1ccf4995bf486afc37dc0321c5bdf0b
2025-02-13 11:53:16 +01:00
679 changed files with 18883 additions and 11243 deletions

2
OWNERS
View File

@@ -9,6 +9,7 @@ approvers:
- sttts
- yliaog
- jpbetz
- enj
reviewers:
- aojea
- apelisse
@@ -22,6 +23,7 @@ reviewers:
- yliaog
- jpbetz
- jefftree
- enj
labels:
- sig/api-machinery
emeritus_approvers:

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

@@ -23,11 +23,11 @@ package v1
//
// ExpressionWarning is a warning information that targets a specific expression.
type ExpressionWarningApplyConfiguration struct {
// The path to the field that refers the expression.
// fieldRef is the path to the field that refers to the expression.
// For example, the reference to the expression of the first item of
// validations is "spec.validations[0].expression"
FieldRef *string `json:"fieldRef,omitempty"`
// The content of type checking information in a human-readable form.
// warning contains the content of type checking information in a human-readable form.
// Each line of the warning contains the type that the expression is checked
// against, followed by the type check error from the compiler.
Warning *string `json:"warning,omitempty"`

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

@@ -23,7 +23,7 @@ package v1
//
// MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
type MatchConditionApplyConfiguration struct {
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
// as well as providing an identifier for logging purposes. A good name should be descriptive of
// the associated expression.
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
@@ -33,7 +33,7 @@ type MatchConditionApplyConfiguration struct {
//
// Required.
Name *string `json:"name,omitempty"`
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
//
// 'object' - The object from the incoming request. The value is null for DELETE requests.

View File

@@ -30,7 +30,7 @@ import (
// on whether it meets the match criteria.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
type MatchResourcesApplyConfiguration struct {
// NamespaceSelector decides whether to run the admission control policy on an object based
// namespaceSelector decides whether to run the admission control policy on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the validation based on if the
// objectSelector decides whether to run the validation based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the cel validation, and
// is considered to match if either object matches the selector. A null
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
// resourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
// The policy cares about an operation if it matches _any_ Rule.
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
// excludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.

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

@@ -28,23 +28,23 @@ import (
//
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
type MutatingWebhookApplyConfiguration struct {
// The name of the admission webhook.
// name is the name of the admission webhook.
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
// of the organization.
// Required.
Name *string `json:"name,omitempty"`
// ClientConfig defines how to communicate with the hook.
// clientConfig defines how to communicate with the hook.
// Required
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
// Rules describes what operations on what resources/subresources the webhook cares about.
// rules describes what operations on what resources/subresources the webhook cares about.
// The webhook cares about an operation if it matches _any_ Rule.
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
// from putting the cluster in a state which cannot be recovered from without completely
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
// allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
// matchPolicy defines how the "rules" list is used to match incoming requests.
@@ -62,7 +62,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Defaults to "Equivalent"
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
// NamespaceSelector decides whether to run the webhook on an object based
// namespaceSelector decides whether to run the webhook on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -106,7 +106,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the webhook based on if the
// objectSelector decides whether to run the webhook based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the webhook, and
// is considered to match if either object matches the selector. A null
@@ -118,20 +118,20 @@ type MutatingWebhookApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// SideEffects states whether this webhook has side effects.
// sideEffects states whether this webhook has side effects.
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
// sideEffects == Unknown or Some.
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// the webhook call will be ignored or the API call will fail based on the
// failure policy.
// The timeout value must be between 1 and 30 seconds.
// Default to 10 seconds.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
// versions the Webhook expects. API server will try to use first version in
// the list which it supports. If none of the versions specified in this list
// supported by API server, validation will fail for this object.
@@ -155,7 +155,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Defaults to "Never".
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be sent to this
// matchConditions is a list of conditions that must be met for a request to be sent to this
// webhook. Match conditions filter requests that have already been matched by the rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.

View File

@@ -32,10 +32,10 @@ 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"`
// 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"`
// Webhooks is a list of webhooks and the affected resources and operations.
// webhooks is a list of webhooks and the affected resources and operations.
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}

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

@@ -27,10 +27,10 @@ import (
//
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
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 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

@@ -23,11 +23,11 @@ package v1
//
// ParamKind is a tuple of Group Kind and Version.
type ParamKindApplyConfiguration struct {
// APIVersion is the API group version the resources belong to.
// apiVersion is the API group version the resources belong to.
// In format of "group/version".
// Required.
APIVersion *string `json:"apiVersion,omitempty"`
// Kind is the API kind the resources belong to.
// kind is the API kind the resources belong to.
// Required.
Kind *string `json:"kind,omitempty"`
}

View File

@@ -62,7 +62,7 @@ type ParamRefApplyConfiguration struct {
// One of `name` or `selector` must be set, but `name` and `selector` are
// mutually exclusive properties. If one is set, the other must be unset.
Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// `parameterNotFoundAction` controls the behavior of the binding when the resource
// parameterNotFoundAction controls the behavior of the binding when the resource
// exists, and name or selector is valid, but there are no parameters
// matched by the binding. If the value is set to `Allow`, then no
// matched parameters will be treated as successful validation by the binding.

View File

@@ -28,15 +28,15 @@ import (
// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
// to make sure that all the tuple expansions are valid.
type RuleApplyConfiguration struct {
// APIGroups is the API groups the resources belong to. '*' is all groups.
// apiGroups is the API groups the resources belong to. '*' is all groups.
// If '*' is present, the length of the slice must be one.
// Required.
APIGroups []string `json:"apiGroups,omitempty"`
// APIVersions is the API versions the resources belong to. '*' is all versions.
// apiVersions is the API versions the resources belong to. '*' is all versions.
// If '*' is present, the length of the slice must be one.
// Required.
APIVersions []string `json:"apiVersions,omitempty"`
// Resources is a list of resources this rule applies to.
// resources is a list of resources this rule applies to.
//
// For example:
// 'pods' means pods.

View File

@@ -28,14 +28,14 @@ import (
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
// sure that all the tuple expansions are valid.
type RuleWithOperationsApplyConfiguration struct {
// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
// operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
// for all of those operations and any future admission operations that are added.
// If '*' is present, the length of the slice must be one.
// Required.
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

@@ -23,16 +23,16 @@ package v1
//
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceApplyConfiguration struct {
// `namespace` is the namespace of the service.
// namespace is the namespace of the service.
// Required
Namespace *string `json:"namespace,omitempty"`
// `name` is the name of the service.
// name is the name of the service.
// Required
Name *string `json:"name,omitempty"`
// `path` is an optional URL path which will be sent in any request to
// path is an optional URL path which will be sent in any request to
// this service.
Path *string `json:"path,omitempty"`
// If specified, the port on the service that hosting webhook.
// port is the port on the service that hosts the webhook.
// Default to 443 for backward compatibility.
// `port` should be a valid port number (1-65535, inclusive).
Port *int32 `json:"port,omitempty"`

View File

@@ -24,7 +24,7 @@ package v1
// TypeChecking contains results of type checking the expressions in the
// ValidatingAdmissionPolicy
type TypeCheckingApplyConfiguration struct {
// The type checking warnings for each expression.
// expressionWarnings contains the type checking warnings for each expression.
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}

View File

@@ -32,12 +32,12 @@ 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"`
// 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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// behaves in the expected way.
// Populated by the system.
// Read-only.

View File

@@ -42,10 +42,10 @@ 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"`
// 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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
// Required.
PolicyName *string `json:"policyName,omitempty"`
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// 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 ValidatingAdmissionPolicy 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 declares what resources match this binding and will be validated by it.
// matchResources declares what resources match this binding and will be validated by it.
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
// If this is unset, all resources matched by the policy are validated by this binding
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.

View File

@@ -27,18 +27,18 @@ import (
//
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// ParamKind specifies the kind of resources used to parameterize this policy.
// 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 ValidatingAdmissionPolicyBinding, the params variable will be null.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// MatchConstraints specifies what resources this policy is designed to validate.
// matchConstraints specifies what resources this policy is designed to validate.
// The AdmissionPolicy 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
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
// Required.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// Validations contain CEL expressions which is used to apply the validation.
// validations contain CEL expressions which is used to apply the validation.
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
// required.
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
// required.
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be validated.
// 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 rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// - If failurePolicy=Fail, reject the request
// - If failurePolicy=Ignore, the policy is skipped
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// Variables contain definitions of variables that can be used in composition of other expressions.
// 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.

View File

@@ -27,12 +27,12 @@ import (
//
// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
// The generation observed by the controller.
// observedGeneration is the generation observed by the controller.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// The results of type checking for each expression.
// typeChecking contains the results of type checking for each expression.
// Presence of this field indicates the completion of the type checking.
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
// The conditions represent the latest available observations of a policy's current state.
// conditions represent the latest available observations of a policy's current state.
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}

View File

@@ -28,23 +28,23 @@ import (
//
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
type ValidatingWebhookApplyConfiguration struct {
// The name of the admission webhook.
// name is the name of the admission webhook.
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
// of the organization.
// Required.
Name *string `json:"name,omitempty"`
// ClientConfig defines how to communicate with the hook.
// clientConfig defines how to communicate with the hook.
// Required
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
// Rules describes what operations on what resources/subresources the webhook cares about.
// rules describes what operations on what resources/subresources the webhook cares about.
// The webhook cares about an operation if it matches _any_ Rule.
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
// from putting the cluster in a state which cannot be recovered from without completely
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
// allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
// matchPolicy defines how the "rules" list is used to match incoming requests.
@@ -62,7 +62,7 @@ type ValidatingWebhookApplyConfiguration struct {
//
// Defaults to "Equivalent"
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
// NamespaceSelector decides whether to run the webhook on an object based
// namespaceSelector decides whether to run the webhook on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -106,7 +106,7 @@ type ValidatingWebhookApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the webhook based on if the
// objectSelector decides whether to run the webhook based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the webhook, and
// is considered to match if either object matches the selector. A null
@@ -118,20 +118,20 @@ type ValidatingWebhookApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// SideEffects states whether this webhook has side effects.
// sideEffects states whether this webhook has side effects.
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
// sideEffects == Unknown or Some.
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// the webhook call will be ignored or the API call will fail based on the
// failure policy.
// The timeout value must be between 1 and 30 seconds.
// Default to 10 seconds.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
// versions the Webhook expects. API server will try to use first version in
// the list which it supports. If none of the versions specified in this list
// supported by API server, validation will fail for this object.
@@ -139,7 +139,7 @@ type ValidatingWebhookApplyConfiguration struct {
// include any versions known to the API Server, calls to the webhook will fail
// and be subject to the failure policy.
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be sent to this
// matchConditions is a list of conditions that must be met for a request to be sent to this
// webhook. Match conditions filter requests that have already been matched by the rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.

View File

@@ -32,10 +32,10 @@ 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"`
// 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"`
// Webhooks is a list of webhooks and the affected resources and operations.
// webhooks is a list of webhooks and the affected resources and operations.
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// Validation specifies the CEL expression which is used to apply the validation.
type ValidationApplyConfiguration struct {
// Expression represents the expression which will be evaluated by CEL.
// expression represents the expression which will be evaluated by CEL.
// ref: https://github.com/google/cel-spec
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
//
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
// non-intersecting keys are appended, retaining their partial order.
// Required.
Expression *string `json:"expression,omitempty"`
// Message represents the message displayed when validation fails. The message is required if the Expression contains
// message represents the message displayed when validation fails. The message is required if the Expression contains
// line breaks. The message must not contain line breaks.
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
// The message must not contain line breaks.
// If unset, the message is "failed Expression: {Expression}".
Message *string `json:"message,omitempty"`
// Reason represents a machine-readable description of why this validation failed.
// reason represents a machine-readable description of why this validation failed.
// If this is the first validation in the list to fail, this reason, as well as the
// corresponding HTTP response code, are used in the
// HTTP response to the client.

View File

@@ -23,11 +23,11 @@ package v1
//
// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
type VariableApplyConfiguration struct {
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// The variable can be accessed in other expressions through `variables`
// For example, if name is "foo", the variable will be available as `variables.foo`
Name *string `json:"name,omitempty"`
// Expression is the expression that will be evaluated as the value of the variable.
// expression is the expression that will be evaluated as the value of the variable.
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
Expression *string `json:"expression,omitempty"`
}

View File

@@ -24,7 +24,7 @@ package v1
// WebhookClientConfig contains the information to make a TLS
// connection with the webhook
type WebhookClientConfigApplyConfiguration struct {
// `url` gives the location of the webhook, in standard URL form
// url gives the location of the webhook, in standard URL form
// (`scheme://host:port/path`). Exactly one of `url` or `service`
// must be specified.
//
@@ -50,12 +50,12 @@ type WebhookClientConfigApplyConfiguration struct {
// allowed. Fragments ("#...") and query parameters ("?...") are not
// allowed, either.
URL *string `json:"url,omitempty"`
// `service` is a reference to the service for this webhook. Either
// service is a reference to the service for this webhook. Either
// `service` or `url` must be specified.
//
// If the webhook is running within the cluster, then you should use `service`.
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// If unspecified, system trust roots on the apiserver are used.
CABundle []byte `json:"caBundle,omitempty"`
}

View File

@@ -23,11 +23,11 @@ package v1alpha1
//
// ExpressionWarning is a warning information that targets a specific expression.
type ExpressionWarningApplyConfiguration struct {
// The path to the field that refers the expression.
// fieldRef is the path to the field that refers to the expression.
// For example, the reference to the expression of the first item of
// validations is "spec.validations[0].expression"
FieldRef *string `json:"fieldRef,omitempty"`
// The content of type checking information in a human-readable form.
// warning contains the content of type checking information in a human-readable form.
// Each line of the warning contains the type that the expression is checked
// against, followed by the type check error from the compiler.
Warning *string `json:"warning,omitempty"`

View File

@@ -21,7 +21,7 @@ package v1alpha1
// MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use
// with apply.
type MatchConditionApplyConfiguration struct {
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
// as well as providing an identifier for logging purposes. A good name should be descriptive of
// the associated expression.
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
@@ -31,7 +31,7 @@ type MatchConditionApplyConfiguration struct {
//
// Required.
Name *string `json:"name,omitempty"`
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
//
// 'object' - The object from the incoming request. The value is null for DELETE requests.

View File

@@ -30,7 +30,7 @@ import (
// on whether it meets the match criteria.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
type MatchResourcesApplyConfiguration struct {
// NamespaceSelector decides whether to run the admission control policy on an object based
// namespaceSelector decides whether to run the admission control policy on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the policy based on if the
// objectSelector decides whether to run the policy based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the policy's expression (CEL), and
// is considered to match if either object matches the selector. A null
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// ResourceRules describes what operations on what resources/subresources the admission policy matches.
// resourceRules describes what operations on what resources/subresources the admission policy matches.
// The policy cares about an operation if it matches _any_ Rule.
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
// ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about.
// excludeResourceRules describes what operations on what resources/subresources the policy should not care about.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.

View File

@@ -32,10 +32,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the MutatingAdmissionPolicy.
// spec defines the desired behavior of the MutatingAdmissionPolicy.
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -42,10 +42,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -28,10 +28,10 @@ import (
//
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
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 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

@@ -23,11 +23,11 @@ package v1alpha1
//
// ParamKind is a tuple of Group Kind and Version.
type ParamKindApplyConfiguration struct {
// APIVersion is the API group version the resources belong to.
// apiVersion is the API group version the resources belong to.
// In format of "group/version".
// Required.
APIVersion *string `json:"apiVersion,omitempty"`
// Kind is the API kind the resources belong to.
// kind is the API kind the resources belong to.
// Required.
Kind *string `json:"kind,omitempty"`
}

View File

@@ -29,7 +29,7 @@ import (
// ParamRef describes how to locate the params to be used as input to
// expressions of rules applied by a policy binding.
type ParamRefApplyConfiguration struct {
// `name` is the name of the resource being referenced.
// name is the name of the resource being referenced.
//
// `name` and `selector` are mutually exclusive properties. If one is set,
// the other must be unset.
@@ -58,7 +58,7 @@ type ParamRefApplyConfiguration struct {
// One of `name` or `selector` must be set, but `name` and `selector` are
// mutually exclusive properties. If one is set, the other must be unset.
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// `parameterNotFoundAction` controls the behavior of the binding when the resource
// parameterNotFoundAction controls the behavior of the binding when the resource
// exists, and name or selector is valid, but there are no parameters
// matched by the binding. If the value is set to `Allow`, then no
// matched parameters will be treated as successful validation by the binding.

View File

@@ -24,7 +24,7 @@ package v1alpha1
// TypeChecking contains results of type checking the expressions in the
// ValidatingAdmissionPolicy
type TypeCheckingApplyConfiguration struct {
// The type checking warnings for each expression.
// expressionWarnings contains the type checking warnings for each expression.
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}

View File

@@ -32,12 +32,12 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// behaves in the expected way.
// Populated by the system.
// Read-only.

View File

@@ -42,10 +42,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
// Required.
PolicyName *string `json:"policyName,omitempty"`
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// 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 ValidatingAdmissionPolicy 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 declares what resources match this binding and will be validated by it.
// matchResources declares what resources match this binding and will be validated by it.
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
// If this is unset, all resources matched by the policy are validated by this binding
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.

View File

@@ -27,18 +27,18 @@ import (
//
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// ParamKind specifies the kind of resources used to parameterize this policy.
// 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 ValidatingAdmissionPolicyBinding, the params variable will be null.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// MatchConstraints specifies what resources this policy is designed to validate.
// matchConstraints specifies what resources this policy is designed to validate.
// The AdmissionPolicy 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
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
// Required.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// Validations contain CEL expressions which is used to apply the validation.
// validations contain CEL expressions which is used to apply the validation.
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
// required.
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
// required.
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be validated.
// 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 rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// - If failurePolicy=Fail, reject the request
// - If failurePolicy=Ignore, the policy is skipped
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// Variables contain definitions of variables that can be used in composition of other expressions.
// 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.

View File

@@ -27,12 +27,12 @@ import (
//
// ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
// The generation observed by the controller.
// observedGeneration is the generation observed by the controller.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// The results of type checking for each expression.
// typeChecking contains the results of type checking for each expression.
// Presence of this field indicates the completion of the type checking.
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
// The conditions represent the latest available observations of a policy's current state.
// conditions represent the latest available observations of a policy's current state.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// Validation specifies the CEL expression which is used to apply the validation.
type ValidationApplyConfiguration struct {
// Expression represents the expression which will be evaluated by CEL.
// expression represents the expression which will be evaluated by CEL.
// ref: https://github.com/google/cel-spec
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
//
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
// non-intersecting keys are appended, retaining their partial order.
// Required.
Expression *string `json:"expression,omitempty"`
// Message represents the message displayed when validation fails. The message is required if the Expression contains
// message represents the message displayed when validation fails. The message is required if the Expression contains
// line breaks. The message must not contain line breaks.
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
// The message must not contain line breaks.
// If unset, the message is "failed Expression: {Expression}".
Message *string `json:"message,omitempty"`
// Reason represents a machine-readable description of why this validation failed.
// reason represents a machine-readable description of why this validation failed.
// If this is the first validation in the list to fail, this reason, as well as the
// corresponding HTTP response code, are used in the
// HTTP response to the client.

View File

@@ -23,11 +23,11 @@ package v1alpha1
//
// Variable is the definition of a variable that is used for composition.
type VariableApplyConfiguration struct {
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// The variable can be accessed in other expressions through `variables`
// For example, if name is "foo", the variable will be available as `variables.foo`
Name *string `json:"name,omitempty"`
// Expression is the expression that will be evaluated as the value of the variable.
// expression is the expression that will be evaluated as the value of the variable.
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
Expression *string `json:"expression,omitempty"`
}

View File

@@ -23,11 +23,11 @@ package v1beta1
//
// ExpressionWarning is a warning information that targets a specific expression.
type ExpressionWarningApplyConfiguration struct {
// The path to the field that refers the expression.
// fieldRef is the path to the field that refers to the expression.
// For example, the reference to the expression of the first item of
// validations is "spec.validations[0].expression"
FieldRef *string `json:"fieldRef,omitempty"`
// The content of type checking information in a human-readable form.
// warning contains the content of type checking information in a human-readable form.
// Each line of the warning contains the type that the expression is checked
// against, followed by the type check error from the compiler.
Warning *string `json:"warning,omitempty"`

View File

@@ -23,7 +23,7 @@ package v1beta1
//
// MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.
type MatchConditionApplyConfiguration struct {
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
// as well as providing an identifier for logging purposes. A good name should be descriptive of
// the associated expression.
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
@@ -33,7 +33,7 @@ type MatchConditionApplyConfiguration struct {
//
// Required.
Name *string `json:"name,omitempty"`
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
//
// 'object' - The object from the incoming request. The value is null for DELETE requests.

View File

@@ -30,7 +30,7 @@ import (
// on whether it meets the match criteria.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
type MatchResourcesApplyConfiguration struct {
// NamespaceSelector decides whether to run the admission control policy on an object based
// namespaceSelector decides whether to run the admission control policy on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the validation based on if the
// objectSelector decides whether to run the validation based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the cel validation, and
// is considered to match if either object matches the selector. A null
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
// resourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
// The policy cares about an operation if it matches _any_ Rule.
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
// excludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.

View File

@@ -32,10 +32,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the MutatingAdmissionPolicy.
// spec defines the desired behavior of the MutatingAdmissionPolicy.
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -42,10 +42,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -30,23 +30,23 @@ import (
//
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
type MutatingWebhookApplyConfiguration struct {
// The name of the admission webhook.
// name is the name of the admission webhook.
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
// of the organization.
// Required.
Name *string `json:"name,omitempty"`
// ClientConfig defines how to communicate with the hook.
// clientConfig defines how to communicate with the hook.
// Required
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
// Rules describes what operations on what resources/subresources the webhook cares about.
// rules describes what operations on what resources/subresources the webhook cares about.
// The webhook cares about an operation if it matches _any_ Rule.
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
// from putting the cluster in a state which cannot be recovered from without completely
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
// allowed values are Ignore or Fail. Defaults to Ignore.
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
// matchPolicy defines how the "rules" list is used to match incoming requests.
@@ -64,7 +64,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Defaults to "Exact"
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
// NamespaceSelector decides whether to run the webhook on an object based
// namespaceSelector decides whether to run the webhook on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -108,7 +108,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the webhook based on if the
// objectSelector decides whether to run the webhook based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the webhook, and
// is considered to match if either object matches the selector. A null
@@ -120,20 +120,20 @@ type MutatingWebhookApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// SideEffects states whether this webhook has side effects.
// sideEffects states whether this webhook has side effects.
// Acceptable values are: Unknown, None, Some, NoneOnDryRun
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
// sideEffects == Unknown or Some. Defaults to Unknown.
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// the webhook call will be ignored or the API call will fail based on the
// failure policy.
// The timeout value must be between 1 and 30 seconds.
// Default to 30 seconds.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
// versions the Webhook expects. API server will try to use first version in
// the list which it supports. If none of the versions specified in this list
// supported by API server, validation will fail for this object.
@@ -158,7 +158,7 @@ type MutatingWebhookApplyConfiguration struct {
//
// Defaults to "Never".
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be sent to this
// matchConditions is a list of conditions that must be met for a request to be sent to this
// webhook. Match conditions filter requests that have already been matched by the rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.

View File

@@ -33,10 +33,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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.
// webhooks is a list of webhooks and the affected resources and operations.
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}

View File

@@ -28,10 +28,10 @@ import (
//
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
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 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

@@ -23,11 +23,11 @@ package v1beta1
//
// ParamKind is a tuple of Group Kind and Version.
type ParamKindApplyConfiguration struct {
// APIVersion is the API group version the resources belong to.
// apiVersion is the API group version the resources belong to.
// In format of "group/version".
// Required.
APIVersion *string `json:"apiVersion,omitempty"`
// Kind is the API kind the resources belong to.
// kind is the API kind the resources belong to.
// Required.
Kind *string `json:"kind,omitempty"`
}

View File

@@ -62,7 +62,7 @@ type ParamRefApplyConfiguration struct {
// One of `name` or `selector` must be set, but `name` and `selector` are
// mutually exclusive properties. If one is set, the other must be unset.
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// `parameterNotFoundAction` controls the behavior of the binding when the resource
// parameterNotFoundAction controls the behavior of the binding when the resource
// exists, and name or selector is valid, but there are no parameters
// matched by the binding. If the value is set to `Allow`, then no
// matched parameters will be treated as successful validation by the binding.

View File

@@ -23,18 +23,18 @@ package v1beta1
//
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceApplyConfiguration struct {
// `namespace` is the namespace of the service.
// namespace is the namespace of the service.
// Required
Namespace *string `json:"namespace,omitempty"`
// `name` is the name of the service.
// name is the name of the service.
// Required
Name *string `json:"name,omitempty"`
// `path` is an optional URL path which will be sent in any request to
// path is an optional URL path which will be sent in any request to
// this service.
Path *string `json:"path,omitempty"`
// If specified, the port on the service that hosting webhook.
// port is the port on the service that hosts the webhook.
// Default to 443 for backward compatibility.
// `port` should be a valid port number (1-65535, inclusive).
// port should be a valid port number (1-65535, inclusive).
Port *int32 `json:"port,omitempty"`
}

View File

@@ -24,7 +24,7 @@ package v1beta1
// TypeChecking contains results of type checking the expressions in the
// ValidatingAdmissionPolicy
type TypeCheckingApplyConfiguration struct {
// The type checking warnings for each expression.
// expressionWarnings contains the type checking warnings for each expression.
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}

View File

@@ -32,12 +32,12 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
// behaves in the expected way.
// Populated by the system.
// Read-only.

View File

@@ -42,10 +42,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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"`
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
// Required.
PolicyName *string `json:"policyName,omitempty"`
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// 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 ValidatingAdmissionPolicy 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 declares what resources match this binding and will be validated by it.
// matchResources declares what resources match this binding and will be validated by it.
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
// If this is unset, all resources matched by the policy are validated by this binding
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.

View File

@@ -27,18 +27,18 @@ import (
//
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// ParamKind specifies the kind of resources used to parameterize this policy.
// 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 ValidatingAdmissionPolicyBinding, the params variable will be null.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// MatchConstraints specifies what resources this policy is designed to validate.
// matchConstraints specifies what resources this policy is designed to validate.
// The AdmissionPolicy 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
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
// Required.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// Validations contain CEL expressions which is used to apply the validation.
// validations contain CEL expressions which is used to apply the validation.
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
// required.
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
// required.
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be validated.
// 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 rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// - If failurePolicy=Fail, reject the request
// - If failurePolicy=Ignore, the policy is skipped
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// Variables contain definitions of variables that can be used in composition of other expressions.
// 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.

View File

@@ -27,12 +27,12 @@ import (
//
// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
// The generation observed by the controller.
// observedGeneration is the generation observed by the controller.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// The results of type checking for each expression.
// typeChecking contains the results of type checking for each expression.
// Presence of this field indicates the completion of the type checking.
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
// The conditions represent the latest available observations of a policy's current state.
// conditions represent the latest available observations of a policy's current state.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}

View File

@@ -29,23 +29,23 @@ import (
//
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
type ValidatingWebhookApplyConfiguration struct {
// The name of the admission webhook.
// name is the name of the admission webhook.
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
// of the organization.
// Required.
Name *string `json:"name,omitempty"`
// ClientConfig defines how to communicate with the hook.
// clientConfig defines how to communicate with the hook.
// Required
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
// Rules describes what operations on what resources/subresources the webhook cares about.
// rules describes what operations on what resources/subresources the webhook cares about.
// The webhook cares about an operation if it matches _any_ Rule.
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
// from putting the cluster in a state which cannot be recovered from without completely
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
// allowed values are Ignore or Fail. Defaults to Ignore.
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
// matchPolicy defines how the "rules" list is used to match incoming requests.
@@ -63,7 +63,7 @@ type ValidatingWebhookApplyConfiguration struct {
//
// Defaults to "Exact"
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
// NamespaceSelector decides whether to run the webhook on an object based
// namespaceSelector decides whether to run the webhook on an object based
// on whether the namespace for that object matches the selector. If the
// object itself is a namespace, the matching is performed on
// object.metadata.labels. If the object is another cluster scoped resource,
@@ -107,7 +107,7 @@ type ValidatingWebhookApplyConfiguration struct {
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// ObjectSelector decides whether to run the webhook based on if the
// objectSelector decides whether to run the webhook based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the webhook, and
// is considered to match if either object matches the selector. A null
@@ -119,20 +119,20 @@ type ValidatingWebhookApplyConfiguration struct {
// users may skip the admission webhook by setting the labels.
// Default to the empty LabelSelector, which matches everything.
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// SideEffects states whether this webhook has side effects.
// sideEffects states whether this webhook has side effects.
// Acceptable values are: Unknown, None, Some, NoneOnDryRun
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
// sideEffects == Unknown or Some. Defaults to Unknown.
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
// the webhook call will be ignored or the API call will fail based on the
// failure policy.
// The timeout value must be between 1 and 30 seconds.
// Default to 30 seconds.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
// versions the Webhook expects. API server will try to use first version in
// the list which it supports. If none of the versions specified in this list
// supported by API server, validation will fail for this object.
@@ -141,7 +141,7 @@ type ValidatingWebhookApplyConfiguration struct {
// and be subject to the failure policy.
// Default to `['v1beta1']`.
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
// MatchConditions is a list of conditions that must be met for a request to be sent to this
// matchConditions is a list of conditions that must be met for a request to be sent to this
// webhook. Match conditions filter requests that have already been matched by the rules,
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
// There are a maximum of 64 match conditions allowed.

View File

@@ -33,10 +33,10 @@ 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"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
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.
// webhooks is a list of webhooks and the affected resources and operations.
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}

View File

@@ -27,7 +27,7 @@ import (
//
// Validation specifies the CEL expression which is used to apply the validation.
type ValidationApplyConfiguration struct {
// Expression represents the expression which will be evaluated by CEL.
// expression represents the expression which will be evaluated by CEL.
// ref: https://github.com/google/cel-spec
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
//
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
// non-intersecting keys are appended, retaining their partial order.
// Required.
Expression *string `json:"expression,omitempty"`
// Message represents the message displayed when validation fails. The message is required if the Expression contains
// message represents the message displayed when validation fails. The message is required if the Expression contains
// line breaks. The message must not contain line breaks.
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
// The message must not contain line breaks.
// If unset, the message is "failed Expression: {Expression}".
Message *string `json:"message,omitempty"`
// Reason represents a machine-readable description of why this validation failed.
// reason represents a machine-readable description of why this validation failed.
// If this is the first validation in the list to fail, this reason, as well as the
// corresponding HTTP response code, are used in the
// HTTP response to the client.

View File

@@ -23,11 +23,11 @@ package v1beta1
//
// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
type VariableApplyConfiguration struct {
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
// The variable can be accessed in other expressions through `variables`
// For example, if name is "foo", the variable will be available as `variables.foo`
Name *string `json:"name,omitempty"`
// Expression is the expression that will be evaluated as the value of the variable.
// expression is the expression that will be evaluated as the value of the variable.
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
Expression *string `json:"expression,omitempty"`
}

View File

@@ -24,7 +24,7 @@ package v1beta1
// WebhookClientConfig contains the information to make a TLS
// connection with the webhook
type WebhookClientConfigApplyConfiguration struct {
// `url` gives the location of the webhook, in standard URL form
// url gives the location of the webhook, in standard URL form
// (`scheme://host:port/path`). Exactly one of `url` or `service`
// must be specified.
//
@@ -50,12 +50,12 @@ type WebhookClientConfigApplyConfiguration struct {
// allowed. Fragments ("#...") and query parameters ("?...") are not
// allowed, either.
URL *string `json:"url,omitempty"`
// `service` is a reference to the service for this webhook. Either
// service is a reference to the service for this webhook. Either
// `service` or `url` must be specified.
//
// If the webhook is running within the cluster, then you should use `service`.
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// If unspecified, system trust roots on the apiserver are used.
CABundle []byte `json:"caBundle,omitempty"`
}

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

@@ -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,7 +32,7 @@ import (
//
// configuration of a horizontal pod autoscaler.
type HorizontalPodAutoscalerApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// 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.

View File

@@ -29,7 +29,7 @@ import (
//
// Scale represents a scaling request for a resource.
type ScaleApplyConfiguration struct {
metav1.TypeMetaApplyConfiguration `json:",inline"`
metav1.TypeMetaApplyConfiguration `json:""`
// 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.

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

@@ -1,87 +0,0 @@
/*
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 v2beta1
import (
v1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
)
// ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use
// with apply.
//
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
// Kubernetes, as specified in requests and limits, describing each pod in the
// current scale target (e.g. CPU or memory). The values will be averaged
// together before being compared to the target. Such metrics are built in to
// Kubernetes, and have special scaling options on top of those available to
// normal per-pod metrics using the "pods" source. Only one "target" type
// should be set.
type ContainerResourceMetricSourceApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// targetAverageUtilization is the target 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.
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"`
// targetAverageValue is the target value of the average of the
// resource metric across all relevant pods, as a raw value (instead of as
// a percentage of the request), similar to the "pods" metric source type.
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"`
// container is the name of the container in the pods of the scaling target
Container *string `json:"container,omitempty"`
}
// ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with
// apply.
func ContainerResourceMetricSource() *ContainerResourceMetricSourceApplyConfiguration {
return &ContainerResourceMetricSourceApplyConfiguration{}
}
// 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 *ContainerResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricSourceApplyConfiguration {
b.Name = &value
return b
}
// WithTargetAverageUtilization sets the TargetAverageUtilization 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 TargetAverageUtilization field is set to the value of the last call.
func (b *ContainerResourceMetricSourceApplyConfiguration) WithTargetAverageUtilization(value int32) *ContainerResourceMetricSourceApplyConfiguration {
b.TargetAverageUtilization = &value
return b
}
// WithTargetAverageValue sets the TargetAverageValue 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 TargetAverageValue field is set to the value of the last call.
func (b *ContainerResourceMetricSourceApplyConfiguration) WithTargetAverageValue(value resource.Quantity) *ContainerResourceMetricSourceApplyConfiguration {
b.TargetAverageValue = &value
return b
}
// WithContainer sets the Container 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 Container field is set to the value of the last call.
func (b *ContainerResourceMetricSourceApplyConfiguration) WithContainer(value string) *ContainerResourceMetricSourceApplyConfiguration {
b.Container = &value
return b
}

View File

@@ -1,88 +0,0 @@
/*
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 v2beta1
import (
v1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
)
// ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use
// with apply.
//
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
// Kubernetes, as specified in requests and limits, 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 to
// normal per-pod metrics using the "pods" source.
type ContainerResourceMetricStatusApplyConfiguration struct {
// name is the name of the resource in question.
Name *v1.ResourceName `json:"name,omitempty"`
// currentAverageUtilization 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. It will only be
// present if `targetAverageValue` was set in the corresponding metric
// specification.
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"`
// currentAverageValue is the current value of the average of the
// resource metric across all relevant pods, as a raw value (instead of as
// a percentage of the request), similar to the "pods" metric source type.
// It will always be set, regardless of the corresponding metric specification.
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
// container is the name of the container in the pods of the scaling target
Container *string `json:"container,omitempty"`
}
// ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with
// apply.
func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration {
return &ContainerResourceMetricStatusApplyConfiguration{}
}
// 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 *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration {
b.Name = &value
return b
}
// WithCurrentAverageUtilization sets the CurrentAverageUtilization 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 CurrentAverageUtilization field is set to the value of the last call.
func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageUtilization(value int32) *ContainerResourceMetricStatusApplyConfiguration {
b.CurrentAverageUtilization = &value
return b
}
// WithCurrentAverageValue sets the CurrentAverageValue 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 CurrentAverageValue field is set to the value of the last call.
func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *ContainerResourceMetricStatusApplyConfiguration {
b.CurrentAverageValue = &value
return b
}
// WithContainer sets the Container 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 Container field is set to the value of the last call.
func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration {
b.Container = &value
return b
}

View File

@@ -1,62 +0,0 @@
/*
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 v2beta1
// CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use
// with apply.
//
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
type CrossVersionObjectReferenceApplyConfiguration struct {
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
// Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Name *string `json:"name,omitempty"`
// API version of the referent
APIVersion *string `json:"apiVersion,omitempty"`
}
// CrossVersionObjectReferenceApplyConfiguration constructs a declarative configuration of the CrossVersionObjectReference type for use with
// apply.
func CrossVersionObjectReference() *CrossVersionObjectReferenceApplyConfiguration {
return &CrossVersionObjectReferenceApplyConfiguration{}
}
// 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 *CrossVersionObjectReferenceApplyConfiguration) WithKind(value string) *CrossVersionObjectReferenceApplyConfiguration {
b.Kind = &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 *CrossVersionObjectReferenceApplyConfiguration) WithName(value string) *CrossVersionObjectReferenceApplyConfiguration {
b.Name = &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 *CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion(value string) *CrossVersionObjectReferenceApplyConfiguration {
b.APIVersion = &value
return b
}

View File

@@ -1,83 +0,0 @@
/*
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 v2beta1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use
// with apply.
//
// ExternalMetricSource indicates how to scale on a metric not associated with
// any Kubernetes object (for example length of queue in cloud
// messaging service, or QPS from loadbalancer running outside of cluster).
// Exactly one "target" type should be set.
type ExternalMetricSourceApplyConfiguration struct {
// metricName is the name of the metric in question.
MetricName *string `json:"metricName,omitempty"`
// metricSelector is used to identify a specific time series
// within a given metric.
MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"`
// targetValue is the target value of the metric (as a quantity).
// Mutually exclusive with TargetAverageValue.
TargetValue *resource.Quantity `json:"targetValue,omitempty"`
// targetAverageValue is the target per-pod value of global metric (as a quantity).
// Mutually exclusive with TargetValue.
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"`
}
// ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with
// apply.
func ExternalMetricSource() *ExternalMetricSourceApplyConfiguration {
return &ExternalMetricSourceApplyConfiguration{}
}
// WithMetricName sets the MetricName 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 MetricName field is set to the value of the last call.
func (b *ExternalMetricSourceApplyConfiguration) WithMetricName(value string) *ExternalMetricSourceApplyConfiguration {
b.MetricName = &value
return b
}
// WithMetricSelector sets the MetricSelector 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 MetricSelector field is set to the value of the last call.
func (b *ExternalMetricSourceApplyConfiguration) WithMetricSelector(value *v1.LabelSelectorApplyConfiguration) *ExternalMetricSourceApplyConfiguration {
b.MetricSelector = value
return b
}
// WithTargetValue sets the TargetValue 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 TargetValue field is set to the value of the last call.
func (b *ExternalMetricSourceApplyConfiguration) WithTargetValue(value resource.Quantity) *ExternalMetricSourceApplyConfiguration {
b.TargetValue = &value
return b
}
// WithTargetAverageValue sets the TargetAverageValue 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 TargetAverageValue field is set to the value of the last call.
func (b *ExternalMetricSourceApplyConfiguration) WithTargetAverageValue(value resource.Quantity) *ExternalMetricSourceApplyConfiguration {
b.TargetAverageValue = &value
return b
}

View File

@@ -1,80 +0,0 @@
/*
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 v2beta1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use
// with apply.
//
// ExternalMetricStatus indicates the current value of a global metric
// not associated with any Kubernetes object.
type ExternalMetricStatusApplyConfiguration struct {
// metricName is the name of a metric used for autoscaling in
// metric system.
MetricName *string `json:"metricName,omitempty"`
// metricSelector is used to identify a specific time series
// within a given metric.
MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"`
// currentValue is the current value of the metric (as a quantity)
CurrentValue *resource.Quantity `json:"currentValue,omitempty"`
// currentAverageValue is the current value of metric averaged over autoscaled pods.
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
}
// ExternalMetricStatusApplyConfiguration constructs a declarative configuration of the ExternalMetricStatus type for use with
// apply.
func ExternalMetricStatus() *ExternalMetricStatusApplyConfiguration {
return &ExternalMetricStatusApplyConfiguration{}
}
// WithMetricName sets the MetricName 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 MetricName field is set to the value of the last call.
func (b *ExternalMetricStatusApplyConfiguration) WithMetricName(value string) *ExternalMetricStatusApplyConfiguration {
b.MetricName = &value
return b
}
// WithMetricSelector sets the MetricSelector 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 MetricSelector field is set to the value of the last call.
func (b *ExternalMetricStatusApplyConfiguration) WithMetricSelector(value *v1.LabelSelectorApplyConfiguration) *ExternalMetricStatusApplyConfiguration {
b.MetricSelector = value
return b
}
// WithCurrentValue sets the CurrentValue 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 CurrentValue field is set to the value of the last call.
func (b *ExternalMetricStatusApplyConfiguration) WithCurrentValue(value resource.Quantity) *ExternalMetricStatusApplyConfiguration {
b.CurrentValue = &value
return b
}
// WithCurrentAverageValue sets the CurrentAverageValue 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 CurrentAverageValue field is set to the value of the last call.
func (b *ExternalMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *ExternalMetricStatusApplyConfiguration {
b.CurrentAverageValue = &value
return b
}

View File

@@ -1,91 +0,0 @@
/*
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 v2beta1
import (
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use
// with apply.
//
// HorizontalPodAutoscalerCondition describes the state of
// a HorizontalPodAutoscaler at a certain point.
type HorizontalPodAutoscalerConditionApplyConfiguration struct {
// type describes the current condition
Type *autoscalingv2beta1.HorizontalPodAutoscalerConditionType `json:"type,omitempty"`
// status is the status of the condition (True, False, Unknown)
Status *v1.ConditionStatus `json:"status,omitempty"`
// lastTransitionTime is the last time the condition transitioned from
// one status to another
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
// reason is the reason for the condition's last transition.
Reason *string `json:"reason,omitempty"`
// message is a human-readable explanation containing details about
// the transition
Message *string `json:"message,omitempty"`
}
// HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with
// apply.
func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration {
return &HorizontalPodAutoscalerConditionApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value autoscalingv2beta1.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.Type = &value
return b
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.Status = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call.
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason 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 Reason field is set to the value of the last call.
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.Reason = &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 *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -1,89 +0,0 @@
/*
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 v2beta1
// HorizontalPodAutoscalerSpecApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerSpec type for use
// with apply.
//
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
type HorizontalPodAutoscalerSpecApplyConfiguration struct {
// scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
// should be collected, as well as to actually change the replica count.
ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"`
// minReplicas is the lower limit for the number of replicas to which the autoscaler
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
// metric is configured. Scaling is active as long as at least one metric value is
// available.
MinReplicas *int32 `json:"minReplicas,omitempty"`
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
// It cannot be less that minReplicas.
MaxReplicas *int32 `json:"maxReplicas,omitempty"`
// metrics contains the specifications for which to use to calculate the
// desired replica count (the maximum replica count across all metrics will
// be used). The desired replica count is calculated multiplying the
// ratio between the target value and the current value by the current
// number of pods. Ergo, metrics used must decrease as the pod count is
// increased, and vice-versa. See the individual metric source types for
// more information about how each type of metric must respond.
Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"`
}
// HorizontalPodAutoscalerSpecApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerSpec type for use with
// apply.
func HorizontalPodAutoscalerSpec() *HorizontalPodAutoscalerSpecApplyConfiguration {
return &HorizontalPodAutoscalerSpecApplyConfiguration{}
}
// WithScaleTargetRef sets the ScaleTargetRef 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 ScaleTargetRef field is set to the value of the last call.
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithScaleTargetRef(value *CrossVersionObjectReferenceApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration {
b.ScaleTargetRef = value
return b
}
// WithMinReplicas sets the MinReplicas 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 MinReplicas field is set to the value of the last call.
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMinReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration {
b.MinReplicas = &value
return b
}
// WithMaxReplicas sets the MaxReplicas 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 MaxReplicas field is set to the value of the last call.
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMaxReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration {
b.MaxReplicas = &value
return b
}
// WithMetrics adds the given value to the Metrics 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 Metrics field.
func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMetrics(values ...*MetricSpecApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMetrics")
}
b.Metrics = append(b.Metrics, *values[i])
}
return b
}

View File

@@ -1,110 +0,0 @@
/*
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 v2beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// HorizontalPodAutoscalerStatusApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerStatus type for use
// with apply.
//
// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
type HorizontalPodAutoscalerStatusApplyConfiguration struct {
// observedGeneration is the most recent generation observed by this autoscaler.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
// used by the autoscaler to control how often the number of pods is changed.
LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"`
// currentReplicas is current number of replicas of pods managed by this autoscaler,
// as last seen by the autoscaler.
CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
// as last calculated by the autoscaler.
DesiredReplicas *int32 `json:"desiredReplicas,omitempty"`
// currentMetrics is the last read state of the metrics used by this autoscaler.
CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"`
// conditions is the set of conditions required for this autoscaler to scale its target,
// and indicates whether or not those conditions are met.
Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"`
}
// HorizontalPodAutoscalerStatusApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerStatus type for use with
// apply.
func HorizontalPodAutoscalerStatus() *HorizontalPodAutoscalerStatusApplyConfiguration {
return &HorizontalPodAutoscalerStatusApplyConfiguration{}
}
// 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 *HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithLastScaleTime sets the LastScaleTime 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 LastScaleTime field is set to the value of the last call.
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime(value v1.Time) *HorizontalPodAutoscalerStatusApplyConfiguration {
b.LastScaleTime = &value
return b
}
// WithCurrentReplicas sets the CurrentReplicas 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 CurrentReplicas field is set to the value of the last call.
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration {
b.CurrentReplicas = &value
return b
}
// WithDesiredReplicas sets the DesiredReplicas 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 DesiredReplicas field is set to the value of the last call.
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration {
b.DesiredReplicas = &value
return b
}
// WithCurrentMetrics adds the given value to the CurrentMetrics 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 CurrentMetrics field.
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentMetrics(values ...*MetricStatusApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithCurrentMetrics")
}
b.CurrentMetrics = append(b.CurrentMetrics, *values[i])
}
return b
}
// WithConditions adds the given value to the Conditions 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 Conditions field.
func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithConditions(values ...*HorizontalPodAutoscalerConditionApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}

View File

@@ -1,113 +0,0 @@
/*
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 v2beta1
import (
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
)
// MetricSpecApplyConfiguration represents a declarative configuration of the MetricSpec type for use
// with apply.
//
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
type MetricSpecApplyConfiguration struct {
// type is the type of metric source. It should be one of "ContainerResource",
// "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"`
// object refers to a metric describing a single kubernetes object
// (for example, hits-per-second on an Ingress object).
Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"`
// pods refers to a metric describing each pod in the current scale target
// (for example, transactions-processed-per-second). The values will be
// averaged together before being compared to the target value.
Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"`
// resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing 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
// to normal per-pod metrics using the "pods" source.
Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"`
// container resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing a single container in
// each pod of 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 to normal per-pod metrics using the "pods" source.
ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"`
// external refers to a global metric that is not associated
// with any Kubernetes object. It allows autoscaling based on information
// coming from components running outside of cluster
// (for example length of queue in cloud messaging service, or
// QPS from loadbalancer running outside of cluster).
External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"`
}
// MetricSpecApplyConfiguration constructs a declarative configuration of the MetricSpec type for use with
// apply.
func MetricSpec() *MetricSpecApplyConfiguration {
return &MetricSpecApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithType(value autoscalingv2beta1.MetricSourceType) *MetricSpecApplyConfiguration {
b.Type = &value
return b
}
// WithObject sets the Object 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 Object field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithObject(value *ObjectMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration {
b.Object = value
return b
}
// WithPods sets the Pods 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 Pods field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithPods(value *PodsMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration {
b.Pods = value
return b
}
// WithResource sets the Resource 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 Resource field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithResource(value *ResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration {
b.Resource = value
return b
}
// WithContainerResource sets the ContainerResource 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 ContainerResource field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithContainerResource(value *ContainerResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration {
b.ContainerResource = value
return b
}
// WithExternal sets the External 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 External field is set to the value of the last call.
func (b *MetricSpecApplyConfiguration) WithExternal(value *ExternalMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration {
b.External = value
return b
}

View File

@@ -1,112 +0,0 @@
/*
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 v2beta1
import (
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
)
// MetricStatusApplyConfiguration represents a declarative configuration of the MetricStatus type for use
// with apply.
//
// MetricStatus describes the last-read state of a single metric.
type MetricStatusApplyConfiguration struct {
// type is the type of metric source. It will be one of "ContainerResource",
// "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
Type *autoscalingv2beta1.MetricSourceType `json:"type,omitempty"`
// object refers to a metric describing a single kubernetes object
// (for example, hits-per-second on an Ingress object).
Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"`
// pods refers to a metric describing each pod in the current scale target
// (for example, transactions-processed-per-second). The values will be
// averaged together before being compared to the target value.
Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"`
// resource refers to a resource metric (such as those specified in
// requests and limits) known to Kubernetes describing 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
// 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
// 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
// to normal per-pod metrics using the "pods" source.
ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"`
// external refers to a global metric that is not associated
// with any Kubernetes object. It allows autoscaling based on information
// coming from components running outside of cluster
// (for example length of queue in cloud messaging service, or
// QPS from loadbalancer running outside of cluster).
External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"`
}
// MetricStatusApplyConfiguration constructs a declarative configuration of the MetricStatus type for use with
// apply.
func MetricStatus() *MetricStatusApplyConfiguration {
return &MetricStatusApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithType(value autoscalingv2beta1.MetricSourceType) *MetricStatusApplyConfiguration {
b.Type = &value
return b
}
// WithObject sets the Object 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 Object field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithObject(value *ObjectMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
b.Object = value
return b
}
// WithPods sets the Pods 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 Pods field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithPods(value *PodsMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
b.Pods = value
return b
}
// WithResource sets the Resource 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 Resource field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithResource(value *ResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
b.Resource = value
return b
}
// WithContainerResource sets the ContainerResource 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 ContainerResource field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithContainerResource(value *ContainerResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
b.ContainerResource = value
return b
}
// WithExternal sets the External 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 External field is set to the value of the last call.
func (b *MetricStatusApplyConfiguration) WithExternal(value *ExternalMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
b.External = value
return b
}

View File

@@ -1,91 +0,0 @@
/*
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 v2beta1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ObjectMetricSourceApplyConfiguration represents a declarative configuration of the ObjectMetricSource type for use
// with apply.
//
// ObjectMetricSource indicates how to scale on a metric describing a
// kubernetes object (for example, hits-per-second on an Ingress object).
type ObjectMetricSourceApplyConfiguration struct {
// target is the described Kubernetes object.
Target *CrossVersionObjectReferenceApplyConfiguration `json:"target,omitempty"`
// metricName is the name of the metric in question.
MetricName *string `json:"metricName,omitempty"`
// targetValue is the target value of the metric (as a quantity).
TargetValue *resource.Quantity `json:"targetValue,omitempty"`
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
// When unset, just the metricName will be used to gather metrics.
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// averageValue is the target value of the average of the
// metric across all relevant pods (as a quantity)
AverageValue *resource.Quantity `json:"averageValue,omitempty"`
}
// ObjectMetricSourceApplyConfiguration constructs a declarative configuration of the ObjectMetricSource type for use with
// apply.
func ObjectMetricSource() *ObjectMetricSourceApplyConfiguration {
return &ObjectMetricSourceApplyConfiguration{}
}
// WithTarget sets the Target 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 Target field is set to the value of the last call.
func (b *ObjectMetricSourceApplyConfiguration) WithTarget(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricSourceApplyConfiguration {
b.Target = value
return b
}
// WithMetricName sets the MetricName 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 MetricName field is set to the value of the last call.
func (b *ObjectMetricSourceApplyConfiguration) WithMetricName(value string) *ObjectMetricSourceApplyConfiguration {
b.MetricName = &value
return b
}
// WithTargetValue sets the TargetValue 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 TargetValue field is set to the value of the last call.
func (b *ObjectMetricSourceApplyConfiguration) WithTargetValue(value resource.Quantity) *ObjectMetricSourceApplyConfiguration {
b.TargetValue = &value
return b
}
// WithSelector sets the Selector 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 Selector field is set to the value of the last call.
func (b *ObjectMetricSourceApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ObjectMetricSourceApplyConfiguration {
b.Selector = value
return b
}
// WithAverageValue sets the AverageValue 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 AverageValue field is set to the value of the last call.
func (b *ObjectMetricSourceApplyConfiguration) WithAverageValue(value resource.Quantity) *ObjectMetricSourceApplyConfiguration {
b.AverageValue = &value
return b
}

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