Compare commits

...

112 Commits

Author SHA1 Message Date
Kubernetes Publisher
ad0b54ea52 Update dependencies to v0.35.6 tag 2026-06-12 13:03:09 +00:00
Kubernetes Publisher
8ebd9bb45e Merge pull request #138356 from dims/update-moby-spdystream-v0.5.1-1.35
[1.35] Update github.com/moby/spdystream from v0.5.0 to v0.5.1

Kubernetes-commit: 93828861e0b554581ba647d48efaba1ff579afa3
2026-04-14 15:19:54 +00:00
Davanum Srinivas
00b2f2b182 Update github.com/moby/spdystream from v0.5.0 to v0.5.1
Kubernetes-commit: 7e9c2c8eef26f99aa2f94d8e09d6d32de86c7769

Kubernetes-commit: 1687aa8c94e73c3a1744cb1f4498c0fbc41abe0c
2026-04-13 14:14:40 -04:00
Kubernetes Publisher
f80003c240 Merge pull request #136903 from pohly/automated-cherry-pick-of-#136455-origin-release-1.35
Automated cherry pick of #136455: fake client-go: un-deprecate NewSimpleClientset

Kubernetes-commit: a0e5f1aba53a16db2c2cd0a2cb33c60f43e4d984
2026-03-05 00:46:20 +05:30
Patrick Ohly
8b415569d9 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: bd399917375d2a1d77c04f8dfd67a67301af9721
2026-01-23 11:20:40 +01:00
Kubernetes Publisher
2d83546256 Merge remote-tracking branch 'origin/master' into release-1.35
Kubernetes-commit: b5f0a8229dd6ce88c2364257acb65d5875706b14
2025-12-05 03:34:45 +00:00
Kubernetes Publisher
56b4af2aeb 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 06:29:44 +00:00
Kubernetes Publisher
891f94c690 Merge remote-tracking branch 'origin/master' into release-1.35
Kubernetes-commit: fc0159905536cd41e3d2a3ac8fcbd905d1bc7c3f
2025-12-04 21:37:05 +00:00
Kubernetes Publisher
65ffe044e5 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:45:12 +00:00
Lukasz Szaszkiewicz
2fe4ac239c downgrade reflector watchlist fallback log to V(4)
Kubernetes-commit: 3f42ca14011e972ee439a27d47415bc7574f2317
2025-12-04 16:14:19 +01:00
Davanum Srinivas
97256a6495 Bump golang.org/x/crypto to v0.45.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 5302b929ae55e86ad40b57d74c326529792d0439
2025-12-01 14:11:01 -05:00
Kubernetes Publisher
46360b527e Merge pull request #135131 from Dev1622/sig-storage/mock-expand-flake-fix
e2e/storage: deflake CSI Mock volume expansion quota validation

Kubernetes-commit: 4c04786f746e349a34042a0d59ec432a8a46ddcc
2025-11-26 20:44:31 +00:00
Jordan Liggitt
171ef8cd00 Use transformer in consistency checker
Kubernetes-commit: 91368adbb556286942d996c60ab6cc39306415b7
2025-11-26 15:19:00 -05:00
Dev1622
3878a6464b vendor: update vendor and license metadata after replacing BeTrue usage in csi tests
Kubernetes-commit: 216aaf76cba4b0cba05f0901d759dc017f833cd3
2025-11-13 05:11:59 +00:00
Surya Dev
9cee84c27c Resolve lint restriction on BeTrue by introducing Succeed() with contextual error messages
Kubernetes-commit: cee5b837da96f16536e048905bfe5be7103b21d2
2025-11-12 22:38:33 +05:30
Kubernetes Publisher
45e0decafa Merge pull request #132919 from ndixita/pod-level-in-place-pod-resize
Pod level in place pod resize - alpha

Kubernetes-commit: 9673a7fbf1045fa2c5786ddc5aeeb65b2f957d1c
2025-11-12 16:42:49 +00:00
Surya
990057bc99 Update vendored dependencies
Kubernetes-commit: c68b35c4c75cb5d4c016799a966808dff3d9a9a5
2025-11-12 16:17:46 +00:00
ndixita
3980f079a7 Generated files from API changes
Kubernetes-commit: b8777c32633ecfb214b02073369edadd23e8e9ec
2025-10-15 18:39:35 +00:00
Heba
5020b674f8 KEP-5471: Extend tolerations operators (#134665)
* Add numeric operations to tolerations

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* code review feedback

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* add default feature gate

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add integration tests

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add toleration value validation

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add validate options for new operators

Signed-off-by: helayoty <heelayot@microsoft.com>

* Remove log

Signed-off-by: helayoty <heelayot@microsoft.com>

* Update feature gate check

Signed-off-by: helayoty <heelayot@microsoft.com>

* emove IsValidNumericString func

Signed-off-by: helayoty <heelayot@microsoft.com>

* Implement IsDecimalInteger

Signed-off-by: helayoty <heelayot@microsoft.com>

* code review feedback

Signed-off-by: helayoty <heelayot@microsoft.com>

* Add logs to v1/toleration

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
Signed-off-by: helayoty <heelayot@microsoft.com>

* Update integration tests and address code review feedback

Signed-off-by: helayoty <heelayot@microsoft.com>

* Add feature gate to the scheduler framework

Signed-off-by: helayoty <heelayot@microsoft.com>

* Remove extra test

Signed-off-by: helayoty <heelayot@microsoft.com>

* Fix integration test

Signed-off-by: helayoty <heelayot@microsoft.com>

* pass feature gate via TolerationsTolerateTaint

Signed-off-by: helayoty <heelayot@microsoft.com>

---------

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
Signed-off-by: helayoty <heelayot@microsoft.com>

Kubernetes-commit: aceb89debc2632c5c9956c8b7ef591426a485447
2025-11-11 00:32:36 +00:00
Kubernetes Publisher
6ce2c0f8c3 Merge pull request #134870 from pmengelbert/pmengelbert/kuberc/4
Add client-go credential plugin to kuberc

Kubernetes-commit: 183892b2c96aa962118ccfc2ee1c971caf72b16b
2025-11-10 04:32:36 +00:00
Kubernetes Publisher
5c322d3acd Merge pull request #134189 from mortent/NewUpdatePartitionableDevices
Updates to DRA Partitionable Devices feature

Kubernetes-commit: 0cfbf89e709e2acbc0d4cfa46954e873236c5bb9
2025-11-07 00:33:11 +00:00
Kubernetes Publisher
aa76619c41 Merge pull request #133648 from richabanker/merged-discovery
[KEP:4020] Peer-aggregated discovery

Kubernetes-commit: b214dae15d588ba9dc0bbfe8e82c82df434d89cc
2025-11-07 00:33:08 +00:00
Morten Torkildsen
99c4257e63 Run make update
Kubernetes-commit: ef3f6a250754318d7d9d94a518acccd676a47fca
2025-11-06 16:04:19 +00:00
Richa Banker
cb5e00dc36 peerproxy: Refactor into separate files and add exclusion filter
Kubernetes-commit: d6907457723a8f9a6eb5a9789424c34286d99528
2025-11-05 21:14:26 -08:00
Richa Banker
09ccc185ed discovery: Add profile-based content negotiation
Add support for 'profile=nopeer' in Accept headers to allow clients
to opt out of peer-aggregated discovery and request local-only results.

Updates discovery client to set appropriate Accept headers based on
whether peer-aggregated discovery is desired.

Part of KEP-4020: Unknown Version Interoperability Proxy

Kubernetes-commit: 6a07342d37a762230209e362d383e1fbfc325b51
2025-11-05 21:14:25 -08:00
Kubernetes Publisher
0e6fc04326 Merge pull request #134564 from macsko/gang_scheduling
KEP-4671: Add Workload API

Kubernetes-commit: 0c2aa7fee2eff82dd5e44ae30c8bcfef7a2140db
2025-11-06 12:32:56 +00:00
Peter Engelbert
c529a209c2 Add client-go credential plugin to kuberc
Remove reference to internal types in kuberc types

* Remove unserialized types from public APIs

Also remove defaulting

* Don't do conversion gen for plugin policy types

Because the plugin policy types are explicitly allowed to be empty, they
should not affect conversion. The autogenerated conversion functions for
the `Preference` type will leave those fields empty.

* Remove defaulting tests

Comments and simplifications (h/t jordan liggitt)

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>

Kubernetes-commit: fab280950dabfefabe6a8578b7a76372a9b21874
2025-10-24 16:06:33 -04:00
Maciej Skoczeń
9b2717cec1 api: Workload API and Pod WorkloadReference generated files
Kubernetes-commit: 078f462a955bb06cbf8de3e0d6fe2e190cf14e49
2025-10-10 09:44:19 +00:00
Kubernetes Publisher
6a14de8219 Merge pull request #134339 from huww98/mutable-pv-affinity
KEP-5381: mutable pv nodeAffinity

Kubernetes-commit: 326ce8b16d777edcfb3c19c2118ec2860945d4e1
2025-11-06 12:32:54 +00:00
Kubernetes Publisher
b36e6498c1 Merge pull request #134180 from p0lyn0mial/upstream-watchlist-dynamic-interface
Promote/Enable WatchListClient feature for release 1.35

Kubernetes-commit: 099ef07c9f90a7650b5a06f58fa7005d9c760761
2025-11-06 12:32:52 +00:00
Kubernetes Publisher
823f3a75f4 Merge pull request #133389 from pravk03/node-capabilities
Introduce node declared features framework

Kubernetes-commit: b869afe68d5ffb1f74ab584653451efc811698d7
2025-11-06 12:32:51 +00:00
Lukasz Szaszkiewicz
092b2fb360 client-go/features: enable WatchListClient for 1.35 release
Kubernetes-commit: ca8847149e3e19444ffec878f0002f5f9edef566
2025-11-03 20:33:48 +01:00
Praveen Krishna
d0f0666dd2 autogenerated files from "make update"
Kubernetes-commit: 3c22291a4b0bb2407630d4fa112256aae16398a6
2025-11-01 00:07:52 +00:00
Kubernetes Publisher
7d09f53b04 Merge pull request #135072 from Jefftree/graceful-queue
Gracefully shutdown typed queue

Kubernetes-commit: 26a2945d5de6c1dc0426aebe1ad36a32963aeb39
2025-11-05 16:33:11 +00:00
Kubernetes Publisher
5aa3ca7f2a Merge pull request #134152 from pohly/dra-device-taints-1.35
DRA: device taints: new ResourceSlice API, new features

Kubernetes-commit: c1a6a3ca71a88a3d43580b2ffce6966c58f8bd56
2025-11-05 00:32:30 +00:00
Kubernetes Publisher
afcd76c2c0 Merge pull request #135080 from dejanzele/feat/promote-job-managedby-to-ga
KEP-4368: Job Managed By; Promote to GA

Kubernetes-commit: 97cb47a91330db13d05e8674ce2a80ace19e4d99
2025-11-05 00:32:28 +00:00
Kubernetes Publisher
50efa83a3d Merge pull request #134624 from yt2985/podcertificates-beta
Promote Pod Certificates feature to beta

Kubernetes-commit: a058cf788a214b25c42173a6d7df8e77b26e2b1b
2025-11-05 00:32:26 +00:00
Kubernetes Publisher
205531f8d5 Merge pull request #132240 from yue9944882/delta-fifo-batch
Adding batch handling for popping items from RealFIFO

Kubernetes-commit: 645073f978ed0d7308ad3be453a36a8e99006b3c
2025-11-04 11:42:05 -08:00
Jefftree
773743c372 refactor updateUnfinishedWork into separate function to use defer unlock
Kubernetes-commit: f1bd4f509ebb2f9d02971c2dff85d5933eb074df
2025-11-04 15:27:53 +00:00
Dejan Zele Pejchev
15b762b95c KEP-4368: Job Managed By; Promote to GA
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>

Kubernetes-commit: 3dabd4417d941d28e63c96c80d03ae2db1895838
2025-11-03 23:28:13 +01:00
Jefftree
1463bcbba2 Fix queue to gracefully shutdown
Kubernetes-commit: bdb2e37781aec3bfec477a7beddd9fa5ac4eab1b
2025-11-03 19:04:11 +00:00
Patrick Ohly
c94930065a generated files
Kubernetes-commit: 75c9186792811a5b4bc38a5171283e2f58a718a0
2025-10-28 21:20:34 +01:00
Min Jin
d5cd2dd65f Adding batch handling for popping items from RealFIFO
Signed-off-by: Min Jin <minkimzz@amazon.com>

Update staging/src/k8s.io/client-go/tools/cache/the_real_fifo.go

optimizing fifo loop

Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
Signed-off-by: Min Jin <minkimzz@amazon.com>

refactoring PopBatch to accept []Delta

Signed-off-by: Min Jin <minkimzz@amazon.com>

Kubernetes-commit: 611b4c1408f529de4d4e94e6dd33be2ed1df9276
2025-10-24 18:07:32 -07:00
Kubernetes Publisher
6f5c1adc65 Merge pull request #134934 from siyuanfoundation/client-fg
change client go default features to versioned

Kubernetes-commit: ec0f275e90127d8dc3fafaf231ff882bd4ced0c8
2025-11-03 19:43:27 +00:00
Kubernetes Publisher
4f9edc15a7 Merge pull request #134881 from pohly/e2e-slow-priority
E2E: run slow tests first, using new Ginkgo

Kubernetes-commit: cd0ddec139502081c2edf73c0329bcc07b5048f4
2025-11-01 15:25:50 +00:00
Siyuan Zhang
504fb21b89 change client go default features to versioned
so that their enablement can be consistent with emulated version.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: d4c6e0bfd04a9efb1ddb33afdcaa49eb8695d8e5
2025-10-31 10:04:06 -05:00
Patrick Ohly
47df0318fc dependencies: ginkgo v2.27.2, gomega v1.38.2
Specifically the new AddTreeConstructionNodeArgsTransformer and SpecPriority in
Ginkgo will be useful.

Gomega gets updated to keep up-to-date.

Kubernetes-commit: 6034321603be95409028f0173e0c372515008dbb
2025-10-24 20:53:04 +02:00
Kubernetes Publisher
efdec3e7ce Merge pull request #135004 from pohly/dependencies-x-repos
dependencies: various minor updates

Kubernetes-commit: 02398258b15ff894a7c73acdeb9270b32f6d02a9
2025-10-31 15:25:58 +00:00
Kubernetes Publisher
083e82ae0c Merge pull request #134811 from p0lyn0mial/upstream-watchlist-unsupported-wl-cache-testing
client-go/tools/cache/test: wrap the LW with toListWatcherWithUnSupportedWatchListSemantics

Kubernetes-commit: ad13a96a1fa97c5516ab198df738e6ca13ee4290
2025-10-31 15:25:54 +00:00
Kubernetes Publisher
a90a9150bc Merge pull request #135002 from p0lyn0mial/upstream-watchlist-unsupported-wl-client-tools-watch-test
client-go/tools/watch/test: wrap the LW with toListWatcherWithUnSupportedWatchListSemantics

Kubernetes-commit: f1989437f8b4c7725e8c603d6c29693b89298f37
2025-10-31 15:25:53 +00:00
Kubernetes Publisher
7198405576 Merge pull request #135000 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-trackers
k8s.io/client-go/testing/fixture: does not support WatchList semantics

Kubernetes-commit: e23dbe1f6ed042e30c166d1106b1baab3cc50d60
2025-10-31 11:26:00 +00:00
Patrick Ohly
47c3af08fa dependencies: various minor updates
This is a collection of updating several unversioned modules. Those updates are
eventually going to reach Kubernetes, doing them together now makes PRs for
future major updates smaller.

Kubernetes-commit: 5993782d6537bab9edf95590c123f96ea39ca185
2025-10-31 11:30:26 +01:00
Lukasz Szaszkiewicz
928c08fb07 k8s.io/client-go/testing/fixture: does not support WatchList semantics
Kubernetes-commit: 1055d8541e62322dab37858fb8798a1881acdd2f
2025-10-30 15:05:45 +01:00
Kubernetes Publisher
63b5f59425 Merge pull request #134919 from p0lyn0mial/upstream-watchlist-unsupported-wl-wrapp-remaining-lws
watchlist: wrap remaining LW with ToListWatcherWithWatchListSemantics

Kubernetes-commit: 6eee830d4fa0cdb7d75dac4b3b4d22d639dce54b
2025-10-30 15:26:24 +00:00
Kubernetes Publisher
c207d22130 Merge pull request #134854 from serathius/informer-benchmark
Benchmark SharedIndexInformer

Kubernetes-commit: ab39c8be5543ec83a2aedcab64a259bb1bd6f120
2025-10-30 15:26:23 +00:00
Kubernetes Publisher
d9e3e97bc8 Merge pull request #134784 from michaelasp/svm_beta2
SVM: bump the API to beta, remove unused fields

Kubernetes-commit: 3ec2d82da57f2018fc76ae13da7a23a3f9a364f5
2025-10-29 23:24:40 +00:00
Michael Aspinwall
7aa71710ca Update SVM to Beta
Co-authored-by: Stanislav Láznička <stlaz.devel@proton.me>

Kubernetes-commit: 3b72759d1bcfe0820b27909110f6ab6a6cc99034
2025-10-29 19:34:32 +00:00
Kubernetes Publisher
cd96252d84 Merge pull request #133087 from atiratree/terminating-replicas-beta
promote DeploymentReplicaSetTerminatingReplicas to Beta

Kubernetes-commit: f051670a473d8583af3397795938d37ca4ebf637
2025-10-27 15:24:46 +00:00
Kubernetes Publisher
342dcaf481 Merge pull request #134748 from p0lyn0mial/upstream-watchlist-unsupported-wl-clients-improve-units
client-go/clients: improve TestWatchListSemanticsSimple

Kubernetes-commit: a7b67429400f08a7f43892d303273be06b70b17f
2025-10-27 11:24:28 +00:00
Kubernetes Publisher
91dcaf4e5c Merge pull request #134826 from aramase/aramase/f/kep_5538_beta_impl
CSI driver opt-in for service account tokens via secrets field

Kubernetes-commit: 1135d04f1d7746b553a675a558efc58e651eabae
2025-10-24 23:24:40 +00:00
Marek Siarkowicz
5ac9ec00af Benchmark SharedIndexInformer
Kubernetes-commit: 7a9d718cdf5e26f83ce45cd5b24f06ef7e678bea
2025-10-22 16:22:40 +02:00
Lukasz Szaszkiewicz
42503cca34 client-go/clients: improve TestWatchListSemanticsSimple
Kubernetes-commit: 6b82a823b1a91e727d510b2eeab8765f942ad449
2025-10-21 16:25:07 +02:00
胡玮文
f8b7fe98c4 mention MutablePVNodeAffinity in the API doc
Kubernetes-commit: 78a8c2e6a35b5621a7afa9066770a819d417f707
2025-10-20 21:22:02 +08:00
Anish Ramasekar
75128a8d3d Add CSI driver opt-in for service account tokens via secrets field
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 30a6d4b389a6c6b10c5bd136216b47e55da3f18a
2025-10-13 14:16:44 -05:00
Kubernetes Publisher
4953849642 Merge pull request #134457 from danwinship/prefersamenode
KEP-3015: update PreferSameTrafficDistribution to GA

Kubernetes-commit: 6652c9fadf4fa2febdca4a856a0340086236f9e5
2025-10-23 23:24:37 +00:00
Kubernetes Publisher
715199a180 Merge pull request #134780 from joshjms/bump-etcd-sdk-v3.6.5
etcd: Bump etcd sdk to v3.6.5

Kubernetes-commit: 4415f00294cff245a9594055aed29abcd4e4a0c1
2025-10-22 23:25:04 +00:00
joshjms
dc0763eaa2 etcd: bump etcd sdk to v3.6.5
Signed-off-by: joshjms <joshjms1607@gmail.com>

Kubernetes-commit: 7f99d6672f75d9f757953745bdabf598139b4c30
2025-10-22 21:36:06 +08:00
Kubernetes Publisher
a5b1b112d9 Merge pull request #134463 from cvan20191/fix-resizepolicy-ephemeral-container-docs
Fix resizepolicy ephemeral container docs

Kubernetes-commit: 2db2d7b1b54df27e591b5b50b3707d907d8afd9b
2025-10-21 23:24:29 +00:00
Kubernetes Publisher
ff1ce9e245 Merge pull request #132243 from xigang/real_fifo
Add RealFIFOOptions struct to provide structured configuration for RealFIFO

Kubernetes-commit: a4f14e57f4850541937659dc1cbfc1a5e5efaebf
2025-10-21 19:24:23 +00:00
Kubernetes Publisher
f49b36f94e Merge pull request #134731 from tisonkun/patch-1
Fix comments and reformat import statements

Kubernetes-commit: 0eb5db7dbe49c077fb8f7e4448adfb829062a778
2025-10-21 19:24:22 +00:00
Kubernetes Publisher
659efe6ca2 Merge pull request #134714 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-typed-inf
client-go/typed/informers: wrap the LW with WatchList semantics

Kubernetes-commit: 350481c4747da5c2ad4f24e71e7edaabbd4cfe2e
2025-10-21 15:25:16 +00:00
Kubernetes Publisher
002cac449e Merge pull request #134674 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-meta-inf
client-go/metadata/metadatainformer: wrap the LW with WatchList semantics

Kubernetes-commit: 183e01c6f2098710540bcc9cfa40bc8055eb31a6
2025-10-20 16:51:37 +00:00
Kubernetes Publisher
716ba150d1 Merge pull request #134670 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-dynamic-inf
client-go/dynamic/dynamicinformer: wrap the LW with WatchList semantics

Kubernetes-commit: 0d685e659293b9d242916d631c5b6e72011d5355
2025-10-20 16:51:36 +00:00
tison
d707fb729f Fix comments and reformat import statements
Kubernetes-commit: f3d1fd23c576f4691a336444496ab7e6c619624c
2025-10-20 21:55:12 +08:00
Lukasz Szaszkiewicz
e7ebdf6180 client-go/kubernetes_test/clientset_test: intro TestUnSupportWatchListSemantics
Kubernetes-commit: f8868e9cace5903b425425605e4946817dd11770
2025-10-17 14:43:53 +02:00
Lukasz Szaszkiewicz
e8a837163e ./hack/update-codegen.sh
Kubernetes-commit: 5594d94e6716599981948d21599700d6dfe43b11
2025-10-17 14:35:36 +02:00
Lukasz Szaszkiewicz
fed267b819 client-go/metadata/metadatainformer: wrap the LW with WatchList semantics
Kubernetes-commit: 78fcb4475f4f1ff2d31830c057e8dcb45a1de128
2025-10-17 14:06:47 +02:00
Lukasz Szaszkiewicz
c1675fba6d client-go/dynamic/dynamicinformer: wrap the LW with WatchList semantics
Kubernetes-commit: 8f2d7581eb1457f78c6b0b83bda532b902d5f018
2025-10-17 10:56:26 +02:00
Kubernetes Publisher
8316c2dd5b Merge pull request #134641 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-reflector
client-go/tools/cache/reflector: supports watchlist.DoesClientNotSupportWatchListSemantics

Kubernetes-commit: e64ed3d8ba86d0d6dc27c80710fc1570a9478f67
2025-10-17 12:54:07 +00:00
Kubernetes Publisher
884e76ff50 Merge pull request #134663 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-typed
client-go/typed/fake: expose IsWatchListSemanticsUnSupported

Kubernetes-commit: f794aa12d78f5b1f9579ce8a991a116a99a2c43c
2025-10-17 08:49:31 +00:00
Christian Van
909047f6b3 docs: EphemeralContainerCommon.ResizePolicy: This field cannot be set on ephemeral containers
Kubernetes-commit: b95439f6d1a6a16e9dcda9c71db10596b3c0c0ea
2025-10-16 22:23:26 -04:00
Kubernetes Publisher
6661e485ec Merge pull request #134646 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-meta
client-go/metadata/fake: expose IsWatchListSemanticsUnSupported

Kubernetes-commit: c699725502689f177b3ba166107550891b110c31
2025-10-17 00:45:18 +00:00
Kubernetes Publisher
c655edb878 Merge pull request #133153 from helayoty/helayoty/enable-beta-maxUnavailable
Update MaxUnavailableStatefulSet feature gate to beta

Kubernetes-commit: 7af016ec317ef4b55b73cfb372ed8021495c5988
2025-10-16 20:51:54 +00:00
Kubernetes Publisher
5a42d726bf Merge pull request #133128 from jm-franc/set-gate-to-beta
Promote HPAConfigurableTolerance gate to beta

Kubernetes-commit: 50e3cb3f583c6eb5d84e7f4f752a628839045657
2025-10-16 20:51:52 +00:00
Lukasz Szaszkiewicz
943d406efe ./hack/update-codegen.sh
Kubernetes-commit: d15b2893341854ce69e58c18f0899e9c0cf61f33
2025-10-16 22:40:29 +02:00
Lukasz Szaszkiewicz
92bae31190 client-go/kubernetes_test/fake_client_test: TestDoesClientSupportWatchListSemantics
Kubernetes-commit: 4d9fcfeeca86f274ad1885774ea4370e33d5ac77
2025-10-16 22:34:32 +02:00
Kubernetes Publisher
fcb9549cdf Merge pull request #134642 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-dynamic
client-go/dynamic/fake: does not support WatchList semantics

Kubernetes-commit: f6c629ecd26f67c0166f6f5a685f01ca4dda1271
2025-10-16 06:38:05 -07:00
Lukasz Szaszkiewicz
55359a6c61 client-go/dynamic/fake: expose IsWatchListSemanticsUnSupported
Kubernetes-commit: 82e516200a4afaa33e87aa2efedaa07430f2dd7f
2025-10-16 12:10:10 +02:00
Kubernetes Publisher
3a250ce40f Merge pull request #134505 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics-reflector-listwatch
client-go/tools/cache/listwatch: intro ToListWatcherWithWatchListSemantics

Kubernetes-commit: 3828756d90cf28e0ab5e0ccd550041b70c642b91
2025-10-16 12:44:03 +00:00
Kubernetes Publisher
f217e7096a Merge pull request #134588 from liggitt/fixes-only-no-go-bump
go 1.25.2/1.24.8 related fixes

Kubernetes-commit: f7fb7cd86b6db5531087b4ae3b1e8198af3c927e
2025-10-14 16:10:20 +00:00
Lukasz Szaszkiewicz
6777feb020 client-go/tools/cache/listwatch: intro ToListWatcherWithWatchListSemantics
returns a ListerWatcher that knows whether the provided client explicitly
does NOT support the WatchList semantics. This allows Reflectors
to adapt their behavior based on client capabilities.

Kubernetes-commit: 3b93755c0c07ce898f1c2a3924adef6c3143f247
2025-10-12 00:29:31 +02:00
Lukasz Szaszkiewicz
9c67f4c479 watchlist: wrap remaining LW with ToListWatcherWithWatchListSemantics
Kubernetes-commit: 4fd41778b87a7a02066566cc12e3eb4a87a071ee
2025-10-10 22:44:45 +02:00
Jordan Liggitt
69ba058bc8 Remove invalid SAN certificate construction
Kubernetes-commit: 39d37a1e92672bcbba8bfbd4166b409bdea9a099
2025-10-09 16:27:05 -04:00
Kubernetes Publisher
8de342516c Merge pull request #134396 from p0lyn0mial/upstream-watchlist-unsupported-wl-semantics
client-go/util/watchlist/watch_list: intro DoesClientNotSupportWatchListSemantics

Kubernetes-commit: b6d7517d2a27a5cf4ca85c19fde88a3a3efc3e6e
2025-10-09 13:28:34 +00:00
Kubernetes Publisher
efcdcf7828 Merge pull request #134256 from liggitt/protoc-gogo-poc
KEP-5589 - drop gogo runtime dependencies

Kubernetes-commit: 6bc4914b841f5bf032490cf105f57dc5bfe475ba
2025-10-08 21:28:35 +00:00
Dan Winship
0ca6027179 Belatedly remove references to PreferSameTrafficDistribution being Alpha
Kubernetes-commit: b13564a63c36c9d5f0a8ef7ab6467dc3a9fa0017
2025-10-04 08:31:57 -04:00
Heba Elayoty
1ec59ffa19 update comments
Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

Kubernetes-commit: fe681cfd8f61ef318c1c1b2c10e1daf16f806e8d
2025-09-29 14:10:26 -07:00
Lukasz Szaszkiewicz
83eab51fe2 client-go/tools/watch/test: wrap the LW with toListWatcherWithUnSupportedWatchListSemantics
Kubernetes-commit: 9e462123d6495f6f7ed6e0a7c40c2ddf04ba10fc
2025-09-29 13:59:40 +02:00
Lukasz Szaszkiewicz
cc2ef1778d client-go/metadata/fake: expose IsWatchListSemanticsUnSupported
Kubernetes-commit: 8324fc3e0343e1c6134f3e83be2d77d9556a496c
2025-09-25 23:28:07 +02:00
Lukasz Szaszkiewicz
03859f4bad client-go/util/watchlist/watch_list: intro DoesClientNotSupportWatchListSemantics
Kubernetes-commit: 4b3e562dc8c19f7005cc0d50cbf54101e5b8f796
2025-09-25 20:39:12 +02:00
Lukasz Szaszkiewicz
3502696346 client-go/tools/cache/reflector: supports watchlist.DoesClientNotSupportWatchListSemantics
Kubernetes-commit: 4bb2bd05322e127658e55a06995c021b3c5fbc41
2025-09-25 15:36:17 +02:00
Jordan Liggitt
d21f567e5b Regenerate vendor
Kubernetes-commit: 7f58bb9abdf23c37e5e201054db5adab6eee60cd
2025-09-24 23:37:55 -04:00
Jean-Marc François
0d522470d7 Promote HPAConfigurableTolerance gate to beta
Kubernetes-commit: c1e74a1a9822da88e2e77b7726b6e80db54a5fcb
2025-09-23 17:51:30 -04:00
Lukasz Szaszkiewicz
562096cc40 k8s.io/client-go/tools/cache/test: wrap the LW with toListWatcherWithUnSupportedWatchListSemantics
Kubernetes-commit: ae201951a8a39316d4154a07592f464293764a83
2025-09-20 22:57:14 +02:00
Patrick Ohly
1244da43b1 DRA API: device taints 1.35
This raises the number of allowed taints per device to 16 by lowering
the number of allowed devices to 64 per ResourceSlice if (and only if!)
taints are used.

"effect: None" and DeviceTaintRule status with conditions get added
to support giving feedback to admins.

Instead of merely adding the new effect value, this also changes validation of
the enum so that unknown values are valid if they were already stored. This
will simplify adding new effects in the future because validation won't fail
for them after a downgrade. Consumers must treat them like this new None
effect, i.e. ignore them.

Kubernetes-commit: fee14ffca2099b2d7a0bfc5761691b363eac4de1
2025-09-18 19:44:06 +02:00
Heba Elayoty
b6a9154664 update comments on beta apis
Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

Kubernetes-commit: 83163d0b4a9ff49c50d84634a529d2dc3e7b143d
2025-09-18 04:47:05 -07:00
tinatingyu
15ed51a4ca Promote PodCertificateRequests to v1beta1
Kubernetes-commit: 59e075e8d35dbc16c5db7c302f3836f3f9a144f8
2025-09-16 20:24:07 +00:00
Valerian Roche
7cf6a05732 Add unit tests for Data Consistency Detector
Kubernetes-commit: 76da8d6de027a4bf62601d45b8d72f8fa627ab5c
2025-07-28 13:53:34 -04:00
Valerian Roche
f466f58eea [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
Heba Elayoty
638e636503 Update MaxUnavailableStatefulSet feature gate to beta
Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

Kubernetes-commit: b656027b9363c4c6dbf4fa634a71d355abd99345
2025-07-23 10:52:55 -07:00
Filip Křepinský
400c0a2602 make update
Kubernetes-commit: 2bf467170e737faa33ba739ee05e6359768a807e
2025-07-20 23:22:21 +02:00
xigang
00a491e0ce Add RealFIFOOptions struct to provide structured configuration for RealFIFO
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: 26bbea8c07131080f763c4ccc1eda5daa66803a6
2025-06-12 08:19:21 +08:00
299 changed files with 5241 additions and 1450 deletions

View File

@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// Represents the latest available observations of a deployment's current state.
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`

View File

@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
// and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

View File

@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
// The maximum number of pods that can be unavailable during the update.
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
// Absolute number is calculated from percentage by rounding up. This can not be 0.
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
// will be counted towards MaxUnavailable.
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

View File

@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// Represents the latest available observations of a deployment's current state.
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`

View File

@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
// maxUnavailable is the maximum number of pods that can be unavailable during the update.
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
// Absolute number is calculated from percentage by rounding up. This can not be 0.
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
// will be counted towards MaxUnavailable.
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

View File

@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// Represents the latest available observations of a deployment's current state.
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`

View File

@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
// and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

View File

@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
// The maximum number of pods that can be unavailable during the update.
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
// Absolute number is calculated from percentage by rounding up. This can not be 0.
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
// will be counted towards MaxUnavailable.
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

View File

@@ -37,7 +37,7 @@ import (
//
// The tolerance is applied to the metric values and prevents scaling too
// eagerly for small metric variations. (Note that setting a tolerance requires
// enabling the alpha HPAConfigurableTolerance feature gate.)
// the beta HPAConfigurableTolerance feature gate to be enabled.)
type HPAScalingRulesApplyConfiguration struct {
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
// considered while scaling up or scaling down.
@@ -63,8 +63,8 @@ type HPAScalingRulesApplyConfiguration struct {
// and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be
// triggered when the actual consumption falls below 95Mi or exceeds 101Mi.
//
// This is an alpha field and requires enabling the HPAConfigurableTolerance
// feature gate.
// This is an beta field and requires the HPAConfigurableTolerance feature
// gate to be enabled.
Tolerance *resource.Quantity `json:"tolerance,omitempty"`
}

View File

@@ -159,9 +159,6 @@ type JobSpecApplyConfiguration struct {
// by RFC 1123. All characters trailing the first "/" must be valid HTTP Path
// characters as defined by RFC 3986. The value cannot exceed 63 characters.
// This field is immutable.
//
// This field is beta-level. The job controller accepts setting the field
// when the feature gate JobManagedBy is enabled (enabled by default).
ManagedBy *string `json:"managedBy,omitempty"`
}

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -51,7 +51,7 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("PodCertificateRequest")
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
b.WithAPIVersion("certificates.k8s.io/v1beta1")
return b
}
@@ -62,9 +62,9 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo
// ExtractPodCertificateRequestFrom 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 ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
b := &PodCertificateRequestApplyConfiguration{}
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource)
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.PodCertificateRequest"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
@@ -72,7 +72,7 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha
b.WithNamespace(podCertificateRequest.Namespace)
b.WithKind("PodCertificateRequest")
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
b.WithAPIVersion("certificates.k8s.io/v1beta1")
return b, nil
}
@@ -86,13 +86,13 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha
// ExtractPodCertificateRequest 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 ExtractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
func ExtractPodCertificateRequest(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "")
}
// ExtractPodCertificateRequestStatus extracts the applied configuration owned by fieldManager from
// podCertificateRequest for the status subresource.
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "status")
}

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
types "k8s.io/apimachinery/pkg/types"
@@ -96,6 +96,17 @@ type PodCertificateRequestSpecApplyConfiguration struct {
// [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by
// the golang library crypto/ed25519.Sign).
ProofOfPossession []byte `json:"proofOfPossession,omitempty"`
// unverifiedUserAnnotations allow pod authors to pass additional information to
// the signer implementation. Kubernetes does not restrict or validate this
// metadata in any way.
//
// Entries are subject to the same validation as object metadata annotations,
// with the addition that all keys must be domain-prefixed. No restrictions
// are placed on values, except an overall size limitation on the entire field.
//
// Signers should document the keys and values they support. Signers should
// deny requests that contain keys they do not recognize.
UnverifiedUserAnnotations map[string]string `json:"unverifiedUserAnnotations,omitempty"`
}
// PodCertificateRequestSpecApplyConfiguration constructs a declarative configuration of the PodCertificateRequestSpec type for use with
@@ -187,3 +198,17 @@ func (b *PodCertificateRequestSpecApplyConfiguration) WithProofOfPossession(valu
}
return b
}
// WithUnverifiedUserAnnotations puts the entries into the UnverifiedUserAnnotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the UnverifiedUserAnnotations field,
// overwriting an existing map entries in UnverifiedUserAnnotations field with the same key.
func (b *PodCertificateRequestSpecApplyConfiguration) WithUnverifiedUserAnnotations(entries map[string]string) *PodCertificateRequestSpecApplyConfiguration {
if b.UnverifiedUserAnnotations == nil && len(entries) > 0 {
b.UnverifiedUserAnnotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.UnverifiedUserAnnotations[k] = v
}
return b
}

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@@ -82,6 +82,7 @@ type ContainerApplyConfiguration struct {
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
// Resources resize policy for the container.
// This field cannot be set on ephemeral containers.
ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"`
// RestartPolicy defines the restart behavior of individual containers in a pod.
// This overrides the pod-level restart policy. When this field is not specified,

View File

@@ -68,6 +68,8 @@ type NodeStatusApplyConfiguration struct {
RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"`
// Features describes the set of features implemented by the CRI implementation.
Features *NodeFeaturesApplyConfiguration `json:"features,omitempty"`
// DeclaredFeatures represents the features related to feature gates that are declared by the node.
DeclaredFeatures []string `json:"declaredFeatures,omitempty"`
}
// NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with
@@ -206,3 +208,13 @@ func (b *NodeStatusApplyConfiguration) WithFeatures(value *NodeFeaturesApplyConf
b.Features = value
return b
}
// WithDeclaredFeatures adds the given value to the DeclaredFeatures 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 DeclaredFeatures field.
func (b *NodeStatusApplyConfiguration) WithDeclaredFeatures(values ...string) *NodeStatusApplyConfiguration {
for i := range values {
b.DeclaredFeatures = append(b.DeclaredFeatures, values[i])
}
return b
}

View File

@@ -58,6 +58,7 @@ type PersistentVolumeSpecApplyConfiguration struct {
VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"`
// nodeAffinity defines constraints that limit what nodes this volume can be accessed from.
// This field influences the scheduling of pods that use this volume.
// This field is mutable if MutablePVNodeAffinity feature gate is enabled.
NodeAffinity *VolumeNodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"`
// Name of VolumeAttributesClass to which this persistent volume belongs. Empty value
// is not allowed. When this field is not set, it indicates that this volume does not belong to any

View File

@@ -75,6 +75,20 @@ type PodCertificateProjectionApplyConfiguration struct {
// and leaf certificate are consistent, because it is possible to read the
// files mid-rotation.
CertificateChainPath *string `json:"certificateChainPath,omitempty"`
// userAnnotations allow pod authors to pass additional information to
// the signer implementation. Kubernetes does not restrict or validate this
// metadata in any way.
//
// These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of
// the PodCertificateRequest objects that Kubelet creates.
//
// Entries are subject to the same validation as object metadata annotations,
// with the addition that all keys must be domain-prefixed. No restrictions
// are placed on values, except an overall size limitation on the entire field.
//
// Signers should document the keys and values they support. Signers should
// deny requests that contain keys they do not recognize.
UserAnnotations map[string]string `json:"userAnnotations,omitempty"`
}
// PodCertificateProjectionApplyConfiguration constructs a declarative configuration of the PodCertificateProjection type for use with
@@ -130,3 +144,17 @@ func (b *PodCertificateProjectionApplyConfiguration) WithCertificateChainPath(va
b.CertificateChainPath = &value
return b
}
// WithUserAnnotations puts the entries into the UserAnnotations 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 UserAnnotations field,
// overwriting an existing map entries in UserAnnotations field with the same key.
func (b *PodCertificateProjectionApplyConfiguration) WithUserAnnotations(entries map[string]string) *PodCertificateProjectionApplyConfiguration {
if b.UserAnnotations == nil && len(entries) > 0 {
b.UserAnnotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.UserAnnotations[k] = v
}
return b
}

View File

@@ -273,6 +273,14 @@ type PodSpecApplyConfiguration struct {
// This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters.
// Requires the HostnameOverride feature gate to be enabled.
HostnameOverride *string `json:"hostnameOverride,omitempty"`
// WorkloadRef provides a reference to the Workload object that this Pod belongs to.
// This field is used by the scheduler to identify the PodGroup and apply the
// correct group scheduling policies. The Workload object referenced
// by this field may not exist at the time the Pod is created.
// This field is immutable, but a Workload object with the same name
// may be recreated with different policies. Doing this during pod scheduling
// may result in the placement not conforming to the expected policies.
WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"`
}
// PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with
@@ -669,3 +677,11 @@ func (b *PodSpecApplyConfiguration) WithHostnameOverride(value string) *PodSpecA
b.HostnameOverride = &value
return b
}
// WithWorkloadRef sets the WorkloadRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the WorkloadRef field is set to the value of the last call.
func (b *PodSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *PodSpecApplyConfiguration {
b.WorkloadRef = value
return b
}

View File

@@ -131,6 +131,14 @@ type PodStatusApplyConfiguration struct {
ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
// Status of extended resource claim backed by DRA.
ExtendedResourceClaimStatus *PodExtendedResourceClaimStatusApplyConfiguration `json:"extendedResourceClaimStatus,omitempty"`
// AllocatedResources is the total requests allocated for this pod by the node.
// If pod-level requests are not set, this will be the total requests aggregated
// across containers in the pod.
AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"`
// Resources represents the compute resource requests and limits that have been
// applied at the pod level if pod-level requests or limits are set in
// PodSpec.Resources
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
}
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with
@@ -317,3 +325,19 @@ func (b *PodStatusApplyConfiguration) WithExtendedResourceClaimStatus(value *Pod
b.ExtendedResourceClaimStatus = value
return b
}
// WithAllocatedResources sets the AllocatedResources 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 AllocatedResources field is set to the value of the last call.
func (b *PodStatusApplyConfiguration) WithAllocatedResources(value corev1.ResourceList) *PodStatusApplyConfiguration {
b.AllocatedResources = &value
return b
}
// WithResources sets the Resources 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 Resources field is set to the value of the last call.
func (b *PodStatusApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *PodStatusApplyConfiguration {
b.Resources = value
return b
}

View File

@@ -32,9 +32,10 @@ type TolerationApplyConfiguration struct {
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
Key *string `json:"key,omitempty"`
// Operator represents a key's relationship to the value.
// Valid operators are Exists and Equal. Defaults to Equal.
// Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
// Exists is equivalent to wildcard for value, so that a pod can
// tolerate all taints of a particular category.
// Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
Operator *corev1.TolerationOperator `json:"operator,omitempty"`
// Value is the taint value the toleration matches to.
// If the operator is Exists, the value should be empty, otherwise just a regular string.

View File

@@ -0,0 +1,74 @@
/*
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
// WorkloadReferenceApplyConfiguration represents a declarative configuration of the WorkloadReference type for use
// with apply.
//
// WorkloadReference identifies the Workload object and PodGroup membership
// that a Pod belongs to. The scheduler uses this information to apply
// workload-aware scheduling semantics.
type WorkloadReferenceApplyConfiguration struct {
// Name defines the name of the Workload object this Pod belongs to.
// Workload must be in the same namespace as the Pod.
// If it doesn't match any existing Workload, the Pod will remain unschedulable
// until a Workload object is created and observed by the kube-scheduler.
// It must be a DNS subdomain.
Name *string `json:"name,omitempty"`
// PodGroup is the name of the PodGroup within the Workload that this Pod
// belongs to. If it doesn't match any existing PodGroup within the Workload,
// the Pod will remain unschedulable until the Workload object is recreated
// and observed by the kube-scheduler. It must be a DNS label.
PodGroup *string `json:"podGroup,omitempty"`
// PodGroupReplicaKey specifies the replica key of the PodGroup to which this
// Pod belongs. It is used to distinguish pods belonging to different replicas
// of the same pod group. The pod group policy is applied separately to each replica.
// When set, it must be a DNS label.
PodGroupReplicaKey *string `json:"podGroupReplicaKey,omitempty"`
}
// WorkloadReferenceApplyConfiguration constructs a declarative configuration of the WorkloadReference type for use with
// apply.
func WorkloadReference() *WorkloadReferenceApplyConfiguration {
return &WorkloadReferenceApplyConfiguration{}
}
// 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 *WorkloadReferenceApplyConfiguration) WithName(value string) *WorkloadReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithPodGroup sets the PodGroup 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 PodGroup field is set to the value of the last call.
func (b *WorkloadReferenceApplyConfiguration) WithPodGroup(value string) *WorkloadReferenceApplyConfiguration {
b.PodGroup = &value
return b
}
// WithPodGroupReplicaKey sets the PodGroupReplicaKey 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 PodGroupReplicaKey field is set to the value of the last call.
func (b *WorkloadReferenceApplyConfiguration) WithPodGroupReplicaKey(value string) *WorkloadReferenceApplyConfiguration {
b.PodGroupReplicaKey = &value
return b
}

View File

@@ -28,8 +28,6 @@ type EndpointHintsApplyConfiguration struct {
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
// forNodes indicates the node(s) this endpoint should be consumed by when
// using topology aware routing. May contain a maximum of 8 entries.
// This is an Alpha feature and is only used when the PreferSameTrafficDistribution
// feature gate is enabled.
ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"`
}

View File

@@ -28,8 +28,6 @@ type EndpointHintsApplyConfiguration struct {
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
// forNodes indicates the node(s) this endpoint should be consumed by when
// using topology aware routing. May contain a maximum of 8 entries.
// This is an Alpha feature and is only used when the PreferSameTrafficDistribution
// feature gate is enabled.
ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"`
}

View File

@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// Represents the latest available observations of a deployment's current state.
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`

View File

@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
// and have not yet reached the Failed or Succeeded .status.phase.
//
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

View File

@@ -4458,91 +4458,6 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: string
default: ""
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequest
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec
default: {}
- name: status
type:
namedType: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
default: {}
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec
map:
fields:
- name: maxExpirationSeconds
type:
scalar: numeric
default: 86400
- name: nodeName
type:
scalar: string
default: ""
- name: nodeUID
type:
scalar: string
default: ""
- name: pkixPublicKey
type:
scalar: string
- name: podName
type:
scalar: string
default: ""
- name: podUID
type:
scalar: string
default: ""
- name: proofOfPossession
type:
scalar: string
- name: serviceAccountName
type:
scalar: string
default: ""
- name: serviceAccountUID
type:
scalar: string
default: ""
- name: signerName
type:
scalar: string
default: ""
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
map:
fields:
- name: beginRefreshAt
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: certificateChain
type:
scalar: string
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: notAfter
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: notBefore
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest
map:
fields:
@@ -4666,6 +4581,96 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: string
default: ""
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequest
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.certificates.v1beta1.PodCertificateRequestSpec
default: {}
- name: status
type:
namedType: io.k8s.api.certificates.v1beta1.PodCertificateRequestStatus
default: {}
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequestSpec
map:
fields:
- name: maxExpirationSeconds
type:
scalar: numeric
default: 86400
- name: nodeName
type:
scalar: string
default: ""
- name: nodeUID
type:
scalar: string
default: ""
- name: pkixPublicKey
type:
scalar: string
- name: podName
type:
scalar: string
default: ""
- name: podUID
type:
scalar: string
default: ""
- name: proofOfPossession
type:
scalar: string
- name: serviceAccountName
type:
scalar: string
default: ""
- name: serviceAccountUID
type:
scalar: string
default: ""
- name: signerName
type:
scalar: string
default: ""
- name: unverifiedUserAnnotations
type:
map:
elementType:
scalar: string
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequestStatus
map:
fields:
- name: beginRefreshAt
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: certificateChain
type:
scalar: string
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: notAfter
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: notBefore
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: io.k8s.api.coordination.v1.Lease
map:
fields:
@@ -6765,6 +6770,12 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.core.v1.NodeDaemonEndpoints
default: {}
- name: declaredFeatures
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: features
type:
namedType: io.k8s.api.core.v1.NodeFeatures
@@ -7282,6 +7293,11 @@ var schemaYAML = typed.YAMLObject(`types:
- name: signerName
type:
scalar: string
- name: userAnnotations
type:
map:
elementType:
scalar: string
- name: io.k8s.api.core.v1.PodCondition
map:
fields:
@@ -7633,9 +7649,17 @@ var schemaYAML = typed.YAMLObject(`types:
elementRelationship: associative
keys:
- name
- name: workloadRef
type:
namedType: io.k8s.api.core.v1.WorkloadReference
- name: io.k8s.api.core.v1.PodStatus
map:
fields:
- name: allocatedResources
type:
map:
elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: conditions
type:
list:
@@ -7714,6 +7738,9 @@ var schemaYAML = typed.YAMLObject(`types:
elementRelationship: associative
keys:
- name
- name: resources
type:
namedType: io.k8s.api.core.v1.ResourceRequirements
- name: startTime
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
@@ -9007,6 +9034,20 @@ var schemaYAML = typed.YAMLObject(`types:
- name: runAsUserName
type:
scalar: string
- name: io.k8s.api.core.v1.WorkloadReference
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: podGroup
type:
scalar: string
default: ""
- name: podGroupReplicaKey
type:
scalar: string
- name: io.k8s.api.discovery.v1.Endpoint
map:
fields:
@@ -13476,19 +13517,6 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
namedType: io.k8s.api.resource.v1.CounterSet
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
map:
fields:
- name: expression
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
map:
fields:
- name: cel
type:
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
map:
fields:
@@ -13523,6 +13551,10 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
default: {}
- name: status
type:
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleStatus
default: {}
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
map:
fields:
@@ -13533,27 +13565,29 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
default: {}
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
map:
fields:
- name: device
type:
scalar: string
- name: deviceClassName
type:
scalar: string
- name: driver
type:
scalar: string
- name: pool
type:
scalar: string
- name: selectors
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
map:
fields:
@@ -14934,6 +14968,45 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
map:
elementType:
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
map:
fields:
- name: minCount
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.PodGroup
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: policy
type:
namedType: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
default: {}
- name: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
map:
fields:
- name: basic
type:
namedType: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
- name: gang
type:
namedType: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
- name: io.k8s.api.scheduling.v1alpha1.PriorityClass
map:
fields:
@@ -14960,6 +15033,51 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.scheduling.v1alpha1.Workload
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.scheduling.v1alpha1.WorkloadSpec
default: {}
- name: io.k8s.api.scheduling.v1alpha1.WorkloadSpec
map:
fields:
- name: controllerRef
type:
namedType: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
- name: podGroups
type:
list:
elementType:
namedType: io.k8s.api.scheduling.v1alpha1.PodGroup
elementRelationship: associative
keys:
- name
- name: io.k8s.api.scheduling.v1beta1.PriorityClass
map:
fields:
@@ -15024,6 +15142,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: seLinuxMount
type:
scalar: boolean
- name: serviceAccountTokenInSecrets
type:
scalar: boolean
- name: storageCapacity
type:
scalar: boolean
@@ -15430,6 +15551,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: seLinuxMount
type:
scalar: boolean
- name: serviceAccountTokenInSecrets
type:
scalar: boolean
- name: storageCapacity
type:
scalar: boolean
@@ -15675,39 +15799,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: count
type:
scalar: numeric
- name: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource
map:
fields:
- name: group
type:
scalar: string
- name: resource
type:
scalar: string
- name: version
type:
scalar: string
- name: io.k8s.api.storagemigration.v1alpha1.MigrationCondition
map:
fields:
- name: lastUpdateTime
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: message
type:
scalar: string
- name: reason
type:
scalar: string
- name: status
type:
scalar: string
default: ""
- name: type
type:
scalar: string
default: ""
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigration
map:
fields:
- name: apiVersion
@@ -15722,30 +15814,27 @@ var schemaYAML = typed.YAMLObject(`types:
default: {}
- name: spec
type:
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
default: {}
- name: status
type:
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
default: {}
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
map:
fields:
- name: continueToken
type:
scalar: string
- name: resource
type:
namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
default: {}
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
@@ -15821,6 +15910,17 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
map:
fields:
- name: group
type:
scalar: string
default: ""
- name: resource
type:
scalar: string
default: ""
- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector
map:
fields:

View File

@@ -0,0 +1,51 @@
/*
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
// GroupResourceApplyConfiguration represents a declarative configuration of the GroupResource type for use
// with apply.
//
// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
// concepts during lookup stages without having partially valid types
type GroupResourceApplyConfiguration struct {
Group *string `json:"group,omitempty"`
Resource *string `json:"resource,omitempty"`
}
// GroupResourceApplyConfiguration constructs a declarative configuration of the GroupResource type for use with
// apply.
func GroupResource() *GroupResourceApplyConfiguration {
return &GroupResourceApplyConfiguration{}
}
// WithGroup sets the Group 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 Group field is set to the value of the last call.
func (b *GroupResourceApplyConfiguration) WithGroup(value string) *GroupResourceApplyConfiguration {
b.Group = &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 *GroupResourceApplyConfiguration) WithResource(value string) *GroupResourceApplyConfiguration {
b.Resource = &value
return b
}

View File

@@ -23,7 +23,7 @@ package v1
//
// CounterSet defines a named set of counters
// that are available to be used by devices defined in the
// ResourceSlice.
// ResourcePool.
//
// The counters are not allocatable by themselves, but
// can be referenced by devices. When a device is allocated,
@@ -36,7 +36,7 @@ type CounterSetApplyConfiguration struct {
// Counters defines the set of counters for this CounterSet
// The name of each counter must be unique in that set and must be a DNS label.
//
// The maximum number of counters in all sets is 32.
// The maximum number of counters is 32.
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
}

View File

@@ -48,10 +48,8 @@ type DeviceApplyConfiguration struct {
//
// There can only be a single entry per counterSet.
//
// The total number of device counter consumption entries
// must be <= 32. In addition, the total number in the
// entire ResourceSlice must be <= 1024 (for example,
// 64 devices with 16 counters each).
// The maximum number of device counter consumptions per
// device is 2.
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
// NodeName identifies the node where the device is available.
//
@@ -72,7 +70,9 @@ type DeviceApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// If specified, these are the driver-defined taints.
//
// The maximum number of taints is 4.
// The maximum number of taints is 16. If taints are set for
// any device in a ResourceSlice, then the maximum number of
// allowed devices per ResourceSlice is 64 instead of 128.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// feature gate.

View File

@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
CounterSet *string `json:"counterSet,omitempty"`
// Counters defines the counters that will be consumed by the device.
//
// The maximum number counters in a device is 32.
// In addition, the maximum number of all counters
// in all devices is 1024 (for example, 64 devices with
// 16 counters each).
// The maximum number of counters is 32.
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
}

View File

@@ -38,8 +38,10 @@ type DeviceTaintApplyConfiguration struct {
Value *string `json:"value,omitempty"`
// The effect of the taint on claims that do not tolerate the taint
// and through such claims on the pods using them.
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here.
//
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here. More effects may get added in the future.
// Consumers must treat unknown effects like None.
Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"`
// TimeAdded represents the time at which the taint was added.
// Added automatically during create or update if not set.

View File

@@ -62,7 +62,9 @@ type ResourceSliceSpecApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// Devices lists some or all of the devices in this pool.
//
// Must not have more than 128 entries.
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
//
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
// PerDeviceNodeSelection defines whether the access from nodes to
// resources in the pool is set on the ResourceSlice level or on each
@@ -74,9 +76,11 @@ type ResourceSliceSpecApplyConfiguration struct {
// SharedCounters defines a list of counter sets, each of which
// has a name and a list of counters available.
//
// The names of the SharedCounters must be unique in the ResourceSlice.
// The names of the counter sets must be unique in the ResourcePool.
//
// The maximum number of counters in all sets is 32.
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
//
// The maximum number of counter sets is 8.
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
}

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 v1alpha3
// CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use
// with apply.
//
// CELDeviceSelector contains a CEL expression for selecting a device.
type CELDeviceSelectorApplyConfiguration struct {
// Expression is a CEL expression which evaluates a single device. It
// must evaluate to true when the device under consideration satisfies
// the desired criteria, and false when it does not. Any other result
// is an error and causes allocation of devices to abort.
//
// The expression's input is an object named "device", which carries
// the following properties:
// - driver (string): the name of the driver which defines this device.
// - attributes (map[string]object): the device's attributes, grouped by prefix
// (e.g. device.attributes["dra.example.com"] evaluates to an object with all
// of the attributes which were prefixed by "dra.example.com".
// - capacity (map[string]object): the device's capacities, grouped by prefix.
//
// Example: Consider a device with driver="dra.example.com", which exposes
// two attributes named "model" and "ext.example.com/family" and which
// exposes one capacity named "modules". This input to this expression
// would have the following fields:
//
// device.driver
// device.attributes["dra.example.com"].model
// device.attributes["ext.example.com"].family
// device.capacity["dra.example.com"].modules
//
// The device.driver field can be used to check for a specific driver,
// either as a high-level precondition (i.e. you only want to consider
// devices from this driver) or as part of a multi-clause expression
// that is meant to consider devices from different drivers.
//
// The value type of each attribute is defined by the device
// definition, and users who write these expressions must consult the
// documentation for their specific drivers. The value type of each
// capacity is Quantity.
//
// If an unknown prefix is used as a lookup in either device.attributes
// or device.capacity, an empty map will be returned. Any reference to
// an unknown field will cause an evaluation error and allocation to
// abort.
//
// A robust expression should check for the existence of attributes
// before referencing them.
//
// For ease of use, the cel.bind() function is enabled, and can be used
// to simplify expressions that access multiple attributes with the
// same domain. For example:
//
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
//
// The length of the expression must be smaller or equal to 10 Ki. The
// cost of evaluating it is also limited based on the estimated number
// of logical steps.
Expression *string `json:"expression,omitempty"`
}
// CELDeviceSelectorApplyConfiguration constructs a declarative configuration of the CELDeviceSelector type for use with
// apply.
func CELDeviceSelector() *CELDeviceSelectorApplyConfiguration {
return &CELDeviceSelectorApplyConfiguration{}
}
// 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 *CELDeviceSelectorApplyConfiguration) WithExpression(value string) *CELDeviceSelectorApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -1,42 +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 v1alpha3
// DeviceSelectorApplyConfiguration represents a declarative configuration of the DeviceSelector type for use
// with apply.
//
// DeviceSelector must have exactly one field set.
type DeviceSelectorApplyConfiguration struct {
// CEL contains a CEL expression for selecting a device.
CEL *CELDeviceSelectorApplyConfiguration `json:"cel,omitempty"`
}
// DeviceSelectorApplyConfiguration constructs a declarative configuration of the DeviceSelector type for use with
// apply.
func DeviceSelector() *DeviceSelectorApplyConfiguration {
return &DeviceSelectorApplyConfiguration{}
}
// WithCEL sets the CEL 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 CEL field is set to the value of the last call.
func (b *DeviceSelectorApplyConfiguration) WithCEL(value *CELDeviceSelectorApplyConfiguration) *DeviceSelectorApplyConfiguration {
b.CEL = value
return b
}

View File

@@ -38,8 +38,10 @@ type DeviceTaintApplyConfiguration struct {
Value *string `json:"value,omitempty"`
// The effect of the taint on claims that do not tolerate the taint
// and through such claims on the pods using them.
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here.
//
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here. More effects may get added in the future.
// Consumers must treat unknown effects like None.
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
// TimeAdded represents the time at which the taint was added.
// Added automatically during create or update if not set.

View File

@@ -41,6 +41,8 @@ type DeviceTaintRuleApplyConfiguration struct {
//
// Changing the spec automatically increments the metadata.generation number.
Spec *DeviceTaintRuleSpecApplyConfiguration `json:"spec,omitempty"`
// Status provides information about what was requested in the spec.
Status *DeviceTaintRuleStatusApplyConfiguration `json:"status,omitempty"`
}
// DeviceTaintRule constructs a declarative configuration of the DeviceTaintRule type for use with
@@ -87,6 +89,12 @@ func ExtractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, f
return ExtractDeviceTaintRuleFrom(deviceTaintRule, fieldManager, "")
}
// ExtractDeviceTaintRuleStatus extracts the applied configuration owned by fieldManager from
// deviceTaintRule for the status subresource.
func ExtractDeviceTaintRuleStatus(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
return ExtractDeviceTaintRuleFrom(deviceTaintRule, fieldManager, "status")
}
func (b DeviceTaintRuleApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind field in the declarative configuration to the given value
@@ -255,6 +263,14 @@ func (b *DeviceTaintRuleApplyConfiguration) WithSpec(value *DeviceTaintRuleSpecA
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 *DeviceTaintRuleApplyConfiguration) WithStatus(value *DeviceTaintRuleStatusApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
b.Status = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *DeviceTaintRuleApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind

View File

@@ -24,7 +24,7 @@ package v1alpha3
// DeviceTaintRuleSpec specifies the selector and one taint.
type DeviceTaintRuleSpecApplyConfiguration struct {
// DeviceSelector defines which device(s) the taint is applied to.
// All selector criteria must be satified for a device to
// All selector criteria must be satisfied for a device to
// match. The empty selector matches all devices. Without
// a selector, no devices are matches.
DeviceSelector *DeviceTaintSelectorApplyConfiguration `json:"deviceSelector,omitempty"`

View File

@@ -0,0 +1,70 @@
/*
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 v1alpha3
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// DeviceTaintRuleStatusApplyConfiguration represents a declarative configuration of the DeviceTaintRuleStatus type for use
// with apply.
//
// DeviceTaintRuleStatus provides information about an on-going pod eviction.
type DeviceTaintRuleStatusApplyConfiguration struct {
// Conditions provide information about the state of the DeviceTaintRule
// and the cluster at some point in time,
// in a machine-readable and human-readable format.
//
// The following condition is currently defined as part of this API, more may
// get added:
// - Type: EvictionInProgress
// - Status: True if there are currently pods which need to be evicted, False otherwise
// (includes the effects which don't cause eviction).
// - Reason: not specified, may change
// - Message: includes information about number of pending pods and already evicted pods
// in a human-readable format, updated periodically, may change
//
// For `effect: None`, the condition above gets set once for each change to
// the spec, with the message containing information about what would happen
// if the effect was `NoExecute`. This feedback can be used to decide whether
// changing the effect to `NoExecute` will work as intended. It only gets
// set once to avoid having to constantly update the status.
//
// Must have 8 or fewer entries.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// DeviceTaintRuleStatusApplyConfiguration constructs a declarative configuration of the DeviceTaintRuleStatus type for use with
// apply.
func DeviceTaintRuleStatus() *DeviceTaintRuleStatusApplyConfiguration {
return &DeviceTaintRuleStatusApplyConfiguration{}
}
// 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 *DeviceTaintRuleStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *DeviceTaintRuleStatusApplyConfiguration {
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

@@ -25,10 +25,6 @@ package v1alpha3
// The empty selector matches all devices. Without a selector, no devices
// are matched.
type DeviceTaintSelectorApplyConfiguration struct {
// If DeviceClassName is set, the selectors defined there must be
// satisfied by a device to be selected. This field corresponds
// to class.metadata.name.
DeviceClassName *string `json:"deviceClassName,omitempty"`
// If driver is set, only devices from that driver are selected.
// This fields corresponds to slice.spec.driver.
Driver *string `json:"driver,omitempty"`
@@ -47,10 +43,6 @@ type DeviceTaintSelectorApplyConfiguration struct {
// Setting also driver and pool may be required to avoid ambiguity,
// but is not required.
Device *string `json:"device,omitempty"`
// Selectors contains the same selection criteria as a ResourceClaim.
// Currently, CEL expressions are supported. All of these selectors
// must be satisfied.
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
}
// DeviceTaintSelectorApplyConfiguration constructs a declarative configuration of the DeviceTaintSelector type for use with
@@ -59,14 +51,6 @@ func DeviceTaintSelector() *DeviceTaintSelectorApplyConfiguration {
return &DeviceTaintSelectorApplyConfiguration{}
}
// WithDeviceClassName sets the DeviceClassName 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 DeviceClassName field is set to the value of the last call.
func (b *DeviceTaintSelectorApplyConfiguration) WithDeviceClassName(value string) *DeviceTaintSelectorApplyConfiguration {
b.DeviceClassName = &value
return b
}
// WithDriver sets the Driver 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 Driver field is set to the value of the last call.
@@ -90,16 +74,3 @@ func (b *DeviceTaintSelectorApplyConfiguration) WithDevice(value string) *Device
b.Device = &value
return b
}
// WithSelectors adds the given value to the Selectors 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 Selectors field.
func (b *DeviceTaintSelectorApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceTaintSelectorApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSelectors")
}
b.Selectors = append(b.Selectors, *values[i])
}
return b
}

View File

@@ -44,10 +44,8 @@ type BasicDeviceApplyConfiguration struct {
//
// There can only be a single entry per counterSet.
//
// The total number of device counter consumption entries
// must be <= 32. In addition, the total number in the
// entire ResourceSlice must be <= 1024 (for example,
// 64 devices with 16 counters each).
// The maximum number of device counter consumptions per
// device is 2.
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
// NodeName identifies the node where the device is available.
//
@@ -68,7 +66,9 @@ type BasicDeviceApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// If specified, these are the driver-defined taints.
//
// The maximum number of taints is 4.
// The maximum number of taints is 16. If taints are set for
// any device in a ResourceSlice, then the maximum number of
// allowed devices per ResourceSlice is 64 instead of 128.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// feature gate.

View File

@@ -23,7 +23,7 @@ package v1beta1
//
// CounterSet defines a named set of counters
// that are available to be used by devices defined in the
// ResourceSlice.
// ResourcePool.
//
// The counters are not allocatable by themselves, but
// can be referenced by devices. When a device is allocated,

View File

@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
CounterSet *string `json:"counterSet,omitempty"`
// Counters defines the counters that will be consumed by the device.
//
// The maximum number counters in a device is 32.
// In addition, the maximum number of all counters
// in all devices is 1024 (for example, 64 devices with
// 16 counters each).
// The maximum number of counters is 32.
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
}

View File

@@ -38,8 +38,10 @@ type DeviceTaintApplyConfiguration struct {
Value *string `json:"value,omitempty"`
// The effect of the taint on claims that do not tolerate the taint
// and through such claims on the pods using them.
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here.
//
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here. More effects may get added in the future.
// Consumers must treat unknown effects like None.
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
// TimeAdded represents the time at which the taint was added.
// Added automatically during create or update if not set.

View File

@@ -62,7 +62,9 @@ type ResourceSliceSpecApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// Devices lists some or all of the devices in this pool.
//
// Must not have more than 128 entries.
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
//
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
// PerDeviceNodeSelection defines whether the access from nodes to
// resources in the pool is set on the ResourceSlice level or on each
@@ -74,9 +76,11 @@ type ResourceSliceSpecApplyConfiguration struct {
// SharedCounters defines a list of counter sets, each of which
// has a name and a list of counters available.
//
// The names of the SharedCounters must be unique in the ResourceSlice.
// The names of the counter sets must be unique in the ResourcePool.
//
// The maximum number of SharedCounters is 32.
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
//
// The maximum number of counter sets is 8.
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
}

View File

@@ -23,7 +23,7 @@ package v1beta2
//
// CounterSet defines a named set of counters
// that are available to be used by devices defined in the
// ResourceSlice.
// ResourcePool.
//
// The counters are not allocatable by themselves, but
// can be referenced by devices. When a device is allocated,
@@ -36,7 +36,7 @@ type CounterSetApplyConfiguration struct {
// Counters defines the set of counters for this CounterSet
// The name of each counter must be unique in that set and must be a DNS label.
//
// The maximum number of counters in all sets is 32.
// The maximum number of counters is 32.
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
}

View File

@@ -48,10 +48,8 @@ type DeviceApplyConfiguration struct {
//
// There can only be a single entry per counterSet.
//
// The total number of device counter consumption entries
// must be <= 32. In addition, the total number in the
// entire ResourceSlice must be <= 1024 (for example,
// 64 devices with 16 counters each).
// The maximum number of device counter consumptions per
// device is 2.
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
// NodeName identifies the node where the device is available.
//
@@ -72,7 +70,9 @@ type DeviceApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// If specified, these are the driver-defined taints.
//
// The maximum number of taints is 4.
// The maximum number of taints is 16. If taints are set for
// any device in a ResourceSlice, then the maximum number of
// allowed devices per ResourceSlice is 64 instead of 128.
//
// This is an alpha field and requires enabling the DRADeviceTaints
// feature gate.

View File

@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
CounterSet *string `json:"counterSet,omitempty"`
// Counters defines the counters that will be consumed by the device.
//
// The maximum number counters in a device is 32.
// In addition, the maximum number of all counters
// in all devices is 1024 (for example, 64 devices with
// 16 counters each).
// The maximum number of counters is 32.
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
}

View File

@@ -38,8 +38,10 @@ type DeviceTaintApplyConfiguration struct {
Value *string `json:"value,omitempty"`
// The effect of the taint on claims that do not tolerate the taint
// and through such claims on the pods using them.
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here.
//
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
// nodes is not valid here. More effects may get added in the future.
// Consumers must treat unknown effects like None.
Effect *resourcev1beta2.DeviceTaintEffect `json:"effect,omitempty"`
// TimeAdded represents the time at which the taint was added.
// Added automatically during create or update if not set.

View File

@@ -62,7 +62,9 @@ type ResourceSliceSpecApplyConfiguration struct {
AllNodes *bool `json:"allNodes,omitempty"`
// Devices lists some or all of the devices in this pool.
//
// Must not have more than 128 entries.
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
//
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
// PerDeviceNodeSelection defines whether the access from nodes to
// resources in the pool is set on the ResourceSlice level or on each
@@ -74,9 +76,11 @@ type ResourceSliceSpecApplyConfiguration struct {
// SharedCounters defines a list of counter sets, each of which
// has a name and a list of counters available.
//
// The names of the SharedCounters must be unique in the ResourceSlice.
// The names of the counter sets must be unique in the ResourcePool.
//
// The maximum number of counters in all sets is 32.
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
//
// The maximum number of counter sets is 8.
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
}

View File

@@ -0,0 +1,44 @@
/*
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 v1alpha1
// GangSchedulingPolicyApplyConfiguration represents a declarative configuration of the GangSchedulingPolicy type for use
// with apply.
//
// GangSchedulingPolicy defines the parameters for gang scheduling.
type GangSchedulingPolicyApplyConfiguration struct {
// MinCount is the minimum number of pods that must be schedulable or scheduled
// at the same time for the scheduler to admit the entire group.
// It must be a positive integer.
MinCount *int32 `json:"minCount,omitempty"`
}
// GangSchedulingPolicyApplyConfiguration constructs a declarative configuration of the GangSchedulingPolicy type for use with
// apply.
func GangSchedulingPolicy() *GangSchedulingPolicyApplyConfiguration {
return &GangSchedulingPolicyApplyConfiguration{}
}
// WithMinCount sets the MinCount 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 MinCount field is set to the value of the last call.
func (b *GangSchedulingPolicyApplyConfiguration) WithMinCount(value int32) *GangSchedulingPolicyApplyConfiguration {
b.MinCount = &value
return b
}

View File

@@ -0,0 +1,53 @@
/*
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 v1alpha1
// PodGroupApplyConfiguration represents a declarative configuration of the PodGroup type for use
// with apply.
//
// PodGroup represents a set of pods with a common scheduling policy.
type PodGroupApplyConfiguration struct {
// Name is a unique identifier for the PodGroup within the Workload.
// It must be a DNS label. This field is immutable.
Name *string `json:"name,omitempty"`
// Policy defines the scheduling policy for this PodGroup.
Policy *PodGroupPolicyApplyConfiguration `json:"policy,omitempty"`
}
// PodGroupApplyConfiguration constructs a declarative configuration of the PodGroup type for use with
// apply.
func PodGroup() *PodGroupApplyConfiguration {
return &PodGroupApplyConfiguration{}
}
// 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 *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfiguration {
b.Name = &value
return b
}
// WithPolicy sets the Policy 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 Policy field is set to the value of the last call.
func (b *PodGroupApplyConfiguration) WithPolicy(value *PodGroupPolicyApplyConfiguration) *PodGroupApplyConfiguration {
b.Policy = value
return b
}

View File

@@ -0,0 +1,58 @@
/*
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 v1alpha1
import (
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
)
// PodGroupPolicyApplyConfiguration represents a declarative configuration of the PodGroupPolicy type for use
// with apply.
//
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
type PodGroupPolicyApplyConfiguration struct {
// Basic specifies that the pods in this group should be scheduled using
// standard Kubernetes scheduling behavior.
Basic *schedulingv1alpha1.BasicSchedulingPolicy `json:"basic,omitempty"`
// Gang specifies that the pods in this group should be scheduled using
// all-or-nothing semantics.
Gang *GangSchedulingPolicyApplyConfiguration `json:"gang,omitempty"`
}
// PodGroupPolicyApplyConfiguration constructs a declarative configuration of the PodGroupPolicy type for use with
// apply.
func PodGroupPolicy() *PodGroupPolicyApplyConfiguration {
return &PodGroupPolicyApplyConfiguration{}
}
// WithBasic sets the Basic 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 Basic field is set to the value of the last call.
func (b *PodGroupPolicyApplyConfiguration) WithBasic(value schedulingv1alpha1.BasicSchedulingPolicy) *PodGroupPolicyApplyConfiguration {
b.Basic = &value
return b
}
// WithGang sets the Gang 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 Gang field is set to the value of the last call.
func (b *PodGroupPolicyApplyConfiguration) WithGang(value *GangSchedulingPolicyApplyConfiguration) *PodGroupPolicyApplyConfiguration {
b.Gang = value
return b
}

View File

@@ -0,0 +1,67 @@
/*
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 v1alpha1
// TypedLocalObjectReferenceApplyConfiguration represents a declarative configuration of the TypedLocalObjectReference type for use
// with apply.
//
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
type TypedLocalObjectReferenceApplyConfiguration struct {
// APIGroup is the group for the resource being referenced.
// If APIGroup is empty, the specified Kind must be in the core API group.
// For any other third-party types, setting APIGroup is required.
// It must be a DNS subdomain.
APIGroup *string `json:"apiGroup,omitempty"`
// Kind is the type of resource being referenced.
// It must be a path segment name.
Kind *string `json:"kind,omitempty"`
// Name is the name of resource being referenced.
// It must be a path segment name.
Name *string `json:"name,omitempty"`
}
// TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with
// apply.
func TypedLocalObjectReference() *TypedLocalObjectReferenceApplyConfiguration {
return &TypedLocalObjectReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call.
func (b *TypedLocalObjectReferenceApplyConfiguration) WithAPIGroup(value string) *TypedLocalObjectReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// 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 *TypedLocalObjectReferenceApplyConfiguration) WithKind(value string) *TypedLocalObjectReferenceApplyConfiguration {
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 *TypedLocalObjectReferenceApplyConfiguration) WithName(value string) *TypedLocalObjectReferenceApplyConfiguration {
b.Name = &value
return b
}

View File

@@ -0,0 +1,279 @@
/*
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 v1alpha1
import (
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
metav1 "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"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// WorkloadApplyConfiguration represents a declarative configuration of the Workload type for use
// with apply.
//
// Workload allows for expressing scheduling constraints that should be used
// when managing lifecycle of workloads from scheduling perspective,
// including scheduling, preemption, eviction and other phases.
type WorkloadApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// Standard object's metadata.
// Name must be a DNS subdomain.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec defines the desired behavior of a Workload.
Spec *WorkloadSpecApplyConfiguration `json:"spec,omitempty"`
}
// Workload constructs a declarative configuration of the Workload type for use with
// apply.
func Workload(name, namespace string) *WorkloadApplyConfiguration {
b := &WorkloadApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Workload")
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
return b
}
// ExtractWorkloadFrom extracts the applied configuration owned by fieldManager from
// workload for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
// ExtractWorkloadFrom 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 ExtractWorkloadFrom(workload *schedulingv1alpha1.Workload, fieldManager string, subresource string) (*WorkloadApplyConfiguration, error) {
b := &WorkloadApplyConfiguration{}
err := managedfields.ExtractInto(workload, internal.Parser().Type("io.k8s.api.scheduling.v1alpha1.Workload"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(workload.Name)
b.WithNamespace(workload.Namespace)
b.WithKind("Workload")
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
return b, nil
}
// ExtractWorkload extracts the applied configuration owned by fieldManager from
// workload. If no managedFields are found in workload for fieldManager, a
// WorkloadApplyConfiguration 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.
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
// ExtractWorkload 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 ExtractWorkload(workload *schedulingv1alpha1.Workload, fieldManager string) (*WorkloadApplyConfiguration, error) {
return ExtractWorkloadFrom(workload, fieldManager, "")
}
func (b WorkloadApplyConfiguration) 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 *WorkloadApplyConfiguration) WithKind(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithAPIVersion(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithName(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithGenerateName(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithNamespace(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithUID(value types.UID) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithResourceVersion(value string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithGeneration(value int64) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithLabels(entries map[string]string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *WorkloadApplyConfiguration {
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 *WorkloadApplyConfiguration) WithFinalizers(values ...string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *WorkloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.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 *WorkloadApplyConfiguration) WithSpec(value *WorkloadSpecApplyConfiguration) *WorkloadApplyConfiguration {
b.Spec = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View File

@@ -0,0 +1,61 @@
/*
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 v1alpha1
// WorkloadSpecApplyConfiguration represents a declarative configuration of the WorkloadSpec type for use
// with apply.
//
// WorkloadSpec defines the desired state of a Workload.
type WorkloadSpecApplyConfiguration struct {
// ControllerRef is an optional reference to the controlling object, such as a
// Deployment or Job. This field is intended for use by tools like CLIs
// to provide a link back to the original workload definition.
// When set, it cannot be changed.
ControllerRef *TypedLocalObjectReferenceApplyConfiguration `json:"controllerRef,omitempty"`
// PodGroups is the list of pod groups that make up the Workload.
// The maximum number of pod groups is 8. This field is immutable.
PodGroups []PodGroupApplyConfiguration `json:"podGroups,omitempty"`
}
// WorkloadSpecApplyConfiguration constructs a declarative configuration of the WorkloadSpec type for use with
// apply.
func WorkloadSpec() *WorkloadSpecApplyConfiguration {
return &WorkloadSpecApplyConfiguration{}
}
// WithControllerRef sets the ControllerRef 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 ControllerRef field is set to the value of the last call.
func (b *WorkloadSpecApplyConfiguration) WithControllerRef(value *TypedLocalObjectReferenceApplyConfiguration) *WorkloadSpecApplyConfiguration {
b.ControllerRef = value
return b
}
// WithPodGroups adds the given value to the PodGroups 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 PodGroups field.
func (b *WorkloadSpecApplyConfiguration) WithPodGroups(values ...*PodGroupApplyConfiguration) *WorkloadSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPodGroups")
}
b.PodGroups = append(b.PodGroups, *values[i])
}
return b
}

View File

@@ -158,6 +158,26 @@ type CSIDriverSpecApplyConfiguration struct {
//
// This field is mutable.
NodeAllocatableUpdatePeriodSeconds *int64 `json:"nodeAllocatableUpdatePeriodSeconds,omitempty"`
// serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that
// service account tokens should be passed via the Secrets field in NodePublishVolumeRequest
// instead of the VolumeContext field. The CSI specification provides a dedicated Secrets
// field for sensitive information like tokens, which is the appropriate mechanism for
// handling credentials. This addresses security concerns where sensitive tokens were being
// logged as part of volume context.
//
// When "true", kubelet will pass the tokens only in the Secrets field with the key
// "csi.storage.k8s.io/serviceAccount.tokens". The CSI driver must be updated to read
// tokens from the Secrets field instead of VolumeContext.
//
// When "false" or not set, kubelet will pass the tokens in VolumeContext with the key
// "csi.storage.k8s.io/serviceAccount.tokens" (existing behavior). This maintains backward
// compatibility with existing CSI drivers.
//
// This field can only be set when TokenRequests is configured. The API server will reject
// CSIDriver specs that set this field without TokenRequests.
//
// Default behavior if unset is to pass tokens in the VolumeContext field.
ServiceAccountTokenInSecrets *bool `json:"serviceAccountTokenInSecrets,omitempty"`
}
// CSIDriverSpecApplyConfiguration constructs a declarative configuration of the CSIDriverSpec type for use with
@@ -244,3 +264,11 @@ func (b *CSIDriverSpecApplyConfiguration) WithNodeAllocatableUpdatePeriodSeconds
b.NodeAllocatableUpdatePeriodSeconds = &value
return b
}
// WithServiceAccountTokenInSecrets sets the ServiceAccountTokenInSecrets 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 ServiceAccountTokenInSecrets field is set to the value of the last call.
func (b *CSIDriverSpecApplyConfiguration) WithServiceAccountTokenInSecrets(value bool) *CSIDriverSpecApplyConfiguration {
b.ServiceAccountTokenInSecrets = &value
return b
}

View File

@@ -158,6 +158,26 @@ type CSIDriverSpecApplyConfiguration struct {
//
// This field is mutable.
NodeAllocatableUpdatePeriodSeconds *int64 `json:"nodeAllocatableUpdatePeriodSeconds,omitempty"`
// serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that
// service account tokens should be passed via the Secrets field in NodePublishVolumeRequest
// instead of the VolumeContext field. The CSI specification provides a dedicated Secrets
// field for sensitive information like tokens, which is the appropriate mechanism for
// handling credentials. This addresses security concerns where sensitive tokens were being
// logged as part of volume context.
//
// When "true", kubelet will pass the tokens only in the Secrets field with the key
// "csi.storage.k8s.io/serviceAccount.tokens". The CSI driver must be updated to read
// tokens from the Secrets field instead of VolumeContext.
//
// When "false" or not set, kubelet will pass the tokens in VolumeContext with the key
// "csi.storage.k8s.io/serviceAccount.tokens" (existing behavior). This maintains backward
// compatibility with existing CSI drivers.
//
// This field can only be set when TokenRequests is configured. The API server will reject
// CSIDriver specs that set this field without TokenRequests.
//
// Default behavior if unset is to pass tokens in the VolumeContext field.
ServiceAccountTokenInSecrets *bool `json:"serviceAccountTokenInSecrets,omitempty"`
}
// CSIDriverSpecApplyConfiguration constructs a declarative configuration of the CSIDriverSpec type for use with
@@ -244,3 +264,11 @@ func (b *CSIDriverSpecApplyConfiguration) WithNodeAllocatableUpdatePeriodSeconds
b.NodeAllocatableUpdatePeriodSeconds = &value
return b
}
// WithServiceAccountTokenInSecrets sets the ServiceAccountTokenInSecrets 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 ServiceAccountTokenInSecrets field is set to the value of the last call.
func (b *CSIDriverSpecApplyConfiguration) WithServiceAccountTokenInSecrets(value bool) *CSIDriverSpecApplyConfiguration {
b.ServiceAccountTokenInSecrets = &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 v1alpha1
// GroupVersionResourceApplyConfiguration represents a declarative configuration of the GroupVersionResource type for use
// with apply.
//
// The names of the group, the version, and the resource.
type GroupVersionResourceApplyConfiguration struct {
// The name of the group.
Group *string `json:"group,omitempty"`
// The name of the version.
Version *string `json:"version,omitempty"`
// The name of the resource.
Resource *string `json:"resource,omitempty"`
}
// GroupVersionResourceApplyConfiguration constructs a declarative configuration of the GroupVersionResource type for use with
// apply.
func GroupVersionResource() *GroupVersionResourceApplyConfiguration {
return &GroupVersionResourceApplyConfiguration{}
}
// WithGroup sets the Group 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 Group field is set to the value of the last call.
func (b *GroupVersionResourceApplyConfiguration) WithGroup(value string) *GroupVersionResourceApplyConfiguration {
b.Group = &value
return b
}
// WithVersion sets the Version 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 Version field is set to the value of the last call.
func (b *GroupVersionResourceApplyConfiguration) WithVersion(value string) *GroupVersionResourceApplyConfiguration {
b.Version = &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 *GroupVersionResourceApplyConfiguration) WithResource(value string) *GroupVersionResourceApplyConfiguration {
b.Resource = &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 v1alpha1
import (
v1 "k8s.io/api/core/v1"
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// MigrationConditionApplyConfiguration represents a declarative configuration of the MigrationCondition type for use
// with apply.
//
// Describes the state of a migration at a certain point.
type MigrationConditionApplyConfiguration struct {
// Type of the condition.
Type *storagemigrationv1alpha1.MigrationConditionType `json:"type,omitempty"`
// Status of the condition, one of True, False, Unknown.
Status *v1.ConditionStatus `json:"status,omitempty"`
// The last time this condition was updated.
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
// The reason for the condition's last transition.
Reason *string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
Message *string `json:"message,omitempty"`
}
// MigrationConditionApplyConfiguration constructs a declarative configuration of the MigrationCondition type for use with
// apply.
func MigrationCondition() *MigrationConditionApplyConfiguration {
return &MigrationConditionApplyConfiguration{}
}
// 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 *MigrationConditionApplyConfiguration) WithType(value storagemigrationv1alpha1.MigrationConditionType) *MigrationConditionApplyConfiguration {
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 *MigrationConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *MigrationConditionApplyConfiguration {
b.Status = &value
return b
}
// WithLastUpdateTime sets the LastUpdateTime 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 LastUpdateTime field is set to the value of the last call.
func (b *MigrationConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *MigrationConditionApplyConfiguration {
b.LastUpdateTime = &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 *MigrationConditionApplyConfiguration) WithReason(value string) *MigrationConditionApplyConfiguration {
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 *MigrationConditionApplyConfiguration) WithMessage(value string) *MigrationConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -49,7 +49,7 @@ func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfigura
b := &StorageVersionMigrationApplyConfiguration{}
b.WithName(name)
b.WithKind("StorageVersionMigration")
b.WithAPIVersion("storagemigration.k8s.io/v1alpha1")
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
return b
}
@@ -60,16 +60,16 @@ func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfigura
// ExtractStorageVersionMigrationFrom 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 ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigrationv1beta1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
b := &StorageVersionMigrationApplyConfiguration{}
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration"), fieldManager, b, subresource)
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1beta1.StorageVersionMigration"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(storageVersionMigration.Name)
b.WithKind("StorageVersionMigration")
b.WithAPIVersion("storagemigration.k8s.io/v1alpha1")
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
return b, nil
}
@@ -83,13 +83,13 @@ func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigratio
// ExtractStorageVersionMigration 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 ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1beta1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "")
}
// ExtractStorageVersionMigrationStatus extracts the applied configuration owned by fieldManager from
// storageVersionMigration for the status subresource.
func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1beta1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "status")
}

View File

@@ -16,7 +16,11 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// StorageVersionMigrationSpecApplyConfiguration represents a declarative configuration of the StorageVersionMigrationSpec type for use
// with apply.
@@ -26,12 +30,7 @@ type StorageVersionMigrationSpecApplyConfiguration struct {
// The resource that is being migrated. The migrator sends requests to
// the endpoint serving the resource.
// Immutable.
Resource *GroupVersionResourceApplyConfiguration `json:"resource,omitempty"`
// The token used in the list options to get the next chunk of objects
// to migrate. When the .status.conditions indicates the migration is
// "Running", users can use this token to check the progress of the
// migration.
ContinueToken *string `json:"continueToken,omitempty"`
Resource *v1.GroupResourceApplyConfiguration `json:"resource,omitempty"`
}
// StorageVersionMigrationSpecApplyConfiguration constructs a declarative configuration of the StorageVersionMigrationSpec type for use with
@@ -43,15 +42,7 @@ func StorageVersionMigrationSpec() *StorageVersionMigrationSpecApplyConfiguratio
// 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 *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *GroupVersionResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
func (b *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *v1.GroupResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
b.Resource = value
return b
}
// WithContinueToken sets the ContinueToken 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 ContinueToken field is set to the value of the last call.
func (b *StorageVersionMigrationSpecApplyConfiguration) WithContinueToken(value string) *StorageVersionMigrationSpecApplyConfiguration {
b.ContinueToken = &value
return b
}

View File

@@ -16,7 +16,11 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// StorageVersionMigrationStatusApplyConfiguration represents a declarative configuration of the StorageVersionMigrationStatus type for use
// with apply.
@@ -24,7 +28,7 @@ package v1alpha1
// Status of the storage version migration.
type StorageVersionMigrationStatusApplyConfiguration struct {
// The latest available observations of the migration's current state.
Conditions []MigrationConditionApplyConfiguration `json:"conditions,omitempty"`
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
// ResourceVersion to compare with the GC cache for performing the migration.
// This is the current resource version of given group, version and resource when
// kube-controller-manager first observes this StorageVersionMigration resource.
@@ -40,7 +44,7 @@ func StorageVersionMigrationStatus() *StorageVersionMigrationStatusApplyConfigur
// 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 *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*MigrationConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
func (b *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")

View File

@@ -69,7 +69,7 @@ import (
storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -126,7 +126,7 @@ import (
applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1"
applyconfigurationsstoragev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1"
applyconfigurationsstoragev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1"
applyconfigurationsstoragemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1"
applyconfigurationsstoragemigrationv1beta1 "k8s.io/client-go/applyconfigurations/storagemigration/v1beta1"
)
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
@@ -630,12 +630,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("ClusterTrustBundleSpec"):
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleSpecApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestSpec"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestSpecApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestStatus"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestStatusApplyConfiguration{}
// Group=certificates.k8s.io, Version=v1beta1
case certificatesv1beta1.SchemeGroupVersion.WithKind("CertificateSigningRequest"):
@@ -650,6 +644,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscertificatesv1beta1.ClusterTrustBundleApplyConfiguration{}
case certificatesv1beta1.SchemeGroupVersion.WithKind("ClusterTrustBundleSpec"):
return &applyconfigurationscertificatesv1beta1.ClusterTrustBundleSpecApplyConfiguration{}
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequest"):
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration{}
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequestSpec"):
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestSpecApplyConfiguration{}
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequestStatus"):
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestStatusApplyConfiguration{}
// Group=coordination.k8s.io, Version=v1
case coordinationv1.SchemeGroupVersion.WithKind("Lease"):
@@ -1084,6 +1084,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.WeightedPodAffinityTermApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("WindowsSecurityContextOptions"):
return &applyconfigurationscorev1.WindowsSecurityContextOptionsApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("WorkloadReference"):
return &applyconfigurationscorev1.WorkloadReferenceApplyConfiguration{}
// Group=discovery.k8s.io, Version=v1
case discoveryv1.SchemeGroupVersion.WithKind("Endpoint"):
@@ -1406,6 +1408,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsmetav1.ConditionApplyConfiguration{}
case metav1.SchemeGroupVersion.WithKind("DeleteOptions"):
return &applyconfigurationsmetav1.DeleteOptionsApplyConfiguration{}
case metav1.SchemeGroupVersion.WithKind("GroupResource"):
return &applyconfigurationsmetav1.GroupResourceApplyConfiguration{}
case metav1.SchemeGroupVersion.WithKind("LabelSelector"):
return &applyconfigurationsmetav1.LabelSelectorApplyConfiguration{}
case metav1.SchemeGroupVersion.WithKind("LabelSelectorRequirement"):
@@ -1708,16 +1712,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsresourcev1.ResourceSliceSpecApplyConfiguration{}
// Group=resource.k8s.io, Version=v1alpha3
case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"):
return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
return &resourcev1alpha3.DeviceTaintRuleApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleSpec"):
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleStatus"):
return &resourcev1alpha3.DeviceTaintRuleStatusApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
@@ -1886,8 +1888,20 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1alpha1
case schedulingv1alpha1.SchemeGroupVersion.WithKind("GangSchedulingPolicy"):
return &applyconfigurationsschedulingv1alpha1.GangSchedulingPolicyApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroup"):
return &applyconfigurationsschedulingv1alpha1.PodGroupApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroupPolicy"):
return &applyconfigurationsschedulingv1alpha1.PodGroupPolicyApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PriorityClass"):
return &applyconfigurationsschedulingv1alpha1.PriorityClassApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("TypedLocalObjectReference"):
return &applyconfigurationsschedulingv1alpha1.TypedLocalObjectReferenceApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("Workload"):
return &applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("WorkloadSpec"):
return &applyconfigurationsschedulingv1alpha1.WorkloadSpecApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1beta1
case schedulingv1beta1.SchemeGroupVersion.WithKind("PriorityClass"):
@@ -1973,17 +1987,13 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
case storagev1beta1.SchemeGroupVersion.WithKind("VolumeNodeResources"):
return &applyconfigurationsstoragev1beta1.VolumeNodeResourcesApplyConfiguration{}
// Group=storagemigration.k8s.io, Version=v1alpha1
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("GroupVersionResource"):
return &applyconfigurationsstoragemigrationv1alpha1.GroupVersionResourceApplyConfiguration{}
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("MigrationCondition"):
return &applyconfigurationsstoragemigrationv1alpha1.MigrationConditionApplyConfiguration{}
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationApplyConfiguration{}
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigrationSpec"):
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationSpecApplyConfiguration{}
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigrationStatus"):
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationStatusApplyConfiguration{}
// Group=storagemigration.k8s.io, Version=v1beta1
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationApplyConfiguration{}
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigrationSpec"):
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationSpecApplyConfiguration{}
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigrationStatus"):
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationStatusApplyConfiguration{}
}
return nil

View File

@@ -63,8 +63,9 @@ const (
// Aggregated discovery content-type (v2beta1). NOTE: content-type parameters
// MUST be ordered (g, v, as) for server in "Accept" header (BUT we are resilient
// to ordering when comparing returned values in "Content-Type" header).
AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList"
AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList"
AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList"
AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList"
AcceptV2NoPeer = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer"
// Prioritize aggregated discovery by placing first in the order of discovery accept types.
acceptDiscoveryFormats = AcceptV2 + "," + AcceptV2Beta1 + "," + AcceptV1
)
@@ -168,6 +169,11 @@ type DiscoveryClient struct {
LegacyPrefix string
// Forces the client to request only "unaggregated" (legacy) discovery.
UseLegacyDiscovery bool
// NoPeerDiscovery will request the "nopeer" profile of aggregated discovery.
// This allows a client to get just the discovery documents served by the single apiserver
// that it is talking to. This is useful for clients that need to understand the state
// of a single apiserver, for example, to validate that the apiserver is ready to serve traffic.
NoPeerDiscovery bool
}
var _ AggregatedDiscoveryInterface = &DiscoveryClient{}
@@ -241,10 +247,7 @@ func (d *DiscoveryClient) downloadLegacy() (
map[schema.GroupVersion]*metav1.APIResourceList,
map[schema.GroupVersion]error,
error) {
accept := acceptDiscoveryFormats
if d.UseLegacyDiscovery {
accept = AcceptV1
}
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
var responseContentType string
body, err := d.restClient.Get().
AbsPath("/api").
@@ -307,10 +310,7 @@ func (d *DiscoveryClient) downloadAPIs() (
map[schema.GroupVersion]*metav1.APIResourceList,
map[schema.GroupVersion]error,
error) {
accept := acceptDiscoveryFormats
if d.UseLegacyDiscovery {
accept = AcceptV1
}
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
var responseContentType string
body, err := d.restClient.Get().
AbsPath("/apis").
@@ -351,6 +351,16 @@ func (d *DiscoveryClient) downloadAPIs() (
return apiGroupList, resourcesByGV, failedGVs, nil
}
func selectDiscoveryAcceptHeader(useLegacy, nopeer bool) string {
if useLegacy {
return AcceptV1
}
if nopeer {
return AcceptV2NoPeer + "," + acceptDiscoveryFormats
}
return acceptDiscoveryFormats
}
// ContentTypeIsGVK checks of the content-type string is both
// "application/json" and matches the provided GVK. An error
// is returned if the content type string is malformed.

View File

@@ -36,6 +36,7 @@ import (
"k8s.io/apimachinery/pkg/watch"
restclient "k8s.io/client-go/rest"
restclientwatch "k8s.io/client-go/rest/watch"
"k8s.io/client-go/util/watchlist"
)
func getJSON(version, kind, name string) []byte {
@@ -78,6 +79,16 @@ func getClientServer(h func(http.ResponseWriter, *http.Request)) (Interface, *ht
return cl, srv, nil
}
func TestDoesClientSupportWatchListSemantics(t *testing.T) {
target, err := NewForConfig(&restclient.Config{})
if err != nil {
t.Fatal(err)
}
if watchlist.DoesClientNotSupportWatchListSemantics(target) {
t.Fatalf("Dynamic client should support WatchList semantics")
}
}
func TestList(t *testing.T) {
tcs := []struct {
name string

View File

@@ -148,7 +148,7 @@ func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersio
return &dynamicInformer{
gvr: gvr,
informer: cache.NewSharedIndexInformerWithOptions(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -173,7 +173,7 @@ func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersio
}
return client.Resource(gvr).Namespace(namespace).Watch(ctx, options)
},
},
}, client),
&unstructured.Unstructured{},
cache.SharedIndexInformerOptions{
ResyncPeriod: resyncPeriod,

View File

@@ -18,19 +18,29 @@ package dynamicinformer_test
import (
"context"
"fmt"
"testing"
"time"
"github.com/google/go-cmp/cmp"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/api/equality"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/json"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/dynamic/dynamicinformer"
"k8s.io/client-go/dynamic/fake"
clientfeatures "k8s.io/client-go/features"
clientfeaturestesting "k8s.io/client-go/features/testing"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
"net/http"
"net/http/httptest"
)
type triggerFunc func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured
@@ -55,6 +65,91 @@ func handler(rcvCh chan<- *unstructured.Unstructured) *cache.ResourceEventHandle
}
}
func TestWatchListSemanticsSimple(t *testing.T) {
clientfeaturestesting.SetFeatureDuringTest(t, clientfeatures.WatchListClient, true)
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if _, ok := req.URL.Query()["watch"]; !ok {
t.Errorf("expected a watch request, params: %v", req.URL.Query())
http.Error(w, fmt.Errorf("unexpected request").Error(), http.StatusInternalServerError)
return
}
obj := &appsv1.Deployment{
TypeMeta: metav1.TypeMeta{
APIVersion: "apps/v1",
Kind: "Deployment",
},
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
metav1.InitialEventsAnnotationKey: "true",
},
},
}
rawObj, err := json.Marshal(obj)
if err != nil {
t.Errorf("failed to marshal rawObj: %v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
watchEvent := &metav1.WatchEvent{
Type: string(watch.Bookmark),
Object: runtime.RawExtension{Raw: rawObj},
}
rawRsp, err := json.Marshal(watchEvent)
if err != nil {
t.Errorf("failed to marshal watchEvent: %v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(rawRsp)
if err != nil {
t.Fatalf("failed to write response: %v", err)
}
}))
defer server.Close()
cfg := &rest.Config{Host: server.URL}
client, err := dynamic.NewForConfig(cfg)
if err != nil {
t.Fatal(err)
}
factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(client, 0, "ns", nil)
target := factory.ForResource(schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"})
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
factory.Start(ctx.Done())
if !cache.WaitForCacheSync(ctx.Done(), target.Informer().HasSynced) {
t.Fatalf("failed to wait for caches to sync")
}
}
func TestUnSupportWatchListSemantics(t *testing.T) {
clientfeaturestesting.SetFeatureDuringTest(t, clientfeatures.WatchListClient, true)
scheme := runtime.NewScheme()
if err := appsv1.AddToScheme(scheme); err != nil {
t.Fatalf("failed to add corev1 to scheme: %v", err)
}
// The fake client doesnt support WatchList semantics,
// so we dont need to prepare a response.
fakeClient := fake.NewSimpleDynamicClient(scheme)
factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(fakeClient, 0, "ns", nil)
target := factory.ForResource(schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"})
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
factory.Start(ctx.Done())
if !cache.WaitForCacheSync(ctx.Done(), target.Informer().HasSynced) {
t.Fatalf("failed to wait for caches to sync")
}
}
func TestFilteredDynamicSharedInformerFactory(t *testing.T) {
scenarios := []struct {
name string

View File

@@ -156,6 +156,10 @@ func (c *FakeDynamicClient) Resource(resource schema.GroupVersionResource) dynam
return &dynamicResourceClient{client: c, resource: resource, listKind: c.gvrToListKind[resource]}
}
func (c *FakeDynamicClient) IsWatchListSemanticsUnSupported() bool {
return true
}
func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface {
ret := *c
ret.namespace = ns

View File

@@ -29,6 +29,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/watchlist"
)
const (
@@ -60,6 +61,12 @@ func newUnstructuredWithSpec(spec map[string]interface{}) *unstructured.Unstruct
return u
}
func TestDoesClientSupportWatchListSemantics(t *testing.T) {
target := &FakeDynamicClient{}
if !watchlist.DoesClientNotSupportWatchListSemantics(target) {
t.Fatalf("FakeDynamicClient should NOT support WatchList semantics")
}
}
func TestGet(t *testing.T) {
scheme := runtime.NewScheme()

View File

@@ -21,6 +21,7 @@ import (
"sync/atomic"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/version"
)
// NOTE: types Feature, FeatureSpec, prerelease (and its values)
@@ -49,8 +50,14 @@ type FeatureSpec struct {
LockToDefault bool
// PreRelease indicates the maturity level of the feature
PreRelease prerelease
// Version indicates the earliest version from which this FeatureSpec is valid.
// If multiple FeatureSpecs exist for a Feature, the one with the highest version that is less
// than or equal to the effective version of the component is used.
Version *version.Version
}
type VersionedSpecs []FeatureSpec
// Gates indicates whether a given feature is enabled or not.
type Gates interface {
// Enabled returns true if the key is enabled.
@@ -66,6 +73,15 @@ type Registry interface {
Add(map[Feature]FeatureSpec) error
}
// VersionedRegistry represents an external versioned feature gates registry.
type VersionedRegistry interface {
// AddVersioned adds existing versioned feature gates to the provided registry.
//
// As of today, this method is used by AddVersionedFeaturesToExistingFeatureGates and
// ReplaceFeatureGates to take control of the features exposed by this library.
AddVersioned(in map[Feature]VersionedSpecs) error
}
// FeatureGates returns the feature gates exposed by this library.
//
// By default, only the default features gates will be returned.
@@ -85,7 +101,15 @@ func FeatureGates() Gates {
// Usually this function is combined with ReplaceFeatureGates to take control of the
// features exposed by this library.
func AddFeaturesToExistingFeatureGates(registry Registry) error {
return registry.Add(defaultKubernetesFeatureGates)
return registry.Add(unversionedFeatureGates(defaultVersionedKubernetesFeatureGates))
}
// AddFeaturesToExistingFeatureGates adds the default versioned feature gates to the provided registry.
// Usually this function is combined with ReplaceFeatureGates to take control of the
// features exposed by this library.
// Generally only used by k/k.
func AddVersionedFeaturesToExistingFeatureGates(registry VersionedRegistry) error {
return registry.AddVersioned(defaultVersionedKubernetesFeatureGates)
}
// ReplaceFeatureGates overwrites the default implementation of the feature gates
@@ -121,8 +145,23 @@ func replaceFeatureGatesWithWarningIndicator(newFeatureGates Gates) bool {
return shouldProduceWarning
}
// unversionedFeatureGates takes the latest entry from the VersionedSpecs of each feature, and clears out the version information,
// so that the result can be used with an unversioned feature gate.
func unversionedFeatureGates(featureGates map[Feature]VersionedSpecs) map[Feature]FeatureSpec {
unversioned := map[Feature]FeatureSpec{}
for feature, specs := range featureGates {
if len(specs) == 0 {
continue
}
latestSpec := specs[len(specs)-1]
latestSpec.Version = nil // Clear version information.
unversioned[feature] = latestSpec
}
return unversioned
}
func init() {
envVarGates := newEnvVarFeatureGates(defaultKubernetesFeatureGates)
envVarGates := newEnvVarFeatureGates(unversionedFeatureGates(defaultVersionedKubernetesFeatureGates))
wrappedFeatureGates := &featureGatesWrapper{envVarGates}
featureGates.Store(wrappedFeatureGates)

View File

@@ -17,17 +17,67 @@ limitations under the License.
package features
import (
"reflect"
"testing"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/util/version"
)
// TestAddFeaturesToExistingFeatureGates ensures that
// the defaultKubernetesFeatureGates are added to a test feature gates registry.
// the defaultVersionedKubernetesFeatureGates are added to a test feature gates registry.
func TestAddFeaturesToExistingFeatureGates(t *testing.T) {
fakeFeatureGates := &fakeRegistry{}
require.NoError(t, AddFeaturesToExistingFeatureGates(fakeFeatureGates))
require.Equal(t, defaultKubernetesFeatureGates, fakeFeatureGates.specs)
require.Equal(t, unversionedFeatureGates(defaultVersionedKubernetesFeatureGates), fakeFeatureGates.specs)
}
// TestAddVersionedFeaturesToExistingFeatureGates ensures that
// the defaultVersionedKubernetesFeatureGates are added to a versioned test feature gates registry.
func TestAddVersionedFeaturesToExistingFeatureGates(t *testing.T) {
fakeFeatureGates := &fakeVersionedRegistry{}
require.NoError(t, AddVersionedFeaturesToExistingFeatureGates(fakeFeatureGates))
require.Equal(t, defaultVersionedKubernetesFeatureGates, fakeFeatureGates.specs)
}
func TestUnversionedFeatureGates(t *testing.T) {
testCases := []struct {
name string
featureGates map[Feature]VersionedSpecs
expected map[Feature]FeatureSpec
}{
{
name: "multiple features",
featureGates: map[Feature]VersionedSpecs{
"AlphaFeature": {
{Version: version.MustParse("1.30"), Default: false, PreRelease: Alpha},
},
"BetaFeature": {
{Version: version.MustParse("1.28"), Default: false, PreRelease: Alpha},
{Version: version.MustParse("1.30"), Default: true, PreRelease: Beta},
},
"GAFeature": {
{Version: version.MustParse("1.25"), Default: false, PreRelease: Alpha},
{Version: version.MustParse("1.27"), Default: true, PreRelease: Beta},
{Version: version.MustParse("1.29"), Default: true, PreRelease: GA, LockToDefault: true},
},
},
expected: map[Feature]FeatureSpec{
"AlphaFeature": {Default: false, PreRelease: Alpha},
"BetaFeature": {Default: true, PreRelease: Beta},
"GAFeature": {Default: true, PreRelease: GA, LockToDefault: true},
},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
actual := unversionedFeatureGates(tc.featureGates)
if !reflect.DeepEqual(actual, tc.expected) {
t.Errorf("unversionedFeatureGates() = %v, want %v", actual, tc.expected)
}
})
}
}
func TestReplaceFeatureGatesWithWarningIndicator(t *testing.T) {
@@ -47,3 +97,12 @@ func (f *fakeRegistry) Add(specs map[Feature]FeatureSpec) error {
f.specs = specs
return nil
}
type fakeVersionedRegistry struct {
specs map[Feature]VersionedSpecs
}
func (f *fakeVersionedRegistry) AddVersioned(specs map[Feature]VersionedSpecs) error {
f.specs = specs
return nil
}

View File

@@ -16,6 +16,10 @@ limitations under the License.
package features
import (
"k8s.io/apimachinery/pkg/util/version"
)
// Every feature gate should have an entry here following this template:
//
// // owner: @username
@@ -54,30 +58,48 @@ const (
// Refactor informers to deliver watch stream events in order instead of out of order.
InOrderInformers Feature = "InOrderInformers"
// owner: @nilekhc
// owner: @yue9944882
// beta: v1.35
//
// Allow InOrderInformer to process incoming events in batches to expedite the process rate.
InOrderInformersBatchProcess Feature = "InOrderInformersBatchProcess"
// owner: @enj, @michaelasp
// alpha: v1.30
// GA: v1.35
InformerResourceVersion Feature = "InformerResourceVersion"
// owner: @p0lyn0mial
// beta: v1.30
//
// Allow the client to get a stream of individual items instead of chunking from the server.
//
// NOTE:
// The feature is disabled in Beta by default because
// it will only be turned on for selected control plane component(s).
WatchListClient Feature = "WatchListClient"
)
// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
// defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
//
// To add a new feature, define a key for it above and add it here.
// After registering with the binary, the features are, by default, controllable using environment variables.
// For more details, please see envVarFeatureGates implementation.
var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{
ClientsAllowCBOR: {Default: false, PreRelease: Alpha},
ClientsPreferCBOR: {Default: false, PreRelease: Alpha},
InOrderInformers: {Default: true, PreRelease: Beta},
InformerResourceVersion: {Default: false, PreRelease: Alpha},
WatchListClient: {Default: false, PreRelease: Beta},
var defaultVersionedKubernetesFeatureGates = map[Feature]VersionedSpecs{
ClientsAllowCBOR: {
{Version: version.MustParse("1.32"), Default: false, PreRelease: Alpha},
},
ClientsPreferCBOR: {
{Version: version.MustParse("1.32"), Default: false, PreRelease: Alpha},
},
InOrderInformers: {
{Version: version.MustParse("1.33"), Default: true, PreRelease: Beta},
},
InOrderInformersBatchProcess: {
{Version: version.MustParse("1.35"), Default: true, PreRelease: Beta},
},
InformerResourceVersion: {
{Version: version.MustParse("1.30"), Default: false, PreRelease: Alpha},
{Version: version.MustParse("1.35"), Default: true, PreRelease: GA},
},
WatchListClient: {
{Version: version.MustParse("1.30"), Default: false, PreRelease: Beta},
{Version: version.MustParse("1.35"), Default: true, PreRelease: Beta},
},
}

View File

@@ -77,6 +77,7 @@ func setFeatureDuringTestInternal(tb testing.TB, feature clientfeatures.Feature,
overriddenFeaturesLock.Lock()
defer overriddenFeaturesLock.Unlock()
delete(overriddenFeatures, feature)
// if default is not set
if err := featureGates.Set(feature, originalFeatureValue); err != nil {
tb.Errorf("failed restoring client-go feature: %v to its original value: %v, err: %v", feature, originalFeatureValue, err)
}

View File

@@ -23,9 +23,9 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest"
"k8s.io/client-go/util/apply"
)
@@ -318,7 +318,7 @@ func (a *alsoApplier[T, C]) Apply(ctx context.Context, obj C, opts metav1.ApplyO
return result, err
}
// Apply takes the given apply declarative configuration, applies it to the status subresource and returns the applied resource.
// ApplyStatus takes the given apply declarative configuration, applies it to the status subresource and returns the applied resource.
func (a *alsoApplier[T, C]) ApplyStatus(ctx context.Context, obj C, opts metav1.ApplyOptions) (T, error) {
if obj == *new(C) {
return *new(T), fmt.Errorf("object provided to Apply must not be nil")

22
go.mod
View File

@@ -18,17 +18,17 @@ require (
github.com/spf13/pflag v1.0.9
github.com/stretchr/testify v1.11.1
go.uber.org/goleak v1.3.0
golang.org/x/net v0.43.0
golang.org/x/net v0.47.0
golang.org/x/oauth2 v0.30.0
golang.org/x/term v0.34.0
golang.org/x/term v0.37.0
golang.org/x/time v0.9.0
google.golang.org/protobuf v1.36.8
gopkg.in/evanphx/json-patch.v4 v4.13.0
k8s.io/api v0.0.0-20250930152327-c397f90a55bd
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9
k8s.io/api v0.35.6
k8s.io/apimachinery v0.35.6
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730
sigs.k8s.io/randfill v1.0.0
sigs.k8s.io/structured-merge-diff/v6 v6.3.0
@@ -36,29 +36,29 @@ require (
)
require (
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/spdystream v0.5.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

93
go.sum
View File

@@ -1,3 +1,5 @@
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -20,8 +22,6 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
@@ -29,8 +29,8 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
@@ -41,8 +41,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
@@ -52,8 +50,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y=
github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -64,16 +62,16 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM=
github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4=
github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -89,53 +87,30 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -148,16 +123,16 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20250930152327-c397f90a55bd h1:Cg2aqUh0jZZC7BD38J3K2Z6TAvKepgIvsO+e621Gz6M=
k8s.io/api v0.0.0-20250930152327-c397f90a55bd/go.mod h1:zc2Bftemdv4WGe3gh/TWTwdUt5ERkIycxBrRQmuOjtc=
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9 h1:tvHk/t27eNXdAUvzZ2Fz+BvoUpfB+tTnvmWR/ET1s2Q=
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9/go.mod h1:1YSL0XujdSTcnuHOR73D16EdW+d49JOdd8TXjCo6Dhc=
k8s.io/api v0.35.6 h1:phPzP79F3kcONsD2TzmDiITNCV6/1Z5U3CCEcjtsXzI=
k8s.io/api v0.35.6/go.mod h1:GWKUaIp24fuDFigAgnhr9EJOKDqspnwPjYlpDca5B4U=
k8s.io/apimachinery v0.35.6 h1:ASSpfmmsOArKb2Hsu8gGlIcbIcEMVTboI3FfsfYuQ8k=
k8s.io/apimachinery v0.35.6/go.mod h1:NNi1taPOpep0jOj+oRha3mBJPqvi0hGdaV8TCqGQ+cc=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=

View File

@@ -56,7 +56,7 @@ func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resync
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface
}
return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1.MutatingWebhookConfiguration{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
}
return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1.ValidatingAdmissionPolicy{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
}
return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resy
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa
}
return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1.ValidatingWebhookConfiguration{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPerio
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, res
}
return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicies().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicy{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resy
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interfa
}
return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicyBindings().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicyBinding{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
}
return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicies().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicy{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
}
return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPerio
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, res
}
return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicies().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.MutatingAdmissionPolicy{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resy
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interfa
}
return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicyBindings().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBinding{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resync
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface
}
return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.MutatingWebhookConfiguration{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
}
return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicies().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicy{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
}
return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicyBinding{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resy
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa
}
return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
},
}, client),
&apiadmissionregistrationv1beta1.ValidatingWebhookConfiguration{},
resyncPeriod,
indexers,

View File

@@ -56,7 +56,7 @@ func NewStorageVersionInformer(client kubernetes.Interface, resyncPeriod time.Du
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredStorageVersionInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -81,7 +81,7 @@ func NewFilteredStorageVersionInformer(client kubernetes.Interface, resyncPeriod
}
return client.InternalV1alpha1().StorageVersions().Watch(ctx, options)
},
},
}, client),
&apiapiserverinternalv1alpha1.StorageVersion{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
}
return client.AppsV1().ControllerRevisions(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1.ControllerRevision{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncP
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string,
}
return client.AppsV1().DaemonSets(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1.DaemonSet{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewDeploymentInformer(client kubernetes.Interface, namespace string, resync
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string
}
return client.AppsV1().Deployments(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1.Deployment{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resync
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string
}
return client.AppsV1().ReplicaSets(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1.ReplicaSet{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyn
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin
}
return client.AppsV1().StatefulSets(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1.StatefulSet{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
}
return client.AppsV1beta1().ControllerRevisions(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1beta1.ControllerRevision{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewDeploymentInformer(client kubernetes.Interface, namespace string, resync
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string
}
return client.AppsV1beta1().Deployments(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1beta1.Deployment{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyn
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin
}
return client.AppsV1beta1().StatefulSets(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1beta1.StatefulSet{},
resyncPeriod,
indexers,

View File

@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
}
return client.AppsV1beta2().ControllerRevisions(namespace).Watch(ctx, options)
},
},
}, client),
&apiappsv1beta2.ControllerRevision{},
resyncPeriod,
indexers,

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