Compare commits

...

76 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
Lukasz Szaszkiewicz
9c67f4c479 watchlist: wrap remaining LW with ToListWatcherWithWatchListSemantics
Kubernetes-commit: 4fd41778b87a7a02066566cc12e3eb4a87a071ee
2025-10-10 22:44:45 +02:00
Dan Winship
0ca6027179 Belatedly remove references to PreferSameTrafficDistribution being Alpha
Kubernetes-commit: b13564a63c36c9d5f0a8ef7ab6467dc3a9fa0017
2025-10-04 08:31:57 -04: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
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
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
Filip Křepinský
400c0a2602 make update
Kubernetes-commit: 2bf467170e737faa33ba739ee05e6359768a807e
2025-07-20 23:22:21 +02:00
144 changed files with 4340 additions and 1132 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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -18,6 +18,7 @@ package dynamicinformer_test
import (
"context"
"fmt"
"testing"
"time"
@@ -68,6 +69,12 @@ 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",

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)
}

21
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-20251021232006-d8df487630ca
k8s.io/apimachinery v0.0.0-20251021201638-02b0a610061c
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,6 +36,7 @@ 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
@@ -43,21 +44,21 @@ require (
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // 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
)

62
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=
@@ -27,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=
@@ -48,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=
@@ -60,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=
@@ -87,24 +89,28 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
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/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/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.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.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
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=
@@ -117,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-20251021232006-d8df487630ca h1:1vNDv/VJfGz/o/jLSYf7xG7iYKi6bBP/m4baI5cxPHA=
k8s.io/api v0.0.0-20251021232006-d8df487630ca/go.mod h1:D+RtU7jv0GA2DVLDbfm9HWPgrBohD3aD1z4IRzkd1ck=
k8s.io/apimachinery v0.0.0-20251021201638-02b0a610061c h1:pEPsx2W/uEdH18y2EEjl2lns06qH6b6T2/8kaBGUbyU=
k8s.io/apimachinery v0.0.0-20251021201638-02b0a610061c/go.mod h1:wE5nOmI8k5gdg4Nuo6Csst6CE+WgeB7ZNhh7K5lLUbs=
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

@@ -26,8 +26,6 @@ import (
type Interface interface {
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
ClusterTrustBundles() ClusterTrustBundleInformer
// PodCertificateRequests returns a PodCertificateRequestInformer.
PodCertificateRequests() PodCertificateRequestInformer
}
type version struct {
@@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// PodCertificateRequests returns a PodCertificateRequestInformer.
func (v *version) PodCertificateRequests() PodCertificateRequestInformer {
return &podCertificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -28,6 +28,8 @@ type Interface interface {
CertificateSigningRequests() CertificateSigningRequestInformer
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
ClusterTrustBundles() ClusterTrustBundleInformer
// PodCertificateRequests returns a PodCertificateRequestInformer.
PodCertificateRequests() PodCertificateRequestInformer
}
type version struct {
@@ -50,3 +52,8 @@ func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// PodCertificateRequests returns a PodCertificateRequestInformer.
func (v *version) PodCertificateRequests() PodCertificateRequestInformer {
return &podCertificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
context "context"
time "time"
apicertificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
apicertificatesv1beta1 "k8s.io/api/certificates/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
certificatesv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1"
certificatesv1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
@@ -36,7 +36,7 @@ import (
// PodCertificateRequests.
type PodCertificateRequestInformer interface {
Informer() cache.SharedIndexInformer
Lister() certificatesv1alpha1.PodCertificateRequestLister
Lister() certificatesv1beta1.PodCertificateRequestLister
}
type podCertificateRequestInformer struct {
@@ -62,28 +62,28 @@ func NewFilteredPodCertificateRequestInformer(client kubernetes.Interface, names
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(context.Background(), options)
return client.CertificatesV1beta1().PodCertificateRequests(namespace).List(context.Background(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(context.Background(), options)
return client.CertificatesV1beta1().PodCertificateRequests(namespace).Watch(context.Background(), options)
},
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(ctx, options)
return client.CertificatesV1beta1().PodCertificateRequests(namespace).List(ctx, options)
},
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(ctx, options)
return client.CertificatesV1beta1().PodCertificateRequests(namespace).Watch(ctx, options)
},
}, client),
&apicertificatesv1alpha1.PodCertificateRequest{},
&apicertificatesv1beta1.PodCertificateRequest{},
resyncPeriod,
indexers,
)
@@ -94,9 +94,9 @@ func (f *podCertificateRequestInformer) defaultInformer(client kubernetes.Interf
}
func (f *podCertificateRequestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apicertificatesv1alpha1.PodCertificateRequest{}, f.defaultInformer)
return f.factory.InformerFor(&apicertificatesv1beta1.PodCertificateRequest{}, f.defaultInformer)
}
func (f *podCertificateRequestInformer) Lister() certificatesv1alpha1.PodCertificateRequestLister {
return certificatesv1alpha1.NewPodCertificateRequestLister(f.Informer().GetIndexer())
func (f *podCertificateRequestInformer) Lister() certificatesv1beta1.PodCertificateRequestLister {
return certificatesv1beta1.NewPodCertificateRequestLister(f.Informer().GetIndexer())
}

View File

@@ -70,7 +70,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"
schema "k8s.io/apimachinery/pkg/runtime/schema"
cache "k8s.io/client-go/tools/cache"
)
@@ -200,14 +200,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=certificates.k8s.io, Version=v1alpha1
case certificatesv1alpha1.SchemeGroupVersion.WithResource("clustertrustbundles"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().ClusterTrustBundles().Informer()}, nil
case certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().PodCertificateRequests().Informer()}, nil
// Group=certificates.k8s.io, Version=v1beta1
case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil
case certificatesv1beta1.SchemeGroupVersion.WithResource("clustertrustbundles"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().ClusterTrustBundles().Informer()}, nil
case certificatesv1beta1.SchemeGroupVersion.WithResource("podcertificaterequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().PodCertificateRequests().Informer()}, nil
// Group=coordination.k8s.io, Version=v1
case coordinationv1.SchemeGroupVersion.WithResource("leases"):
@@ -426,6 +426,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=scheduling.k8s.io, Version=v1alpha1
case schedulingv1alpha1.SchemeGroupVersion.WithResource("priorityclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().PriorityClasses().Informer()}, nil
case schedulingv1alpha1.SchemeGroupVersion.WithResource("workloads"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().Workloads().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1beta1
case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"):
@@ -467,9 +469,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case storagev1beta1.SchemeGroupVersion.WithResource("volumeattributesclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().VolumeAttributesClasses().Informer()}, nil
// Group=storagemigration.k8s.io, Version=v1alpha1
case storagemigrationv1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1alpha1().StorageVersionMigrations().Informer()}, nil
// Group=storagemigration.k8s.io, Version=v1beta1
case storagemigrationv1beta1.SchemeGroupVersion.WithResource("storageversionmigrations"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1beta1().StorageVersionMigrations().Informer()}, nil
}

View File

@@ -26,6 +26,8 @@ import (
type Interface interface {
// PriorityClasses returns a PriorityClassInformer.
PriorityClasses() PriorityClassInformer
// Workloads returns a WorkloadInformer.
Workloads() WorkloadInformer
}
type version struct {
@@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) PriorityClasses() PriorityClassInformer {
return &priorityClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// Workloads returns a WorkloadInformer.
func (v *version) Workloads() WorkloadInformer {
return &workloadInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -0,0 +1,102 @@
/*
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 informer-gen. DO NOT EDIT.
package v1alpha1
import (
context "context"
time "time"
apischedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
schedulingv1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// WorkloadInformer provides access to a shared informer and lister for
// Workloads.
type WorkloadInformer interface {
Informer() cache.SharedIndexInformer
Lister() schedulingv1alpha1.WorkloadLister
}
type workloadInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewWorkloadInformer constructs a new informer for Workload type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWorkloadInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredWorkloadInformer constructs a new informer for Workload type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).List(context.Background(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).Watch(context.Background(), options)
},
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).List(ctx, options)
},
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).Watch(ctx, options)
},
}, client),
&apischedulingv1alpha1.Workload{},
resyncPeriod,
indexers,
)
}
func (f *workloadInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWorkloadInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *workloadInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apischedulingv1alpha1.Workload{}, f.defaultInformer)
}
func (f *workloadInformer) Lister() schedulingv1alpha1.WorkloadLister {
return schedulingv1alpha1.NewWorkloadLister(f.Informer().GetIndexer())
}

View File

@@ -20,13 +20,13 @@ package storagemigration
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/storagemigration/v1alpha1"
v1beta1 "k8s.io/client-go/informers/storagemigration/v1beta1"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
type group struct {
@@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
context "context"
time "time"
apistoragemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
apistoragemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
storagemigrationv1alpha1 "k8s.io/client-go/listers/storagemigration/v1alpha1"
storagemigrationv1beta1 "k8s.io/client-go/listers/storagemigration/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
@@ -36,7 +36,7 @@ import (
// StorageVersionMigrations.
type StorageVersionMigrationInformer interface {
Informer() cache.SharedIndexInformer
Lister() storagemigrationv1alpha1.StorageVersionMigrationLister
Lister() storagemigrationv1beta1.StorageVersionMigrationLister
}
type storageVersionMigrationInformer struct {
@@ -61,28 +61,28 @@ func NewFilteredStorageVersionMigrationInformer(client kubernetes.Interface, res
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(context.Background(), options)
return client.StoragemigrationV1beta1().StorageVersionMigrations().List(context.Background(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(context.Background(), options)
return client.StoragemigrationV1beta1().StorageVersionMigrations().Watch(context.Background(), options)
},
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(ctx, options)
return client.StoragemigrationV1beta1().StorageVersionMigrations().List(ctx, options)
},
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(ctx, options)
return client.StoragemigrationV1beta1().StorageVersionMigrations().Watch(ctx, options)
},
}, client),
&apistoragemigrationv1alpha1.StorageVersionMigration{},
&apistoragemigrationv1beta1.StorageVersionMigration{},
resyncPeriod,
indexers,
)
@@ -93,9 +93,9 @@ func (f *storageVersionMigrationInformer) defaultInformer(client kubernetes.Inte
}
func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apistoragemigrationv1alpha1.StorageVersionMigration{}, f.defaultInformer)
return f.factory.InformerFor(&apistoragemigrationv1beta1.StorageVersionMigration{}, f.defaultInformer)
}
func (f *storageVersionMigrationInformer) Lister() storagemigrationv1alpha1.StorageVersionMigrationLister {
return storagemigrationv1alpha1.NewStorageVersionMigrationLister(f.Informer().GetIndexer())
func (f *storageVersionMigrationInformer) Lister() storagemigrationv1beta1.StorageVersionMigrationLister {
return storagemigrationv1beta1.NewStorageVersionMigrationLister(f.Informer().GetIndexer())
}

View File

@@ -77,7 +77,7 @@ import (
storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
)
@@ -138,7 +138,7 @@ type Interface interface {
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
StorageV1() storagev1.StorageV1Interface
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface
StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface
}
// Clientset contains the clients for groups.
@@ -198,7 +198,7 @@ type Clientset struct {
storageV1beta1 *storagev1beta1.StorageV1beta1Client
storageV1 *storagev1.StorageV1Client
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
storagemigrationV1alpha1 *storagemigrationv1alpha1.StoragemigrationV1alpha1Client
storagemigrationV1beta1 *storagemigrationv1beta1.StoragemigrationV1beta1Client
}
// AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client
@@ -471,9 +471,9 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
return c.storageV1alpha1
}
// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client
func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface {
return c.storagemigrationV1alpha1
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
return c.storagemigrationV1beta1
}
// Discovery retrieves the DiscoveryClient
@@ -736,7 +736,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil {
return nil, err
}
cs.storagemigrationV1alpha1, err = storagemigrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
cs.storagemigrationV1beta1, err = storagemigrationv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
@@ -815,7 +815,7 @@ func New(c rest.Interface) *Clientset {
cs.storageV1beta1 = storagev1beta1.New(c)
cs.storageV1 = storagev1.New(c)
cs.storageV1alpha1 = storagev1alpha1.New(c)
cs.storagemigrationV1alpha1 = storagemigrationv1alpha1.New(c)
cs.storagemigrationV1beta1 = storagemigrationv1beta1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs

View File

@@ -134,8 +134,8 @@ import (
fakestoragev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
fakestoragemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake"
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
fakestoragemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1/fake"
"k8s.io/client-go/testing"
)
@@ -143,10 +143,6 @@ import (
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
//
// Deprecated: NewClientset replaces this with support for field management, which significantly improves
// server side apply testing. NewClientset is only available when apply configurations are generated (e.g.
// via --with-applyconfig).
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
for _, obj := range objects {
@@ -207,6 +203,10 @@ func (c *Clientset) IsWatchListSemanticsUnSupported() bool {
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
//
// Compared to NewSimpleClientset, the Clientset returned here supports field tracking and thus
// server-side apply. Beware though that support in that for CRDs is missing
// (https://github.com/kubernetes/kubernetes/issues/126850).
func NewClientset(objects ...runtime.Object) *Clientset {
o := testing.NewFieldManagedObjectTracker(
scheme,
@@ -514,7 +514,7 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake}
}
// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client
func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface {
return &fakestoragemigrationv1alpha1.FakeStoragemigrationV1alpha1{Fake: &c.Fake}
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
return &fakestoragemigrationv1beta1.FakeStoragemigrationV1beta1{Fake: &c.Fake}
}

View File

@@ -73,7 +73,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"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -139,7 +139,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
storagev1beta1.AddToScheme,
storagev1.AddToScheme,
storagev1alpha1.AddToScheme,
storagemigrationv1alpha1.AddToScheme,
storagemigrationv1beta1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition

View File

@@ -73,7 +73,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"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -139,7 +139,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
storagev1beta1.AddToScheme,
storagev1.AddToScheme,
storagev1alpha1.AddToScheme,
storagemigrationv1alpha1.AddToScheme,
storagemigrationv1beta1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition

View File

@@ -29,7 +29,6 @@ import (
type CertificatesV1alpha1Interface interface {
RESTClient() rest.Interface
ClusterTrustBundlesGetter
PodCertificateRequestsGetter
}
// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group.
@@ -41,10 +40,6 @@ func (c *CertificatesV1alpha1Client) ClusterTrustBundles() ClusterTrustBundleInt
return newClusterTrustBundles(c)
}
func (c *CertificatesV1alpha1Client) PodCertificateRequests(namespace string) PodCertificateRequestInterface {
return newPodCertificateRequests(c, namespace)
}
// NewForConfig creates a new CertificatesV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@@ -32,10 +32,6 @@ func (c *FakeCertificatesV1alpha1) ClusterTrustBundles() v1alpha1.ClusterTrustBu
return newFakeClusterTrustBundles(c)
}
func (c *FakeCertificatesV1alpha1) PodCertificateRequests(namespace string) v1alpha1.PodCertificateRequestInterface {
return newFakePodCertificateRequests(c, namespace)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertificatesV1alpha1) RESTClient() rest.Interface {

View File

@@ -1,53 +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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/api/certificates/v1alpha1"
certificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
gentype "k8s.io/client-go/gentype"
typedcertificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1"
)
// fakePodCertificateRequests implements PodCertificateRequestInterface
type fakePodCertificateRequests struct {
*gentype.FakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration]
Fake *FakeCertificatesV1alpha1
}
func newFakePodCertificateRequests(fake *FakeCertificatesV1alpha1, namespace string) typedcertificatesv1alpha1.PodCertificateRequestInterface {
return &fakePodCertificateRequests{
gentype.NewFakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration](
fake.Fake,
namespace,
v1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"),
v1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"),
func() *v1alpha1.PodCertificateRequest { return &v1alpha1.PodCertificateRequest{} },
func() *v1alpha1.PodCertificateRequestList { return &v1alpha1.PodCertificateRequestList{} },
func(dst, src *v1alpha1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.PodCertificateRequestList) []*v1alpha1.PodCertificateRequest {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.PodCertificateRequestList, items []*v1alpha1.PodCertificateRequest) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -19,5 +19,3 @@ limitations under the License.
package v1alpha1
type ClusterTrustBundleExpansion interface{}
type PodCertificateRequestExpansion interface{}

View File

@@ -30,6 +30,7 @@ type CertificatesV1beta1Interface interface {
RESTClient() rest.Interface
CertificateSigningRequestsGetter
ClusterTrustBundlesGetter
PodCertificateRequestsGetter
}
// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
@@ -45,6 +46,10 @@ func (c *CertificatesV1beta1Client) ClusterTrustBundles() ClusterTrustBundleInte
return newClusterTrustBundles(c)
}
func (c *CertificatesV1beta1Client) PodCertificateRequests(namespace string) PodCertificateRequestInterface {
return newPodCertificateRequests(c, namespace)
}
// NewForConfig creates a new CertificatesV1beta1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@@ -36,6 +36,10 @@ func (c *FakeCertificatesV1beta1) ClusterTrustBundles() v1beta1.ClusterTrustBund
return newFakeClusterTrustBundles(c)
}
func (c *FakeCertificatesV1beta1) PodCertificateRequests(namespace string) v1beta1.PodCertificateRequestInterface {
return newFakePodCertificateRequests(c, namespace)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface {

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 client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "k8s.io/api/certificates/v1beta1"
certificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1"
gentype "k8s.io/client-go/gentype"
typedcertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
)
// fakePodCertificateRequests implements PodCertificateRequestInterface
type fakePodCertificateRequests struct {
*gentype.FakeClientWithListAndApply[*v1beta1.PodCertificateRequest, *v1beta1.PodCertificateRequestList, *certificatesv1beta1.PodCertificateRequestApplyConfiguration]
Fake *FakeCertificatesV1beta1
}
func newFakePodCertificateRequests(fake *FakeCertificatesV1beta1, namespace string) typedcertificatesv1beta1.PodCertificateRequestInterface {
return &fakePodCertificateRequests{
gentype.NewFakeClientWithListAndApply[*v1beta1.PodCertificateRequest, *v1beta1.PodCertificateRequestList, *certificatesv1beta1.PodCertificateRequestApplyConfiguration](
fake.Fake,
namespace,
v1beta1.SchemeGroupVersion.WithResource("podcertificaterequests"),
v1beta1.SchemeGroupVersion.WithKind("PodCertificateRequest"),
func() *v1beta1.PodCertificateRequest { return &v1beta1.PodCertificateRequest{} },
func() *v1beta1.PodCertificateRequestList { return &v1beta1.PodCertificateRequestList{} },
func(dst, src *v1beta1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta },
func(list *v1beta1.PodCertificateRequestList) []*v1beta1.PodCertificateRequest {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1beta1.PodCertificateRequestList, items []*v1beta1.PodCertificateRequest) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -19,3 +19,5 @@ limitations under the License.
package v1beta1
type ClusterTrustBundleExpansion interface{}
type PodCertificateRequestExpansion interface{}

View File

@@ -16,16 +16,16 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
context "context"
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationscertificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
applyconfigurationscertificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
@@ -38,42 +38,40 @@ type PodCertificateRequestsGetter interface {
// PodCertificateRequestInterface has methods to work with PodCertificateRequest resources.
type PodCertificateRequestInterface interface {
Create(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.CreateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
Update(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
Create(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.CreateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
Update(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
UpdateStatus(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*certificatesv1alpha1.PodCertificateRequestList, error)
Get(ctx context.Context, name string, opts v1.GetOptions) (*certificatesv1beta1.PodCertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*certificatesv1beta1.PodCertificateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1alpha1.PodCertificateRequest, err error)
Apply(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1beta1.PodCertificateRequest, err error)
Apply(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1beta1.PodCertificateRequest, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
ApplyStatus(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1beta1.PodCertificateRequest, err error)
PodCertificateRequestExpansion
}
// podCertificateRequests implements PodCertificateRequestInterface
type podCertificateRequests struct {
*gentype.ClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration]
*gentype.ClientWithListAndApply[*certificatesv1beta1.PodCertificateRequest, *certificatesv1beta1.PodCertificateRequestList, *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration]
}
// newPodCertificateRequests returns a PodCertificateRequests
func newPodCertificateRequests(c *CertificatesV1alpha1Client, namespace string) *podCertificateRequests {
func newPodCertificateRequests(c *CertificatesV1beta1Client, namespace string) *podCertificateRequests {
return &podCertificateRequests{
gentype.NewClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration](
gentype.NewClientWithListAndApply[*certificatesv1beta1.PodCertificateRequest, *certificatesv1beta1.PodCertificateRequestList, *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration](
"podcertificaterequests",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *certificatesv1alpha1.PodCertificateRequest {
return &certificatesv1alpha1.PodCertificateRequest{}
func() *certificatesv1beta1.PodCertificateRequest { return &certificatesv1beta1.PodCertificateRequest{} },
func() *certificatesv1beta1.PodCertificateRequestList {
return &certificatesv1beta1.PodCertificateRequestList{}
},
func() *certificatesv1alpha1.PodCertificateRequestList {
return &certificatesv1alpha1.PodCertificateRequestList{}
},
gentype.PrefersProtobuf[*certificatesv1alpha1.PodCertificateRequest](),
gentype.PrefersProtobuf[*certificatesv1beta1.PodCertificateRequest](),
),
}
}

View File

@@ -40,6 +40,8 @@ type DeviceTaintRulesGetter interface {
type DeviceTaintRuleInterface interface {
Create(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.CreateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
Update(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.DeviceTaintRule, error)
@@ -47,6 +49,8 @@ type DeviceTaintRuleInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.DeviceTaintRule, err error)
Apply(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
DeviceTaintRuleExpansion
}

View File

@@ -32,6 +32,10 @@ func (c *FakeSchedulingV1alpha1) PriorityClasses() v1alpha1.PriorityClassInterfa
return newFakePriorityClasses(c)
}
func (c *FakeSchedulingV1alpha1) Workloads(namespace string) v1alpha1.WorkloadInterface {
return newFakeWorkloads(c, namespace)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeSchedulingV1alpha1) RESTClient() rest.Interface {

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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
gentype "k8s.io/client-go/gentype"
typedschedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
)
// fakeWorkloads implements WorkloadInterface
type fakeWorkloads struct {
*gentype.FakeClientWithListAndApply[*v1alpha1.Workload, *v1alpha1.WorkloadList, *schedulingv1alpha1.WorkloadApplyConfiguration]
Fake *FakeSchedulingV1alpha1
}
func newFakeWorkloads(fake *FakeSchedulingV1alpha1, namespace string) typedschedulingv1alpha1.WorkloadInterface {
return &fakeWorkloads{
gentype.NewFakeClientWithListAndApply[*v1alpha1.Workload, *v1alpha1.WorkloadList, *schedulingv1alpha1.WorkloadApplyConfiguration](
fake.Fake,
namespace,
v1alpha1.SchemeGroupVersion.WithResource("workloads"),
v1alpha1.SchemeGroupVersion.WithKind("Workload"),
func() *v1alpha1.Workload { return &v1alpha1.Workload{} },
func() *v1alpha1.WorkloadList { return &v1alpha1.WorkloadList{} },
func(dst, src *v1alpha1.WorkloadList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.WorkloadList) []*v1alpha1.Workload { return gentype.ToPointerSlice(list.Items) },
func(list *v1alpha1.WorkloadList, items []*v1alpha1.Workload) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -19,3 +19,5 @@ limitations under the License.
package v1alpha1
type PriorityClassExpansion interface{}
type WorkloadExpansion interface{}

View File

@@ -29,6 +29,7 @@ import (
type SchedulingV1alpha1Interface interface {
RESTClient() rest.Interface
PriorityClassesGetter
WorkloadsGetter
}
// SchedulingV1alpha1Client is used to interact with features provided by the scheduling.k8s.io group.
@@ -40,6 +41,10 @@ func (c *SchedulingV1alpha1Client) PriorityClasses() PriorityClassInterface {
return newPriorityClasses(c)
}
func (c *SchedulingV1alpha1Client) Workloads(namespace string) WorkloadInterface {
return newWorkloads(c, namespace)
}
// NewForConfig creates a new SchedulingV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@@ -0,0 +1,71 @@
/*
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 client-gen. DO NOT EDIT.
package v1alpha1
import (
context "context"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// WorkloadsGetter has a method to return a WorkloadInterface.
// A group's client should implement this interface.
type WorkloadsGetter interface {
Workloads(namespace string) WorkloadInterface
}
// WorkloadInterface has methods to work with Workload resources.
type WorkloadInterface interface {
Create(ctx context.Context, workload *schedulingv1alpha1.Workload, opts v1.CreateOptions) (*schedulingv1alpha1.Workload, error)
Update(ctx context.Context, workload *schedulingv1alpha1.Workload, opts v1.UpdateOptions) (*schedulingv1alpha1.Workload, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*schedulingv1alpha1.Workload, error)
List(ctx context.Context, opts v1.ListOptions) (*schedulingv1alpha1.WorkloadList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1alpha1.Workload, err error)
Apply(ctx context.Context, workload *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1alpha1.Workload, err error)
WorkloadExpansion
}
// workloads implements WorkloadInterface
type workloads struct {
*gentype.ClientWithListAndApply[*schedulingv1alpha1.Workload, *schedulingv1alpha1.WorkloadList, *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration]
}
// newWorkloads returns a Workloads
func newWorkloads(c *SchedulingV1alpha1Client, namespace string) *workloads {
return &workloads{
gentype.NewClientWithListAndApply[*schedulingv1alpha1.Workload, *schedulingv1alpha1.WorkloadList, *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration](
"workloads",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *schedulingv1alpha1.Workload { return &schedulingv1alpha1.Workload{} },
func() *schedulingv1alpha1.WorkloadList { return &schedulingv1alpha1.WorkloadList{} },
gentype.PrefersProtobuf[*schedulingv1alpha1.Workload](),
),
}
}

View File

@@ -1,53 +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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/api/storagemigration/v1alpha1"
storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1"
gentype "k8s.io/client-go/gentype"
typedstoragemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
)
// fakeStorageVersionMigrations implements StorageVersionMigrationInterface
type fakeStorageVersionMigrations struct {
*gentype.FakeClientWithListAndApply[*v1alpha1.StorageVersionMigration, *v1alpha1.StorageVersionMigrationList, *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration]
Fake *FakeStoragemigrationV1alpha1
}
func newFakeStorageVersionMigrations(fake *FakeStoragemigrationV1alpha1) typedstoragemigrationv1alpha1.StorageVersionMigrationInterface {
return &fakeStorageVersionMigrations{
gentype.NewFakeClientWithListAndApply[*v1alpha1.StorageVersionMigration, *v1alpha1.StorageVersionMigrationList, *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration](
fake.Fake,
"",
v1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"),
v1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigration"),
func() *v1alpha1.StorageVersionMigration { return &v1alpha1.StorageVersionMigration{} },
func() *v1alpha1.StorageVersionMigrationList { return &v1alpha1.StorageVersionMigrationList{} },
func(dst, src *v1alpha1.StorageVersionMigrationList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.StorageVersionMigrationList) []*v1alpha1.StorageVersionMigration {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.StorageVersionMigrationList, items []*v1alpha1.StorageVersionMigration) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -17,4 +17,4 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1
package v1beta1

View File

@@ -19,22 +19,22 @@ limitations under the License.
package fake
import (
v1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
v1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeStoragemigrationV1alpha1 struct {
type FakeStoragemigrationV1beta1 struct {
*testing.Fake
}
func (c *FakeStoragemigrationV1alpha1) StorageVersionMigrations() v1alpha1.StorageVersionMigrationInterface {
func (c *FakeStoragemigrationV1beta1) StorageVersionMigrations() v1beta1.StorageVersionMigrationInterface {
return newFakeStorageVersionMigrations(c)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeStoragemigrationV1alpha1) RESTClient() rest.Interface {
func (c *FakeStoragemigrationV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

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 client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "k8s.io/api/storagemigration/v1beta1"
storagemigrationv1beta1 "k8s.io/client-go/applyconfigurations/storagemigration/v1beta1"
gentype "k8s.io/client-go/gentype"
typedstoragemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
)
// fakeStorageVersionMigrations implements StorageVersionMigrationInterface
type fakeStorageVersionMigrations struct {
*gentype.FakeClientWithListAndApply[*v1beta1.StorageVersionMigration, *v1beta1.StorageVersionMigrationList, *storagemigrationv1beta1.StorageVersionMigrationApplyConfiguration]
Fake *FakeStoragemigrationV1beta1
}
func newFakeStorageVersionMigrations(fake *FakeStoragemigrationV1beta1) typedstoragemigrationv1beta1.StorageVersionMigrationInterface {
return &fakeStorageVersionMigrations{
gentype.NewFakeClientWithListAndApply[*v1beta1.StorageVersionMigration, *v1beta1.StorageVersionMigrationList, *storagemigrationv1beta1.StorageVersionMigrationApplyConfiguration](
fake.Fake,
"",
v1beta1.SchemeGroupVersion.WithResource("storageversionmigrations"),
v1beta1.SchemeGroupVersion.WithKind("StorageVersionMigration"),
func() *v1beta1.StorageVersionMigration { return &v1beta1.StorageVersionMigration{} },
func() *v1beta1.StorageVersionMigrationList { return &v1beta1.StorageVersionMigrationList{} },
func(dst, src *v1beta1.StorageVersionMigrationList) { dst.ListMeta = src.ListMeta },
func(list *v1beta1.StorageVersionMigrationList) []*v1beta1.StorageVersionMigration {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1beta1.StorageVersionMigrationList, items []*v1beta1.StorageVersionMigration) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -16,6 +16,6 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
type StorageVersionMigrationExpansion interface{}

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