Compare commits

...

1778 Commits

Author SHA1 Message Date
Kubernetes Publisher
2673833c9d Update dependencies to v0.30.12 tag 2025-04-23 06:41:35 +00:00
Kubernetes Publisher
04736883c5 Merge pull request #129521 from KeerthanaAP/automated-cherry-pick-of-#127422-upstream-release-1.30
Automated cherry pick of #127422: Go vet fixes for gotip

Kubernetes-commit: 1f4b5f1ca0c9d0dd83b6d016ee92e86f3e68a78c
2025-01-22 07:14:38 -08:00
Abhishek Kr Srivastav
804c220d8f Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>

Kubernetes-commit: d58b536147a6acfc6bfc6f66de2fe3af973ee88d
2024-09-12 18:15:22 +05:30
Kubernetes Publisher
8a9438e118 Merge pull request #126797 from BenTheElder/automated-cherry-pick-of-#126449-upstream-release-1.30
cherry pick of #126449: kube-up.sh: bump coreDNS to 1.11.3

Kubernetes-commit: 772e3df468681f8327f00425829a60311d8b14e9
2024-08-26 07:39:09 +00:00
Benjamin Elder
cdafd6eb86 update coredns/corefile-migration to v1.0.24 to support coredns v1.11.3
Kubernetes-commit: 2414588ff4d236265c999452159c320797d65b97
2024-08-22 11:21:54 -07:00
Kubernetes Publisher
8981a9a956 Merge pull request #126666 from thockin/automated-cherry-pick-of-#126057-upstream-release-1.30
Automated cherry pick of #126057: make PodIP.IP and HostIP.IP required.

Kubernetes-commit: ad8a5f5994c0949b5da4240006d938e533834987
2024-08-22 11:45:42 +00:00
Lan Liang
f2cf545be1 make PodIP.IP and HostIP.IP required.
Fields used as map keys must be required or defaulted when used in a CRD schema.

see https://github.com/kubernetes/kubernetes/issues/124540

Signed-off-by: Lan Liang <gcslyp@gmail.com>

Kubernetes-commit: 3ba8e9e80ee3123d5936fdfb95095418008a8756
2024-05-16 08:36:27 +00:00
Kubernetes Publisher
274256ef2e Merge pull request #126253 from seans3/automated-cherry-pick-of-#126231-origin-release-1.30
Automated cherry pick of #126231: Falls back to SPDY for gorilla/websocket https proxy

Kubernetes-commit: 42adf451fb20cce68a3de9f170455ba57b409b62
2024-07-29 13:44:03 +00:00
Sean Sullivan
c594704d12 moving for easier cherry-pick
Kubernetes-commit: ae8e580d3a32385797934b4b4d9f190b43f73c40
2024-07-20 05:29:57 -07:00
Sean Sullivan
b6e8438bf5 Falls back to SPDY for gorilla/websocket https proxy error
Kubernetes-commit: 6450174ac9a07f15aecfa5f05d58755efc2192b7
2024-07-19 12:04:41 -07:00
Kubernetes Publisher
4e1652b143 Merge pull request #124694 from pmalek/backport-124553-to-release-1.30
[backport release-1.30]: fix(api): make LocalObjectReference.Name and HostAlias.IP required (#124553)

Kubernetes-commit: 80932fe95b4f0781b8267f93ee258b707181f93d
2024-05-10 08:51:55 +00:00
Patryk Małek
2daa31e071 fix(api): make LocalObjectReference.Name and HostAlias.IP required (#124553)
* fix(api): LocalObjectReference Name a "" default and make HostAlias.IP required

* chore(api): add LocalObjectReference comment

* chore(api): add omitempty to LocalObjectReference's Name

* chore(api): add kubebuilder:default annotation

* chore(api): ./hack/update-codegen.sh

Kubernetes-commit: 37e7cbdd3a6e9dd1044408b157226c53c76fdf71
2024-05-04 00:21:14 +02:00
Kubernetes Publisher
2df4de16d4 Merge remote-tracking branch 'origin/master' into release-1.30
Kubernetes-commit: 255e7919bcb340043b0d235f883fe070017ce18f
2024-04-05 20:12:05 +00:00
Davanum Srinivas
ade2ae2228 Update x/net for CVE-2023-45288
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 99fac38d2864e6bc9bb7cd1743d658caa1360c0c
2024-04-03 16:37:18 -04:00
Kubernetes Publisher
b4632b75ff Merge pull request #123932 from pohly/dra-api-resource-model-rename
dra api: NodeResourceModel -> ResourceModel

Kubernetes-commit: d194e6d06c4f1004cebe00f2c539a564f77276ec
2024-03-27 16:27:28 +00:00
Kubernetes Publisher
4467b1e437 Merge pull request #123909 from AkihiroSuda/fix-123906
kubelet: fix mixing up runtime classes with runtime handlers

Kubernetes-commit: 6ef2fec0dfef0c1fc456fac90d028b5c9431b6a0
2024-03-14 20:57:47 +00:00
Patrick Ohly
650f39267a dra api: NodeResourceModel -> ResourceModel
When renaming NodeResourceSlice to ResourceSlice, the embedded
[Node]ResourceModel also should have been renamed.

Kubernetes-commit: a0add8d2c7578cd9f94fc302d6212f9f7d16175b
2024-03-14 14:08:17 +01:00
Akihiro Suda
00e4609774 api: NodeStatus: rename RuntimeClasses to RuntimeHandlers
The runtime classes are apiserver's concept, while the handlers are kubelet's concept.
For NodeStatus, it makes more sense to return the latter ones here.

This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go
- pkg/kubelet/nodestatus/setters.go
- pkg/kubelet/kubelet_node_status.go
- pkg/registry/core/node/strategy.go
- test/e2e_node/mount_rro_linux_test.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>

Kubernetes-commit: 1dc05009fe7f4e1d139b0c8394683edb54f8d082
2024-03-14 07:21:47 +09:00
Kubernetes Publisher
7ebe0ea60e Merge pull request #123180 from AkihiroSuda/rro
KEP-3857: Recursive Read-only (RRO) mounts

Kubernetes-commit: eafd2897e24b5b069bcdf83ac7a9b2c0b894dbb8
2024-03-09 20:04:20 +00:00
Akihiro Suda
3be09aa8db api: KEP-3857: Recursive Read-only (RRO) mounts
This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>

Kubernetes-commit: d940886d0a4ee9aa8a7ca075fee175b002baf883
2024-03-09 09:48:12 +09:00
Kubernetes Publisher
110b75b14e Merge pull request #123344 from nilekhc/svm-controller
[Storage Version Migration] feat: implements Storage Version Migration

Kubernetes-commit: 28c4d00c7dcc9a72853a4da0885e6fac09a2f40e
2024-03-09 00:05:04 +00:00
Nilekh Chaudhari
02f21344ac feat: implements svm controller
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 9161302e7fd3a5fb055b2f2572c6e1228240bb51
2024-01-04 19:34:05 +00:00
Nilekh Chaudhari
b0efa42e52 feat: implements Storage Version Migration API in-tree
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 91a7708cdcea8cdb1d7db2cc8a27c57741e0cddc
2023-10-10 20:23:08 +00:00
Kubernetes Publisher
84dfaee610 Merge pull request #123516 from pohly/dra-structured-parameters
DRA: structured parameters

Kubernetes-commit: 7ea3d0245a63fbbba698f1cb939831fe8143db3e
2024-03-08 04:03:59 +00:00
Kubernetes Publisher
d2c6177154 Merge pull request #123412 from tenzen-y/add-new-jobsuccesspolicy-api
Job: Support for the SuccessPolicy

Kubernetes-commit: 364ef335dbd49bfa3d66dbc606c642481d283851
2024-03-08 00:04:09 +00:00
Patrick Ohly
fee411cff2 dra api: rename NodeResourceSlice -> ResourceSlice
While currently those objects only get published by the kubelet for node-local
resources, this could change once we also support network-attached
resources. Dropping the "Node" prefix enables such a future extension.

The NodeName in ResourceSlice and StructuredResourceHandle then becomes
optional. The kubelet still needs to provide one and it must match its own node
name, otherwise it doesn't have permission to access ResourceSlice objects.

Kubernetes-commit: 0b6a0d686a060b5d5ff92cea931aacd4eba85adb
2024-03-07 10:14:11 +01:00
Patrick Ohly
4c32855540 dra api: implement semver attribute value type
This adds support for semantic version comparison to the CEL support in the
"named resources" structured parameter model. For example, it can be used to
check that an instance supports a certain API level.

To minimize the risk, the new "semver" type is only defined in the CEL
environment for DRA expressions, not in the base library. See
https://github.com/kubernetes/kubernetes/pull/123664 for a PR which
adds it to the base library.

Validation of semver strings is done with the regular expression from
semver.org. The actual evaluation at runtime then uses semver/v4.

Kubernetes-commit: 42ee56f093133402ed860d4c5f54b049041386c9
2024-03-04 09:13:19 +01:00
Patrick Ohly
95cf817801 dra: add "named resources" structured parameter model
Like the current device plugin interface, a DRA driver using this model
announces a list of resource instances. In contrast to device plugins, this
list is made available to the scheduler together with attributes that can be
used to select suitable instances when they are not all alike.

Because this is the first structured parameter model, some checks that
previously were not possible, in particular "is one structured parameter field
set", now gets enabled. Adding another structured parameter model will be
similar.

The applyconfigs code generator assumes that all types in an API are defined in
a single package. If it wasn't for that, it would be possible to place the
"named resources" types in separate packages, which makes their names in the Go
code more natural and provides an indication of their stability level because
the package name could include a version.

Kubernetes-commit: d4d5ade7f5be047472f8d9572c7f01f142951a2d
2024-02-23 15:22:02 +01:00
Yuki Iwai
49bc97e518 Job: Support for the JobSuccessPolicy (alpha)
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

Kubernetes-commit: e216742672aa1bfd10b5cc84fa9191eddadeac72
2024-02-21 15:49:35 +09:00
Kubernetes Publisher
47abbe0251 Merge pull request #123435 from tallclair/apparmor-ga
AppArmor fields API

Kubernetes-commit: bd25605619cbfb46b075002a6db58b4e489fc8cb
2024-03-07 05:05:16 +00:00
Kubernetes Publisher
0cdc0ce850 Merge pull request #123758 from liggitt/protobump
[CVE-2024-24786] Bump github.com/golang/protobuf v1.5.4, google.golang.org/protobuf v1.33.0

Kubernetes-commit: a5f5f44157c49fdfb6384862c7cb34c2ddbd4cce
2024-03-06 17:05:15 +00:00
Jordan Liggitt
8b11b2fa6b Bump github.com/golang/protobuf v1.5.4, google.golang.org/protobuf v1.33.0
Kubernetes-commit: c6673d2346c814ddb4629c569bdc659ffa0c583f
2024-03-06 09:47:28 -05:00
Kubernetes Publisher
e34b66436f Merge pull request #123405 from cici37/vapGA
[KEP-3488]Promote ValidatingAdmissionPolicy to GA

Kubernetes-commit: 2b521e5f8e6b99e84d464d8fa35658aed35bd13c
2024-03-06 05:02:50 +00:00
Kubernetes Publisher
8c60342479 Merge pull request #123729 from seans3/streaming-owners
Adds OWNERS files to client-go streaming dirs

Kubernetes-commit: 262399065dab3c5aa04fff83f04c2c4d3f3e444b
2024-03-06 00:51:29 +00:00
Kubernetes Publisher
82506389a2 Merge pull request #122998 from MikeSpreitzer/add-deletion-handling
Add DeletionHandlingObjectToName

Kubernetes-commit: 6efef796f6f3ee4825359ec4f77d2c2ee936e363
2024-03-05 21:05:35 +00:00
Michał Woźniak
d1672351e4 Support for the Job managedBy field (alpha) (#123273)
* support for the managed-by label in Job

* Use managedBy field instead of managed-by label

* Additional review remarks

* Review remarks 2

* review remarks 3

* Skip cleanup of finalizers for job with custom managedBy

* Drop the performance optimization

* imrpove logs

Kubernetes-commit: e568a77a931a1cf4239a4a5fa43e2b05bad3abdf
2024-03-05 21:05:30 +00:00
Sean Sullivan
62aace94ab Adds OWNERS files to client-go streaming dirs
Kubernetes-commit: 855bc74023900b31095de72ae49c79d5d391aad5
2024-03-05 20:21:48 +00:00
Kubernetes Publisher
64334495a6 Merge pull request #123487 from gauravkghildiyal/kep-4444
Introduce trafficDistribution field for Kubernetes Services

Kubernetes-commit: a76a3e031fc950a9c2429e611fd0bb00a117b1fc
2024-03-05 04:51:58 +00:00
Kubernetes Publisher
6810f4fa0d Merge pull request #123679 from seans3/remotecommand-extend-deadlines
Extend deadlines to one minute

Kubernetes-commit: 0bcf6e3ddee25621428017e135ce04879b32e659
2024-03-05 04:51:52 +00:00
Kubernetes Publisher
f323801a34 Merge pull request #123413 from seans3/tunneling-spdy-websockets
PortForward: Tunnel SPDY through WebSockets

Kubernetes-commit: f745503112e06d6ff199e929d536c6a29825c01a
2024-03-05 04:51:50 +00:00
Sean Sullivan
ae38726e6e extend deadlines to one minute
Kubernetes-commit: b04d1177efb0cfc84b76732848eef8f0ea89b25b
2024-03-04 11:31:56 -08:00
Sean Sullivan
4b03fda005 re-write fallback dialer unit test
Kubernetes-commit: 33af937b4a5f4eb5c5005bddb483317f042da515
2024-03-04 10:52:59 -08:00
Sean Sullivan
79f21dcaa8 removes extra upgrade aware proxy logging; returns tunneling connection close error
Kubernetes-commit: e8bbb221d36f1adf4116752990c0c4f17a9e5deb
2024-03-02 16:10:39 -08:00
Gaurav Ghildiyal
64b46766f1 Run 'make update'
Kubernetes-commit: 646fd200b8532b0df95df300a8351379315f3ac9
2024-02-23 12:23:32 -08:00
Sean Sullivan
271d034e86 portforward: tunnel spdy through websockets
Kubernetes-commit: 8b447d8c97e8823b4308eb91cf7d75693e867c61
2024-02-21 08:56:07 +00:00
Kubernetes Publisher
08128e0dfa Merge pull request #123635 from seans3/remotecommand-write-deadline
Increase client-side websocket write deadline

Kubernetes-commit: 0a31504ee114e363df9d69158c2e639858b8273b
2024-03-02 08:51:54 +00:00
Kubernetes Publisher
1002c2f9bd Merge pull request #123484 from erikgb/csa-upgrade-subresource
Add option to upgrade subresource from CSA to SSA

Kubernetes-commit: 65d75501f7d7348db1610e755e654b67c6639897
2024-03-02 05:12:54 +00:00
Sean Sullivan
f759d2e976 increases client-side websocket write deadline to 30 seconds
Kubernetes-commit: 1d4be7527f8b2d2c4eb6dcc7ef58b4c3133f6f19
2024-03-01 18:16:44 -08:00
Kubernetes Publisher
d48adf87e6 Merge pull request #122882 from Jefftree/agg-discovery-v2-usage
Use Aggregated Discovery v2 types and promote to GA

Kubernetes-commit: 3f25211d69b4412e3e926835067918f86f629f3e
2024-03-01 14:41:02 -08:00
Erik Godding Boye
0b7086f721 feat: add csaupgrade option to upgrade subresource
Kubernetes-commit: 9633e25579dfa5449450875b9a238acc7cfac3e8
2024-02-24 15:44:21 +01:00
Tim Allclair
db79dcf23b Generated code
Kubernetes-commit: b7f620c12b7f2dbd7907ccad1ca63811a5c5766b
2024-02-20 20:04:35 -08:00
Patrick Ohly
c3231901f2 dra api: add structured parameters
NodeResourceSlice will be used by kubelet to publish resource information on
behalf of DRA drivers on the node. NodeName and DriverName in
NodeResourceSlice must be immutable. This simplifies tracking the different
objects because what they are for cannot change after creation.

The new field in ResourceClass tells scheduler and autoscaler that they are
expected to handle allocation.

ResourceClaimParameters and ResourceClassParameters are new types for telling
in-tree components how to handle claims.

Kubernetes-commit: 39bbcedbcae84bf716923b3f9464968ca70b42e7
2024-02-14 14:38:42 +01:00
cici37
4ceeb096c4 Auto updates
Kubernetes-commit: 5d83282823d5ee728d610befb389e3732b4503c3
2024-02-01 01:00:24 +00:00
Mike Spreitzer
61be9f118e Add DeletionHandlingObjectToName
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>

Kubernetes-commit: d60a25b2db52d7e180b0962e23cc06e71f36fb29
2024-01-26 13:28:06 -05:00
Jefftree
4bf7f9496e Use v2 types with agg discovery
Kubernetes-commit: 462dd326c2e98d937a96d49002883000efe4b2d6
2024-01-19 16:13:47 -05:00
Kubernetes Publisher
1bed3f14c1 Merge pull request #123529 from thockin/go-workspaces
Go workspaces for k/k and k/staging/*

Kubernetes-commit: df366107d16aa2e2cdd620be41e592184f379da4
2024-03-01 20:51:36 +00:00
Kubernetes Publisher
1047f6396b Merge pull request #123598 from liggitt/remotecommand-cleanup
Remotecommand test flake cleanup

Kubernetes-commit: 0d50a398df50b2b7c21ed45c5e186906bc548c7a
2024-02-29 23:59:35 +00:00
Jordan Liggitt
27b1407865 Keep streams from being set up after closeAllStreamReaders is called
Kubernetes-commit: 6c1a935da2df8e6ccf1ea6afcf51cb288f355356
2024-02-29 15:31:55 -05:00
Jordan Liggitt
36a771f98c Make websocket heartbeat test timing less flaky
Kubernetes-commit: 26484df2108eff8ad6e06dfc960eae3bdfbf4663
2024-02-29 15:10:28 -05:00
Tim Hockin
b40bb27cf2 Fix up go.mod files after reviews
Because of how the previous 100+ commits were done, so changes snuck
thru that properly belong in earlier commits but it's not really
possible to do that without a lot of effort.

We agreed it was OK to "spackle" these cracks with a final commit.

Kubernetes-commit: 21715e6bbd19c932576ff268843d8ead3edb05e4
2024-02-28 16:50:55 -08:00
Kubernetes Publisher
d99a76c51e Merge pull request #123542 from liggitt/websocket-round-tripper-protocol
Use the websocket protocol header, verify selected protocol

Kubernetes-commit: e21a2f5d4f010e49cea1b954bd9b31d94e712c5b
2024-02-28 23:01:57 +00:00
Kubernetes Publisher
2f00261364 Merge pull request #123281 from seans3/remote-command-websocket-beta
RemoteCommand over WebSockets to Beta

Kubernetes-commit: f7ca532472f035db2aedc8a1f86639dfd1dc596f
2024-02-28 10:59:48 +00:00
Jordan Liggitt
e8b5ff9ea3 Use the websocket protocol header, verify selected protocol
Kubernetes-commit: b394aac4ce36457bd37459a58b4c3536d2f43d86
2024-02-27 18:00:45 -05:00
Tim Hockin
2c68d64279 Remove old gengo detritus
Kubernetes-commit: 812d5fff4011df4693dcdace516feec30ebff8ba
2024-02-26 23:31:41 -08:00
Sean Sullivan
7eae79e001 remote command turn on feature gates
Kubernetes-commit: a147693deb2e7f040cf367aae4a7ae5d1cb3e7aa
2024-02-13 14:10:40 -08:00
Kubernetes Publisher
8c4efe8d07 Merge pull request #123348 from hoskeri/update-go-x-crypto-19
Update x/crypto to 0.19.

Kubernetes-commit: 9a9028983806af26e7b48223f3a92922e94725df
2024-02-21 20:26:51 +00:00
Kubernetes Publisher
e88f4481f2 Merge pull request #123392 from thockin/depreciate
Cleanup: s/depreciated/deprecated/g

Kubernetes-commit: 11785bb815d58eb553be3a1fa305464c35d860cc
2024-02-21 12:27:26 +00:00
Tim Hockin
7087b65a74 Cleanup: s/depreciated/deprecated/g
Kubernetes-commit: 9f4b82bf3b079fe868effbd2498b61464db6d459
2024-02-18 14:50:55 -08:00
Abhijit Hoskeri
bb04dc47e3 Update x/crypto to 0.19.
Main reason is to pick up updated CA roots.

Full diff: https://github.com/golang/crypto/compare/v0.16.0...v0.19.0

Kubernetes-commit: d3a0e296defbb0b55e591e273004e79e7ebfb1fd
2024-02-16 20:18:14 +00:00
Kubernetes Publisher
306b201a2d Merge pull request #123250 from benluddy/dep-bump-cbor-v2.6.0
Bump github.com/fxamacker/cbor/v2 to v2.6.0.

Kubernetes-commit: e305e773bbfe8c5bdf9c57881a875e168b004b8c
2024-02-15 01:24:42 +00:00
Ben Luddy
d23a110967 Bump github.com/fxamacker/cbor/v2 to v2.6.0.
Kubernetes-commit: aac43dc96f2b679f0ab030fd3512c7e03b0f2df4
2024-02-12 15:46:17 -05:00
Kubernetes Prow Robot
dc532e7975 Merge pull request #1294 from dnwe/compatibility-matrix
chore(docs): refresh compatibility matrix
2024-02-13 10:38:36 -08:00
Kubernetes Publisher
5fb8d886b5 Merge pull request #122152 from pohly/client-go-event-context-fix
client-go events: support context.Background() as context

Kubernetes-commit: e51e3c74f720cd299e10a5e0c500a749bb36c251
2024-02-12 17:23:58 +00:00
Kubernetes Publisher
790cfadf62 Merge pull request #121486 from benluddy/cbor-stub
KEP-4222: Add stub CBOR serializer.

Kubernetes-commit: 48228bf9dbac308f43abd59a53fdc069fbddee0f
2024-02-10 01:28:08 +00:00
José Carlos Chávez
76174b8af8 chore: adds consistent vanity import to files and provides tooling for verifying and updating them. (#120642)
* chore: drops update vanity imports from script.

* chore: changes copyright year to 2024.

* chore: makes lint happy.

Kubernetes-commit: 6d6398ef9266abce3518a4c9a3d4e4d8feeffdc1
2024-02-08 13:38:07 +00:00
Dominic Evans
3d92ad924f chore(docs): refresh compatibility matrix
Bring the compatibility matrix up-to-date with more recent versions of
Kubernetes

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
2024-01-24 18:28:43 +00:00
Kubernetes Publisher
8092c71d36 Merge pull request #119398 from IvoGoman/feat/clientconfig-override-raw
k8s.io/client-go: add ClientConfig option to override raw config

Kubernetes-commit: a1ffdedf782edf1472102b0b99c1467d4ed39753
2024-01-24 02:12:19 +01:00
Tim Hockin
6458380755 Remove defunct references to "vendor"
Kubernetes-commit: d772f7719dc55ebfec2e9461b6e14bf17f5301df
2024-01-15 15:56:21 -08:00
Tim Hockin
b0062217a2 Get rid of most references to GOPATH
Kubernetes-commit: 10c32b3e2f4345dab582270b1a202dcd92dabd34
2024-01-03 17:14:38 -08:00
Tim Hockin
f1ec2cd017 Make update-codegen conversion work on gengo/v2
Kubernetes-commit: 5475797f4330dfd059773dd83e63f09f9b4f617a
2023-12-29 15:08:57 -08:00
Tim Hockin
94320f8765 Re-vendor latest kube-openapi and gengo/v2
./hack/pin-dependency.sh k8s.io/kube-openapi latest
./hack/pin-dependency.sh k8s.io/gengo/v2 latest
./hack/update-vendor.sh

Kubernetes-commit: 6f2f3735e04df5e4822176a2784069634c3c74a3
2024-02-26 17:02:22 -08:00
Patrick Ohly
2231ff5ae4 client-go events: support context.Background() as context
If, for whatever reason, the context was context.Background(), the additional
goroutine was started and then got stuck forever because
context.Background().Done() is a nil channel. Found when indirectly
instantiating a broadcaster with such a context:

    found unexpected goroutines:
    [Goroutine 9106 in state chan receive (nil chan), with k8s.io/kubernetes/vendor/k8s.io/client-go/tools/record.NewBroadcaster.func1 on top of the stack:
	goroutine 9106 [chan receive (nil chan)]:
	k8s.io/kubernetes/vendor/k8s.io/client-go/tools/record.NewBroadcaster.func1()
		/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/record/event.go:206 +0x2c
	created by k8s.io/kubernetes/vendor/k8s.io/client-go/tools/record.NewBroadcaster in goroutine 8957
		/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/record/event.go:205 +0x1a5

This can be fixed by checking for a nil channel.

Another problem also gets addressed: if Shutdown was called without canceling
the context, the goroutine also didn't stop. Now it waits for the cancelation
context and thus terminates in both cases.

Kubernetes-commit: eed6e29a5b8cfaa20fbc426541d9c74105d430ee
2023-12-01 18:35:28 +01:00
Ben Luddy
dc967a1ca9 Update vendoring to take new CBOR library dependency.
Kubernetes-commit: 09a1abda998fc37e2e29a120a82be7c6271656e0
2023-10-17 16:51:52 -04:00
Ivo Gosemann
89528c43be k8s.io/client-go: add OverridingClientConfig overriding RawConfig
Kubernetes-commit: 740b4c456d731922196f8231df9ab585198696d6
2023-07-18 13:40:12 +02:00
Ivo Gosemann
17b5405ddb k8s.io/client-go: add ClientConfig option to override raw config
Kubernetes-commit: db80aa56ed8bcf4115e30fc62d27c8a8d8ec7f92
2023-07-18 13:40:12 +02:00
Kubernetes Publisher
657d7be98b Merge pull request #122873 from p0lyn0mial/upstream-reflector-usewatchlist-pointer
client-go/reflector: make UseWatchList a pointer

Kubernetes-commit: 445869a59bdbd1c587b72b52c5da94c1d1c316a1
2024-01-22 18:20:58 +01:00
Lukasz Szaszkiewicz
202c415847 client-go/reflector: make UseWatchList a pointer
until #115478(use streaming against the etcd storage)
is resolved the cacher need a way to disable the streaming.

Kubernetes-commit: 41e706600aea7468f486150d951d3b8948ce89d5
2024-01-19 13:48:29 +01:00
Kubernetes Publisher
ffe7bf60eb Merge pull request #122842 from pohly/klog-update
dependencies: klog v2.120.1

Kubernetes-commit: b27b56a46c4c1e6be0dc2b1a0230d86223a7e903
2024-01-18 21:21:59 +00:00
Kubernetes Publisher
7e651e598d Merge pull request #122839 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.15.0, gomega v1.31.0

Kubernetes-commit: c82da711b0e2184f851675aac4596bbd0f74763f
2024-01-18 21:21:57 +00:00
Patrick Ohly
b2c0677f40 dependencies: klog v2.120.1
Kubernetes-commit: e2222f1e304831cbbc57b61afa373612297055fb
2024-01-18 16:58:40 +01:00
Patrick Ohly
eab7383fd8 dependencies: ginkgo v2.15.0, gomega v1.31.0
The main reason for updating is support for reporting the cause of context
cancellation: Ginkgo provides that information when canceling a context and
Gomega polling code includes that when generating a failure message.

Kubernetes-commit: 18f0af1f000f95749ca1ea075d62ca89e86bb7da
2024-01-18 12:45:55 +01:00
Kubernetes Publisher
aa81cb55f0 Merge pull request #122142 from pohly/client-go-events-adapter-context
client-go events: also support context for NewEventBroadcasterAdapter

Kubernetes-commit: a02a00ecd76fb99ed43a054ed6eb6698426b01f9
2024-01-18 09:21:31 +00:00
Kubernetes Publisher
b13c4f4b00 Merge pull request #122571 from p0lyn0mial/upstream-client-go-watch-list-fg
client-go/features: introduce WatchListClient feature gate

Kubernetes-commit: 026a27e5eb431c553d1204817cbf09f1005eca9b
2024-01-15 21:21:53 +00:00
Kubernetes Publisher
fb1e77b992 Merge pull request #122706 from pacoxu/klog-upgrade
bump klog to  v2.120.0

Kubernetes-commit: 823ecb58f68fbe0a4b37b32e11e75c6f2e0f467c
2024-01-11 21:21:47 +00:00
Paco Xu
a3cbf5a7be bump klog to v2.120.0
Kubernetes-commit: 3c86d21316c25b52a1cf3f9703a0bc2cbe97131c
2024-01-11 17:35:07 +08:00
Kubernetes Publisher
b0cf21f3e8 Merge pull request #122555 from p0lyn0mial/upstream-client-go-fg-provider-with-types
client-go/features: introduce feature gates

Kubernetes-commit: 0341e8294abffdfbdd4a038e0fd49d7f35ddc30a
2024-01-10 20:49:12 +01:00
Lukasz Szaszkiewicz
e8a81a3a43 client-go/features: warn when ordering initialization issue
ReplaceFeatureGates logs a warning when the default env var
implementation has been already used.
Such a situation indicates a potential ordering issue and usually is unwanted.

Kubernetes-commit: 04bbd3481f70825eea54b4b154a04d2496dcf652
2024-01-10 17:15:01 +01:00
Lukasz Szaszkiewicz
49ba51431a client-go/features: introduce WatchListClient feature gate
Kubernetes-commit: 7773b0f53fd5003c1e018321efb791e8980cd02f
2024-01-03 13:32:02 +01:00
Lukasz Szaszkiewicz
9f8ed7bc90 client-go/features: move the defaultKubernetesFeatureGates variable to the new file
Kubernetes-commit: 57ec7d20e89990d62ef85835cd37cc32ea6a418e
2024-01-03 13:24:35 +01:00
Lukasz Szaszkiewicz
ca4f3a73f7 client-go/features: introduce feature gates
This PR add a feature gates mechanisim to client-go
as described in https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs

In particular:
  - Adds a default feature gate implementation based on environment variables.
  - Adds a set of methods for reading, overwriting the default implementation, and adding features to an external registry.

Co-authored-by: deads2k <deads@redhat.com>
Co-authored-by: Ben Luddy <bluddy@redhat.com>

Kubernetes-commit: d74c57d4f592d20a992afb54b1ee64f56215210e
2024-01-02 12:46:15 +01:00
Kubernetes Publisher
5a0a424792 Merge pull request #122412 from MadhavJivrajani/bump-go-tools
[go1.22] .*: bump golang.org/x/tools to v0.16.1

Kubernetes-commit: 8a4403a9e5127d2ec3f596c4ce75663e5392cb18
2023-12-20 17:30:06 +00:00
Madhav Jivrajani
4106282f90 .*: bump golang.org/x/tools to v0.16.1
Bumping tools to include the fix for a nil pointer
deref error in go/types. See golang/go#64812
for more details.

This fix is needed for when we bump to go1.22.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: a8da4202c0ac785d57b545e6e310fd754888b50e
2023-12-20 14:31:31 +05:30
Kubernetes Publisher
96e9c8d6f1 Merge pull request #122395 from pohly/ginkgo-gomega-update
dependencies: gomega v1.30.0 + ginkgo v2.13.2

Kubernetes-commit: 7897910469aa091ebf6576740d055a7137fa147c
2023-12-20 09:21:10 +00:00
Patrick Ohly
abce78fd54 dependencies: gomega v1.30.0 + ginkgo v2.13.2
The new gomega.BeTrueBecause and gomega.BeFalseBecause are going to be useful
for https://github.com/kubernetes/kubernetes/issues/105678.

Kubernetes-commit: c8f9ebfb72b6569b4e2ec9733f6998afc6602135
2023-12-19 16:16:02 +01:00
Kubernetes Publisher
0a514be22c Merge pull request #122310 from weilaaa/use_buildin_max_min_instead
use build-in max and min func to instead of k8s.io/utils/integer funcs

Kubernetes-commit: 2b5c0c281d7d3b75ed7df683f09339147c4a17e9
2023-12-18 21:19:57 +00:00
weilaaa
c609c97b33 use build-in max and min func to instead of k8s.io/utils/integer funcs
Kubernetes-commit: eb8f3f194fed16484162aebdaab69168e02f8cb4
2023-12-15 15:09:11 +08:00
Ricardo Lopes
12b0e099db Migrate client-go/metadata to contextual logging (#122225)
* client-go: migrate metadata to contextual logging

Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>

* client-go: test for metadata contextual logs

Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>

* refactor: extract context for table driven testing

Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>

* refactor: pass context as first parameter

Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>

---------

Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>

Kubernetes-commit: 86ab185fa1e98e249fe3e380217099832fe22a4e
2023-12-14 06:26:45 +00:00
Kubernetes Publisher
e3d7e06bd6 Merge pull request #122069 from linxiulei/le_opt0
Optimistically update leader lock

Kubernetes-commit: 583a79a4569b5cbbff12131ebcc612d5cf659ae1
2023-12-14 05:20:06 +00:00
Kubernetes Publisher
feecac4b44 Merge pull request #121759 from thockin/fix_api_violations
Fix "list_type_missing" API violations in meta/v1

Kubernetes-commit: 8a22571ebb7628b2dd2c2faf453293040b7efaef
2023-12-14 01:20:15 +00:00
Kubernetes Publisher
9434e7539b Merge pull request #117046 from howardjohn/client/add-indexer-after-start
client-go: allow adding indexes after informer starts

Kubernetes-commit: db82260c65df9cedaf93e924a2401b4e55a8a2a0
2023-12-13 21:20:02 +00:00
Patrick Ohly
8468c261bc client-go events: also support context for NewEventBroadcasterAdapter
27a68aee3a4834 introduced context support. In order to use that
also with NewEventBroadcasterAdapter, a variant of the call is needed to allow
the caller to specify the context.

The `logcheck:context` comment ensures that code which is meant to be
contextual uses the new call.

Kubernetes-commit: f8e25eff926c640c86daa46222bfaf8d625e75d7
2023-12-01 09:00:59 +01:00
Eric Lin
2a48f1ee02 leaderelection: Instrument for when slowpath is exercised
Signed-off-by: Eric Lin <exlin@google.com>

Kubernetes-commit: 1e54c050936be1a1e3e5758718ebca86096dbaea
2023-11-27 13:10:24 +00:00
Eric Lin
3c7c00d2d6 leaderelection: optimistically update leader lock
Signed-off-by: Eric Lin <exlin@google.com>

Kubernetes-commit: 1d9f7fd516b4787f5ef32692711d5ae3031e794e
2023-11-25 22:04:32 +00:00
Tim Hockin
e9d1484a8e Re-vendor k8s.io/kube-openapi
./hack/pin-dependency.sh k8s.io/kube-openapi 778a5567bc1edaed92a4de9c07f90199c67953fa

./hack/update-vendor.sh

Kubernetes-commit: 1f55357d9937f076f532a2c1aa104593b9f6c49a
2023-11-13 10:59:57 -08:00
Kubernetes Publisher
84a6fe7e40 Merge pull request #121808 from cpanato/go-update-main
[go] Bump images, dependencies and versions to go 1.21.4

Kubernetes-commit: 6ba7258a0f3f73629560fc30016b2e35c8e7ae9c
2023-11-13 17:17:42 +00:00
cpanato
7f07a956f8 update go.mod
Signed-off-by: cpanato <ctadeu@gmail.com>

Kubernetes-commit: 9e5b8402bb95eb82541099e77c3a8b0ccd31297f
2023-11-08 08:46:15 -06:00
Kubernetes Publisher
86d49e7265 Merge pull request #113374 from ahmedtd/kep-3257-projected-types
Implement ClusterTrustBundlePEM projected volume

Kubernetes-commit: 9f319c32064f8b72d368df65fde4e37e250f8230
2023-11-04 01:16:34 +00:00
John Howard
785e19661f client-go: allow adding indexes after informer starts
Kubernetes-commit: d96a9858d396d7f418d24ea47bdc92ef8429f707
2023-03-31 15:57:18 -07:00
Taahir Ahmed
59c256a926 Regenerate for ClusterTrustBundlePEM projected volume API
Kubernetes-commit: 599fdb7adde5658dadb6a149c40624b4342fc909
2023-01-24 21:19:59 -08:00
Taahir Ahmed
ac369c3042 Define ClusterTrustBundlePEM projected volume
This commit defines the ClusterTrustBundlePEM projected volume types.
These types have been renamed from the KEP (PEMTrustAnchors) in order to
leave open the possibility of a similar projection drawing from a
yet-to-exist namespaced-scoped TrustBundle object, which came up during
KEP discussion.

* Add the projection field to internal and v1 APIs.
* Add validation to ensure that usages of the project must specify a
  name and path.
* Add TODO covering admission control to forbid mirror pods from using
  the projection.

Part of KEP-3257.

Kubernetes-commit: ecfdc8fda55923c18708488ec1561a4fcf9f3e33
2022-10-21 19:50:01 -07:00
Kubernetes Publisher
66e57f7675 Merge pull request #121552 from pohly/klog-update
klog v2.110.1 update

Kubernetes-commit: da61382068671c3e16782a9b45e7f2159ac0feb9
2023-11-01 17:16:20 +00:00
Patrick Ohly
8b96b9b888 dependencies: klog v2.110.1
Dropping a newline at the end of the message when using klog calls is an
intentional improvement (https://github.com/kubernetes/klog/pull/378)

Kubernetes-commit: 878d037d3ba8fc4f11bf45a6cf5a66301ba89d82
2023-10-16 10:03:54 +02:00
Kubernetes Publisher
c13269dd6b Merge pull request #116516 from aojea/servicecidr
KEP-1880 Multiple ServiceCIDR ( and IPAddress allocation)

Kubernetes-commit: 6abff7457e3a722fd217a0a58d1992b4002d496d
2023-11-01 05:16:07 +00:00
Kubernetes Publisher
7523a344f7 Merge pull request #121575 from apelisse/update-smd
Update sigs.k8s.io/structured-merge-diff to v4.4.0

Kubernetes-commit: 593a17d3b6381bfdbf3bc3b36f56cad30d1531df
2023-11-01 01:17:35 +00:00
Kubernetes Publisher
965bc8db9d Merge pull request #121104 from carlory/kep-3751-api-changes
[KEP-3571] introduce the VolumeAttributesClass API

Kubernetes-commit: dba565193c2d59e9d5bf08fb29b8662616afe087
2023-10-31 21:16:17 +00:00
carlory
6278c99b77 generated changes
Kubernetes-commit: 56ab6c5942171cd1e598fc7c25a21f5aa457f36f
2023-10-31 10:13:04 +08:00
Kubernetes Publisher
477cb782cf Merge pull request #121089 from tkashem/apf-v1
Promote APF API to v1

Kubernetes-commit: f5a5d83d7c027aba86e18c52da8ec4cd14179be3
2023-10-31 05:16:14 +00:00
Antonio Ojea
60aa89a1ab make update with the new API with arrays
Kubernetes-commit: fee07ad6080ccd6e0e8241e10b1b0330f57c64be
2023-10-29 19:01:10 +00:00
Abu Kashem
5a34ab53bd apiserver: add generated files for flowcontrol api change
Kubernetes-commit: 730d10a8fb918e75c22d57267adf34a8fbb5cee1
2023-10-27 19:27:07 -04:00
Antoine Pelisse
ce4f256a25 Update sigs.k8s.io/structured-merge-diff to v4.4.1
Kubernetes-commit: dec443b305a0240f2a9d7726c6a0c46beec19a1a
2023-10-27 10:21:06 -07:00
Antonio Ojea
824910b3a9 make update
Change-Id: I4007d4f6dda24b5c74f602d35191556f315de222

Kubernetes-commit: 8182c4d9ec8c254d7291f7b451bfe47aadc1c691
2023-10-18 00:37:58 +00:00
Abu Kashem
20fd67fa15 apiserver: generate code for apf flowcontrol v1 API
run:
- hack/update-codegen.sh
- hack/update-openapi-spec.sh

Kubernetes-commit: 5972037ffd6c1aea0f1c99ed430d1d78204a48a0
2023-10-10 13:49:38 -04:00
Kubernetes Publisher
30eba26adb Merge pull request #121524 from carlory/gomega
bump gomega to 1.29.0

Kubernetes-commit: ec297aa13a03f53f04023cd897af50dbfed31e0f
2023-10-27 17:30:27 +00:00
carlory
8ec95e1869 bump gomega to 1.29.0
Kubernetes-commit: 760abc2a82130d45607eeead4011afa8b0f81e6d
2023-10-26 09:47:49 +08:00
Kubernetes Publisher
4028f5ba6e Merge pull request #121338 from dims/working-otel-bump
Bump otel and other dependencies for CVE-2023-45142

Kubernetes-commit: d0084356b3cabdafcfc140d19ad8d544b2fc9b5d
2023-10-26 09:15:29 +00:00
Davanum Srinivas
08f1ffe578 working-config-otel
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 702d911e22604aa69b42f77804c27caaab7e4def
2023-10-18 18:47:37 -04:00
Kubernetes Publisher
e2e59f3539 Merge pull request #119186 from seans3/stream-translator-proxy
Stream Translator Proxy and FallbackExecutor for WebSockets

Kubernetes-commit: 87981480f33790225628824943217bd6bb7564bb
2023-10-24 17:15:43 +00:00
Kubernetes Publisher
c92537416a Merge pull request #120397 from ty-dc/StaticCheck
cleanup: omit comparison with bool constants

Kubernetes-commit: 441d4b54aec4eebbe55d9c3519691eb9833fa486
2023-10-24 03:51:50 +00:00
Kubernetes Publisher
b0036672f5 Merge pull request #116065 from sanposhiho/match-label-key-alternative
feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity

Kubernetes-commit: 581552eaf0b4a6689f2a02012804f2780ff7efdf
2023-10-23 19:48:20 +00:00
Kubernetes Publisher
5f697abdfd Merge pull request #121363 from p0lyn0mial/upstream-reflector-consistency-check
client-go/reflector: introduce a data consistency check for the watch-list feature.

Kubernetes-commit: 0dc900cebe079efaf2087adc6fee6eb88d176020
2023-10-23 15:59:07 +00:00
Kubernetes Publisher
33d14001db Merge pull request #120757 from alexzielenski/apiserver/openapi/invalid-default
Update `kube-openapi` to Remove invalid defaults from fields with custom marshalling

Kubernetes-commit: 31c679f65cbf62efec7597133e6d8e78d8473c4d
2023-10-20 23:24:14 +00:00
Alexander Zielenski
b5925219d4 update generated code and openapi
Kubernetes-commit: 0a6d9531f40f63543591d1515deb2ac05b4c62f3
2023-10-17 17:09:48 -07:00
Alexander Zielenski
30f741e67c pin openapi
Kubernetes-commit: 4d21a23be35a03852e0e7b188de11d9f8dc6bc57
2023-10-17 16:48:10 -07:00
Kubernetes Publisher
435ce6f2a8 Merge pull request #121010 from Jefftree/decouple-openapi-v2v3-config
Decouple openapi v2v3 config

Kubernetes-commit: ac66f3d466caee27bcc0f66a04ceec9bf63750bd
2023-10-16 23:13:08 +00:00
Kubernetes Publisher
9f0ec66a5d Merge pull request #119802 from takirala/tga/update-ErrGroupDiscoveryFailed
client-go: chore: implement `Is` interface for `ErrGroupDiscoveryFailed`

Kubernetes-commit: b5cc6aab484ef048a84a0965f288d035f0e5f298
2023-10-16 23:13:06 +00:00
Kubernetes Publisher
17c66cc83d Merge pull request #119026 from AxeZhan/sleepAction
Introducing Sleep Action for PreStop Hook

Kubernetes-commit: f6ba25fdbda1f6159ad63dcbb16f394b98d3a2c8
2023-10-16 23:13:05 +00:00
AxeZhan
5cf64182aa codegen
Kubernetes-commit: 5c0618b848d9e0d7fbcb2d7a5c41e85735c173fd
2023-10-16 19:50:28 +08:00
Kubernetes Publisher
52c50bf6c0 Merge pull request #121229 from aojea/remove_cluster_cidr
remove ClusterCIDR alpha API

Kubernetes-commit: 4d8a51acacaf0df9bfbaee8cd43f15dbdc85b146
2023-10-15 03:12:51 +00:00
Kubernetes Publisher
46e82c57b2 Merge pull request #120248 from pacoxu/grpc-container-probe
remove feature gate GRPCContainerProbe

Kubernetes-commit: 43e617f2521e9f52156aba9822245a2b5eb773f1
2023-10-14 23:13:14 +00:00
Antonio Ojea
656ec39ea1 remove ClusterCIDR
KEP-2593 proposed to expand the existing node-ipam controller
to be configurable via a ClusterCIDR objects, however, there
were reasonable doubts on the SIG about the feature and after
several months of dicussions we decided to not move forward
with the KEP intree, hence, we are going to remove the existing
code, that is still in alpha.

https://groups.google.com/g/kubernetes-sig-network/c/nts1xEZ--gQ/m/2aTOUNFFAAAJ

Change-Id: Ieaf2007b0b23c296cde333247bfb672441fe6dfc

Kubernetes-commit: c2d473f0d438cedab2f1831d23457d24961e0f4e
2023-10-13 21:31:29 +00:00
Kubernetes Publisher
bc7002f524 Merge pull request #120735 from Jefftree/request-body
Bump kube-openapi with v3 marshal and requestBody required marking

Kubernetes-commit: e93e8eac0ef1b26384e5481b67c7d04fe211a243
2023-10-12 23:17:34 +00:00
Jefftree
f68660d6a7 bump kube-openapi
Kubernetes-commit: e3098225eaf7b5bb9d5de1f259c2dbdc2062faa8
2023-10-12 18:22:05 -04:00
Kubernetes Publisher
d02858f519 Merge pull request #121106 from aojea/ipaddress_uid
Remove Ipaddress uid

Kubernetes-commit: f9d987c7c8dfa36f096c38454c1ae672bb0eb56c
2023-10-12 03:13:00 +00:00
Arda Güçlü
57d597c1d6 Add shortname ambiguity warning in shortcut expander (#117668)
* Add warning handler callback function in shortcut expander

Currently, errors in client-go are propagated back to the callers via
function returns. However, there is no elegant way for just warning users.
For example, when user wants to get a resource with it's short name format
and if there are multiple resources belonging to this short name, we need to
warn user about this ambugity which one is picked and which ones are discarded.

Not only to overcome this particular case mentioned above, but also propose a
way for the possible warnings in the future, this commit adds a warningHandler
callback function in shortcutExpander.

* Add warningPrinter functionality in ConfigFlags

ConfigFlags has neither warning user in a standardized
format functionality nor passing warning callback functions to other upper level
libraries such as client-go.

This commit adds an ability that user can set warningPrinters
according to their IOStreams and this warningPrinters will be used
to raise possible warnings happening not only in cli-runtime but
also in client-go.

* Pass warning callback function in ConfigFlags to shortcutExpander

This commit passes warning callback function to print possible
warnings happened in shortcut expander to warn user in a
standardized format.

* Add integration test for CRDs having ambiguous short names

This commit adds integration test to assure that warning message
related to this ambiguity is printed when resources are being retrieved via their short name
representations in cases where multiple resources have same
short names.

This integration test also ensures that the logic behind which resource
will be selected hasn't been changed which may cause disperancies in
clusters.

* Remove defaultConfigFlag global variable

* Move default config flags initialization into function

* Skip warning for versions of same group/resource

* Run update-vendor

* Warn only once when there are multiple versions registered for ambiguous resource

* Apply gocritic review

* Add multi-resource multi-version ambiguity unit test

Kubernetes-commit: a504aed54d028dbc8ea2508142c94d309f5f1ec6
2023-10-11 18:04:11 +03:00
Kubernetes Publisher
cf4002bbbf Merge pull request #121111 from dashpole/update_otel_deps
Update OpenTelemetry Dependencies

Kubernetes-commit: eafebcc9e368d6aeaab0ce5ec4fd56b94174d0c4
2023-10-11 07:12:43 +00:00
Antonio Ojea
55f8f3ffa2 make update
Change-Id: I61be34cff942264acb2f45fe7e1c8538f807cb4e

Kubernetes-commit: e9957d79aae244d3a956d9f7634ad45a9a3364b4
2023-10-10 11:01:56 +00:00
Lukasz Szaszkiewicz
0f984dc7fc client-go/reflector: introduce a data consistency mechanism for the watch-list feature.
checkWatchListConsistencyIfRequested performs a data consistency check only when
the KUBE_WATCHLIST_INCONSISTENCY_DETECTOR environment variable was set during a binary startup.

The consistency check is meant to be enforced only in the CI, not in production.
The check ensures that data retrieved by the watch-list api call
is exactly the same as data received by the standard list api call.

Note that this function will panic when data inconsistency is detected.
This is intentional because we want to catch it in the CI.

Kubernetes-commit: b31e7793d0d873a71c90caf8455556aa905cf88d
2023-10-06 14:26:47 +02:00
John Howard
0b5d6dfee7 dependencies: update otel-go dependencies
Kubernetes-commit: dc334b953d99f233b56ec2cd78bff218a00152a0
2023-10-05 12:52:33 -07:00
Kubernetes Publisher
b4ee45cc0a Merge pull request #121117 from MadhavJivrajani/bump-x-net
[CVE-2023-39325] .: bump golang.org/x/net to v0.17.0

Kubernetes-commit: 7ee2af5cc5fee6a6f837975a70a35ce681a8e9d4
2023-10-10 19:13:10 +00:00
Madhav Jivrajani
9f19d0f211 .: bump golang.org/x/net to v0.17.0
Bumping golang.org/x/net in light of CVE-2023-39325 and CVE-2023-44487.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: fc7c951d5a5b8b75dfa105e3bea7bbddaf4c792e
2023-10-10 23:07:19 +05:30
Kubernetes Publisher
9518c802be Merge pull request #121082 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.13.0, gomega v1.28.0

Kubernetes-commit: 755644a169ad495a34bc5e1db502962fc6dd3750
2023-10-10 15:12:51 +00:00
Patrick Ohly
fa053c26e6 dependencies: ginkgo v2.13.0, gomega v1.28.0
Besides simply staying up-to-date, ginkgo v2.13.0 adds a `PreviewSpecs` which
will be used for introspection of the E2E test suites.

Kubernetes-commit: 79355caa565cc34e8726c427562c9f109ebe0e34
2023-10-09 19:27:06 +02:00
Kubernetes Publisher
5b14e64aff Merge pull request #120975 from ardaguclu/close-heartbeat-explicitly
Close websocket heartbeat explicitly when unexpected closure received

Kubernetes-commit: d0dfe6433444fb114fc119a8b1066e1601f049fe
2023-10-06 11:11:50 +00:00
Arda Güçlü
583e50d008 Use timeout function to detect transient errors
Kubernetes-commit: a888fef242fd59bc3871c67099c7f5e9449873c2
2023-10-06 08:55:22 +03:00
Arda Güçlü
9a88950e38 revert back to IsUnexpectedCloseError check
Kubernetes-commit: 914210ee9a6df6927019f200e90534edd1460fea
2023-10-05 12:04:06 +03:00
Kubernetes Publisher
0a782d6adb Merge pull request #120729 from pohly/events-context
k8s.io/client-go/tools/[events|record]: support context

Kubernetes-commit: f936f69cf994146650c287a95fa436d1d7352835
2023-10-05 03:18:13 +00:00
Kubernetes Publisher
ca718630c6 Merge pull request #120984 from p0lyn0mial/upstream-reflector-always-fallback-to-listwatch
reflector: fallback to the previous mode on any error

Kubernetes-commit: c9bd841cdf1310a2110267197b9db9432617582b
2023-10-04 10:22:44 +00:00
Lukasz Szaszkiewicz
1e0855a7ac reflector: fallback to the previous mode on any error
originally we honored only apierrors.IsInvalid
but decided to fallback on every error
because it is better to make progress than deadlocking

Kubernetes-commit: 4b3915017950a114124a88c5d308bd8bfb9ec48e
2023-10-04 08:17:10 +02:00
Kubernetes Publisher
fbb1575728 Merge pull request #120980 from p0lyn0mial/upstream-client-go-close-watcher
reflector: close an established watcher when the StopCh was closed

Kubernetes-commit: 389e60fb2e43e7c13d67e4d9d3a95ed4f088917a
2023-10-03 14:56:06 +02:00
Lukasz Szaszkiewicz
2c9d749027 reflector: close an established watcher when the StopCh was closed
Kubernetes-commit: 26f113be2fc71c7a41a59145eee5d4da9d062b9e
2023-10-03 13:49:21 +02:00
Arda Güçlü
e95d92dbc6 Close websocket heartbeat explicitly when unexpected closure received
Kubernetes-commit: e1ae906048003145441fb1d4ecce4c13acf5cb19
2023-10-03 12:05:26 +03:00
Kubernetes Publisher
d6dc079df2 Merge pull request #120716 from xrstf/fix-typos
Fix typos

Kubernetes-commit: 622509830c1038535e539f7d364f5cd7c3b38791
2023-09-30 10:21:56 +00:00
Kubernetes Publisher
6b97f71afc Merge pull request #119865 from charles-chenzz/bump_deps
bump github.com/emicklei/go-restful/v3 to v3.11.0

Kubernetes-commit: bf1fa0c6691bb3bc6c5c03f900c53ed609e580a4
2023-09-28 14:31:46 +00:00
Jefftree
c0416e6354 bump kube-openapi
Kubernetes-commit: 555c1b8091c2312e7b3f9002fc8a4787e759ef31
2023-09-27 14:02:53 -04:00
Kubernetes Publisher
52cc500823 Merge pull request #120865 from aojea/remotecmd_flake
deflake TestWebSocketClient_HeartbeatSucceeds

Kubernetes-commit: e602e9e03cd744c23dde9fee09396812dd7bdd93
2023-09-26 06:50:14 -07:00
Antonio Ojea
011db228a8 deflake TestWebSocketClient_HeartbeatSucceeds
Change-Id: I1f3331255ed81183b25ec24084c00d0cf7dfb510

Kubernetes-commit: 4a74958b2df7ecd9e6a4867f7b10f1402cb2e215
2023-09-25 10:31:46 +00:00
Kubernetes Publisher
34d1b64e67 Merge pull request #120799 from aojea/workqueue_test
workqueue unit tests to assert collapsing behaviors

Kubernetes-commit: cde6a46a483a0cc7d3f2404db506e1c24ecd4e9d
2023-09-21 18:21:40 +00:00
Antonio Ojea
374e3638f2 workqueue unit tests to assert collapsing behaviors
Change-Id: If4bf54c3af603c17de49055960f9a76e7d38aab3

Kubernetes-commit: 8a31bb6786c2d3600bade49de7a64a026802bd6d
2023-09-21 10:48:01 +00:00
Kubernetes Publisher
657ffa5263 Merge pull request #120752 from p0lyn0mial/upstream-client-go-initial-events-value
cache/reflector: check the value of the initial-events-end annotation

Kubernetes-commit: 09200e9c92784f6fb9210e6287e306649a731673
2023-09-20 06:21:27 +00:00
Lukasz Szaszkiewicz
d0ea06d597 cache/reflector: check the value of the initial-events-end annotation
Kubernetes-commit: 04668c00432cbd552b08eb94f829643facbd2061
2023-09-19 12:59:23 +02:00
Kubernetes Publisher
b5b9332330 Merge pull request #120694 from aojea/ws_healthchec
add loging and bump timers to avoid races

Kubernetes-commit: 10d487313d602da61def2869c7066ecc754a591d
2023-09-18 10:38:13 +00:00
Patrick Ohly
cf07629bfe k8s.io/client-go/tools/events: pass context into EventSink methods
Because the EventBroadcaster code now has a a context, changing the EventSink
interface so that the methods accepts a context instead of using context.TODO
becomes possible.

Kubernetes-commit: 5dc540ff57eed5d0e6bc8476f95fe03b7a983cf5
2023-09-18 12:17:14 +02:00
Patrick Ohly
3595e5242a k8s.io/client-go/tools: support context for event recording
Using StartRecordingToSinkWithContext instead of StartRecordingToSink and
StartLogging instead of StartStructuredLogging has several advantages:

- Spawned goroutines no longer get stuck for extended periods of
  time during shutdown when passing in a context that gets canceled.
- Log output can be directed towards a specific logger instead of the global
  default, for example one which writes to a testing.T instance.
- The new methods return an error when something went wrong instead of
  merely recording the error.

That last point is the reason for deprecating the old methods instead of merely
adding new alternatives.

Setting a context when constructing an EventBroadcaster makes calling Shutdown
optional. It can also be used to specify the logger.

Both EventRecorder interfaces in tools/events and tools/record now have a
WithLogger helper. Using that method is optional, but recommended to support
contextual logging properly. Without it, errors that occur while emitting an
event are not associated with the caller.

Kubernetes-commit: 27a68aee3a48340f7c14235f7fc24aa69aaeb8f6
2023-09-18 09:13:22 +02:00
Christoph Mewes
0d1af04557 fix typo dervied => derived
Kubernetes-commit: 62275e3cc8c7de6f852bb04ba6cf521d36443580
2023-09-17 11:26:19 +02:00
Kubernetes Publisher
08f892964c Merge pull request #119526 from sttts/sttts-idiomatic-cached
kube-openapi/cached: bump and adapt to more go-idiomatic caching library

Kubernetes-commit: f551940626532e790c05094293e0d8bb5b76e3d5
2023-09-15 22:22:46 +00:00
Antonio Ojea
ea6e035481 add loging and bump timers to avoid races
Change-Id: I6da35b6fb33c939f3f92f8ebf4c6a18bdf1644e4

Kubernetes-commit: 40618b765ccb1a0e75f7063534f9645d1df57f7a
2023-09-15 08:23:58 +00:00
Dr. Stefan Schimanski
278669d869 hack/update-vendor.sh
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: 6c59e8be5e2bc97c8e850070ffb3025199c05df2
2023-09-13 08:23:06 +02:00
Kubernetes Publisher
908cc0a333 Merge pull request #120513 from devincd/fix-typo
fix typo in client-go package

Kubernetes-commit: 10f9d5ce6d4e65a1f0d3ad91ec9ff47150b749e6
2023-09-12 22:21:12 +00:00
Kubernetes Publisher
44a68eea8f Merge pull request #120508 from aojea/aojea_owner
add aojea as client-go approver

Kubernetes-commit: b7e3b9f7d9f8784cfb0cf0bb48794162527ccb44
2023-09-11 22:22:53 +00:00
Kubernetes Publisher
a73949f10a Merge pull request #120008 from skitt/drop-intstr-ptr-wrappers
Use ptr.To to retrieve intstr addresses

Kubernetes-commit: 33c5bd631d990f907f89f66cdf8088d252ab251b
2023-09-09 18:21:34 +00:00
Kubernetes Publisher
a52e8a122e Merge pull request #120499 from tukwila/gorilla/websocket_v1.5.0
bump: upgrade gorilla/websocket from v1.4.2 to v1.5.0

Kubernetes-commit: f6a87aebe6f83336b1dc7d4ca6e69b19ca55cd94
2023-09-08 18:23:38 +00:00
devincd
f242a563ef fix typo in client-go package
Signed-off-by: devincd <505259926@qq.com>

Kubernetes-commit: 975da2fb2393350db504e50652b17c70206e1407
2023-09-08 10:31:07 +08:00
Antonio Ojea
5ac9cf819f add aojea as client-go approver
After 12 months as reviewer, constantly reviewing and contributing
to client-go, I think is fair to move to the next ladder.

Change-Id: I49e579dcefcd39c6f0b29400c90467df00719cca

Kubernetes-commit: cc77b97c5e9cc9f778016b9d260c66bf7b277448
2023-09-07 21:16:19 +00:00
guangli.bao
951672fc13 bump: upgrade gorilla/websocket from v1.4.2 to v1.5.0
Kubernetes-commit: 93d93258b19ff3d2e85b5dc60e89df1ebdc689ca
2023-09-07 22:27:58 +08:00
Kubernetes Publisher
53c02afd1b Merge pull request #119334 from kmala/serverapply
update the dependency sigs.k8s.io/structured-merge-diff/v4 to latest tag

Kubernetes-commit: cf8f9a8d07770352ec0e976ebac77dffa92f0b04
2023-09-07 02:40:14 +00:00
Kubernetes Publisher
f5a7a42bbc Merge pull request #119157 from seans3/websocket-executor
WebSocket Client and V5 RemoteCommand Subprotocol

Kubernetes-commit: 6013381508d2d37961c95fd49d91642bfeffaf74
2023-09-06 02:20:41 +00:00
tao.yang
0447e1f9ce cleanup: omit comparison with bool constants
Signed-off-by: tao.yang <tao.yang@daocloud.io>

Kubernetes-commit: b35357b6c08f21ba0fd312536051394c2567ec79
2023-09-04 16:59:23 +08:00
Paco Xu
92c5c93353 remove GAed FG GRPCContainerProbe
Kubernetes-commit: 7e7b67f2ccd38380120b6da2ccb10ae74970a7a6
2023-08-30 10:29:37 +08:00
Stephen Kitt
f0c65afe82 Use ptr.To to retrieve intstr addresses
This uses the generic ptr.To in k8s.io/utils to replace functions and
code constructs which only serve to return pointers to intstr
values. Other uses of the deprecated pointer package are updated in
modified files.

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

Kubernetes-commit: aa89e6dc978bf88653d893284248039b776aed54
2023-08-17 12:12:12 +02:00
Tarun Gupta Akirala
5a38750180 fix: add code comments
Kubernetes-commit: 1863a808b2082ddd8d116e6b31fd41de412e8a20
2023-08-10 10:50:01 -07:00
charles-chenzz
bf89966e2c bump github.com/emicklei/go-restful/v3 to v3.11.0.
Kubernetes-commit: 409b46576ff7848bf51b9d70165b693018173ebc
2023-08-09 23:31:06 +08:00
Tarun Gupta Akirala
f93655277b client-go: chore: implement Is interface for ErrGroupDiscoveryFailed
Signed-off-by: Tarun Gupta Akirala <takirala@users.noreply.github.com>

Kubernetes-commit: 6aad00ff73d10378d33d615505239c5373a1108b
2023-08-07 12:08:09 -07:00
Keerthan Reddy Mala
77918e1951 update the dependency sigs.k8s.io/structured-merge-diff/v4 to latest tag
Kubernetes-commit: d2df65ba6c91c1337e07373c254c2118aec3700a
2023-07-14 09:47:59 -07:00
Sean Sullivan
b7d73dd18c StreamTranslator and FallbackExecutor for WebSockets
Kubernetes-commit: 168998e87bfd49a1b0bc6402761fafd5ace3bb3b
2023-07-06 21:22:07 -07:00
Sean Sullivan
fd1e22bd8f WebSocket Client and V5 RemoteCommand Subprotocol
Kubernetes-commit: a0d6a815fcc02cbfea1bb22d13a8e896ecbe116c
2023-07-06 21:22:07 -07:00
Kubernetes Publisher
4783d28359 Merge pull request #119410 from Jefftree/kubectl-cleanup
Cleanup kubectl legacy server fallback

Kubernetes-commit: ea3353dd6b8c3ba52516230a5e70b1af0ff9192b
2023-09-03 18:00:04 +00:00
Kubernetes Publisher
5e052e4835 Merge pull request #119870 from Jefftree/agg-discovery-406
Fallback to legacy discovery on a wider range of conditions

Kubernetes-commit: 42275daaaa96aac0d5191f1f5bf5d4ce6d1c474d
2023-09-01 18:00:31 +00:00
Kubernetes Publisher
f28f485cb4 Merge pull request #120259 from SataQiu/clean-apf-20230830
apf: remove v1alpha1 API

Kubernetes-commit: efadb94a74d64cb821e990700c5bd05a805857ac
2023-09-01 04:47:30 +00:00
Kubernetes Publisher
5e5ba6b91d Merge pull request #120327 from liggitt/json-patch
Revert to json-patch 4.12.0

Kubernetes-commit: 34aaf2b972c95c7a3591d8d49c798dba348ee5c9
2023-09-01 04:47:24 +00:00
Jordan Liggitt
f6f4d3c7eb Revert to json-patch 4.12.0
Kubernetes-commit: 741f1461571007fcf4cf3edbd121d6ef0c596c72
2023-08-31 19:01:37 -04:00
SataQiu
def2075eac apf: remove v1alpha1 API
Kubernetes-commit: 2825519da2c176ac81d2ec6b1500ef8e68377db1
2023-08-30 17:20:29 +08:00
Kubernetes Publisher
fb2e668965 Merge pull request #120218 from rakshitgondwal/feat/protobuf-version-update
feat: update google.golang.org/protobuf to v1.31.0

Kubernetes-commit: 8b4f5bb54b3c2f0e671e87f5038bf3257109edd4
2023-08-29 15:55:12 +00:00
Rakshit Gondwal
5af0bb9dfd feat: update google.golang.org/protobuf to v1.31.0
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

Kubernetes-commit: 709721e0df1940f0316f6b81e8ceaeb493634400
2023-08-28 23:38:32 +05:30
Kubernetes Publisher
4dd144a93b Merge pull request #119962 from pohly/dra-api-list-type
api: change list type for node lists in PodSchedulingContext

Kubernetes-commit: 3f705b6ab857b20b792f092b05f61ab0c8c54fd4
2023-08-23 20:32:07 +00:00
Kubernetes Publisher
e8815ff156 Merge pull request #118653 from pohly/volume-resource-requirements
Volume resource requirements

Kubernetes-commit: f852d7fead3446112d4dc8acd29869a860a11ff5
2023-08-22 00:05:18 +00:00
Kubernetes Publisher
3fe9aa4466 Merge pull request #119790 from seantywork/added-comment
added comment for clarifying steps related to kubernetes mutual (2-wa…

Kubernetes-commit: 55c86d6ad930d437931079318d740bdf8dac34f0
2023-08-21 20:07:06 +00:00
Kubernetes Publisher
c1466acf62 Merge pull request #119883 from ls-2018/json
Fix: null jsonpath serialization

Kubernetes-commit: c5a8015bbae1e1095813d8e0719f017477dc7112
2023-08-19 03:51:34 +00:00
seantywork
ff3618ffb3 kubernetes mutual (2-way) x509 comment
Kubernetes-commit: 48260b4a77b423b178ec5e262ac67be52d49f455
2023-08-18 01:31:22 +00:00
Kubernetes Publisher
9c6b659a97 Merge pull request #119937 from RyanAoh/kep-1860-dev
Make Kubernetes aware of the LoadBalancer behaviour

Kubernetes-commit: ee265c92fec40cd69d1de010b477717e4c142492
2023-08-17 23:57:38 +00:00
Kubernetes Publisher
d124e52fa8 Merge pull request #119806 from enj/enj/i/delete_psp_api
Delete PSP API types and generated clients

Kubernetes-commit: 012e61a860d978bed4e72222da756d0c7b7832ba
2023-08-17 20:03:37 +00:00
Kubernetes Publisher
edce1de719 Merge pull request #119728 from pohly/ssa-forbid-extract-calls
SSA: prevent usage of Extract calls via forbidigo

Kubernetes-commit: f563910656ad325a7e1f8ab5848746bc2eba4d7f
2023-08-17 12:11:49 +00:00
Kubernetes Publisher
9a5370b1ef Merge pull request #119907 from Hii-Arpit/Hii-Arpit-Fixing-Broken-Link
Fixing the "Service Account Token" link in the readme

Kubernetes-commit: a38dca01aaf0d20d274a648efc158d8bfee2b4a4
2023-08-16 07:56:47 +00:00
Kubernetes Publisher
54237a55bc Merge pull request #119796 from sttts/sttts-caches-populated
client-go: log proper 'caches populated' message, with type and source and only once

Kubernetes-commit: 03e845f882b2ab1f1a34deee36f06945cfa259d2
2023-08-16 07:56:46 +00:00
Kubernetes Publisher
b97d8af093 Merge pull request #119554 from davidmccormick/prevent-race-client-go-workqueue-shutdown
client-go workqueue: fix shutdown race / test flake

Kubernetes-commit: f234aa52cdcd996d00cd14b94902b3a3752595ea
2023-08-16 04:03:48 +00:00
Kubernetes Publisher
856e847bb7 Merge pull request #118455 from linxiulei/managedFields
Trim managedFields in controller-manager

Kubernetes-commit: 1acd489dca47a4be0301330cbfcf4e8f9d98f7c0
2023-08-16 00:07:58 +00:00
Kubernetes Publisher
08b51e9785 Merge pull request #118399 from skitt/ioutil-sig-api-machinery
api-machinery: stop using deprecated io/ioutil

Kubernetes-commit: 10beda334e360b6b2988d5d2d30c011cc50d4aa8
2023-08-16 00:07:55 +00:00
Kubernetes Publisher
41d4a164f9 Merge pull request #117992 from liggitt/gc-discovery-flutter
Fix duplicate GC event handlers getting added if discovery flutters

Kubernetes-commit: 7407f36b4b8937f982def35dd99b5647fc5245c5
2023-08-16 00:07:52 +00:00
Patrick Ohly
cb120b63f7 api: change list type for node lists in PodSchedulingContext
The "set" list type was chosen because it seemed appropriate (no duplicates!)
but that made tracking of managed fields more expensive (each entry in the list
is tracked, not the entire field) and for no good reason (one client is
responsible for the entire list).

Therefore the type gets changed to "atomic". Server-side-apply has not been
used in the past and PodSchedulingContext objects are short-lived and still in
alpha, so the any potential compatibility issues should be minor.

The scheduling throughput in scheduler_perf increases:

    name                                                                      old SchedulingThroughput/Average     new SchedulingThroughput/Average
    PerfScheduling/SchedulingWithResourceClaimTemplate/2000pods_100nodes-36   18.8 ± 8%                            24.0 ±37%
    PerfScheduling/SchedulingWithMultipleResourceClaims/2000pods_100nodes-36  13.7 ±81%                            18.5 ±40%

Kubernetes-commit: 5567f288e745db05d88fc60e15915f8b0d1f6c4b
2023-08-15 09:55:57 +02:00
Aohan Yang
4a487f61f6 Generated code for IP mode field
Kubernetes-commit: 29a6705dabc875b0f19b73016df16c50744ce99b
2023-08-14 12:32:25 +08:00
Arpit Agrawal
f4a635a743 Update README.md
The Service Account Token link in the readme is broken and refers to a page that no longer exists.
In this PR I updated the correct link in the readme

Kubernetes-commit: 279a663f948337da156f544b74e41928ad66f9ef
2023-08-11 17:46:28 +05:30
acejilam
a8fc969a34 Fix: null jsonpath serialization
Signed-off-by: acejilam <acejilam@gmail.com>

Kubernetes-commit: 9646ae5a9efb0eee7ac15577d113699700233017
2023-08-10 19:32:47 +08:00
Kubernetes Publisher
b8a03ab933 Merge pull request #119876 from marosset/revert-118895
Revert "Merge pull request #118895 from RyanAoh/kep-1860"

Kubernetes-commit: e6218f3d3bede036b2d67a4349dd761aac06ae97
2023-08-10 04:38:32 +00:00
Kubernetes Publisher
04dcae2ee3 Merge pull request #119835 from liggitt/mitigate-aggregated-discovery-npe
Avoid returning nil responseKind in v1beta1 aggregated discovery

Kubernetes-commit: 3d941afece97b284c764e5320cc8c80b0e88cba8
2023-08-10 00:49:21 +00:00
Mark Rossetti
32bbd73dd1 Revert "Merge pull request #118895 from RyanAoh/kep-1860"
This reverts commit 890a6c8f70d2e0f45b3692d34a6df1ecb6d8335b, reversing
changes made to 4f60a8d493ab9571eb328b9d98da477a50bc7446.

Kubernetes-commit: 0d90d1ffa5e87dfc4d3098da7f281351c7ff1972
2023-08-09 15:51:20 -07:00
Jefftree
c4ed5da76e Fallback to legacy discovery on a wider range of conditions in aggregator
Kubernetes-commit: 57b27fd3cd11cb5f2515c7ac5f67f612998fb368
2023-08-09 18:22:30 +00:00
Jordan Liggitt
bf44ac9180 Avoid returning nil responseKind in v1beta1 aggregated discovery
Kubernetes-commit: 1876ddf71497bad349f7c4df24c2e22356d3bad9
2023-08-08 14:25:56 -04:00
Kubernetes Publisher
49410bfbbc Merge pull request #119725 from MadhavJivrajani/bump-net-dep
[CVE-2023-3978] .*: bump golang.org/x/net to v0.13.0

Kubernetes-commit: 1620473a9a01dd6bbef3398c0acb2e581d0a13c3
2023-08-07 20:42:04 +00:00
Monis Khan
1e11b3a8ca Delete PSP API types and generated clients
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 10fe3da87dbc354ea528d65f1e544614ee980987
2023-08-07 16:15:13 -04:00
Dr. Stefan Schimanski
00f8b3aa35 client-go: log proper 'caches populated' message, with type and source and only once
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: a1809ffae377f3abbae12b137073ca4c473743cd
2023-08-07 12:56:32 +02:00
Patrick Ohly
ed2b4f0fcb SSA: prevent usage of Extract calls via forbidigo
Client-side extract calls depend on `managedFields`, which might not be
available. Therefore they should not be used in production code.

They are okay in test files (because the API has to be tested), in the
generated code (because the various type specific APIs still need to be
provided) and in unstructured.go (same reason).

Kubernetes-commit: 4bc9434f99d9a87dd5b63e738b6b1b16693f10e4
2023-08-02 10:57:51 +02:00
Madhav Jivrajani
7d2c3dfa0e .*: bump golang.org/x/net to v0.13.0
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 1b90dff5276f3cb37236b446f1821175dad802c4
2023-08-02 11:11:22 +05:30
Dave McCormick
e9b0103a41 Fix a race where a call to Shutdown was happening after ShutDownWithDrain() had performed the check q.isProcessing() && q.shouldDrain() and before waitForProcessing() has reached its Wait(). This is because waitForProcessing() is only checking the length part of the condition instead of both the length and whether we still need to drain.
It turned out that there were lots of unnecessary accessor functions being called locking and unlocking the cond which are not needed because Wait() automatically unlocks and locks the cond for us and best practice says we should run it in a for checking for the condition (so this is what I have done).

Kubernetes-commit: 2b12df56b0be93bc2cac7c5a66342c0ffaa72311
2023-07-24 22:40:54 +01:00
Kubernetes Publisher
c5b1c13ccb Merge pull request #118644 from alexzielenski/apiserver/policy/namespaceParamRef
KEP-3488: Promote ValidatingAdmissionPolicy to Beta

Kubernetes-commit: 18f8cb83989ff64beb0c7f47cdd3ad9df7bdbbeb
2023-07-22 03:07:43 +00:00
Kubernetes Publisher
a98e74a6eb Merge pull request #116469 from RomanBednar/pv-phase-transition-time
PersistentVolume last phase transition time

Kubernetes-commit: f3a070f9c684d9335b6df91ef2f3ce207629882c
2023-07-22 03:07:39 +00:00
Roman Bednar
dcfedbe450 make update
Kubernetes-commit: 294f5c9a42fead4a4cc75340a6b9171c9c657b3e
2023-07-21 17:16:05 +02:00
Kubernetes Publisher
605aac15d7 Merge pull request #119215 from alexzielenski/apiserver/policy/namespaceParamRef-alpha
KEP-3488: Per namespace policy params

Kubernetes-commit: 8a053c700a3abc30717860e0b6a13243a7250743
2023-07-20 22:53:21 +00:00
Kubernetes Publisher
64a35f6a46 Merge pull request #119301 from kannon92/pod-replacement-policy-job-api-only
add podReplacementPolicy and terminating field to job api

Kubernetes-commit: 9892b5370450ff0b3d86f67e8e82d1545299c785
2023-07-20 02:55:28 +00:00
Alexander Zielenski
d7acd85d1b update codegen
Kubernetes-commit: d6479587445a5a6fa736ee7fb3012a29f4e6e5e7
2023-07-19 16:21:22 -07:00
Jefftree
f02c594955 Cleanup kubectl legacy server fallback
Kubernetes-commit: d1946392528fe6e26886810e8240568fa19e82fe
2023-07-18 18:24:56 +00:00
kannon92
70917217ee add podReplacementPolicy and terminating field to job api
Kubernetes-commit: ce929520376417a9358067ad8576b10e734cb7a9
2023-07-18 17:25:15 +00:00
Kubernetes Publisher
8d42d15550 Merge pull request #119294 from mimowo/backoff-limit-per-index-api
Extend the Job API for BackoffLimitPerIndex

Kubernetes-commit: f3f5dd99ac7bdc61c61c3d587575090c3473ab5a
2023-07-18 17:44:59 +00:00
Michal Wozniak
ad08d15b30 Extend the Job API for BackoffLimitPerIndex
Kubernetes-commit: fcbfdc1710676ffd77ba4bbda384240293339db4
2023-07-13 09:36:07 +02:00
Kubernetes Publisher
74c18d3a40 Merge pull request #118204 from sttts/sttts-openapi-v2-parameter-refs
openapi: reference shared parameters

Kubernetes-commit: f42ff8687026f8e12fb3d3b0da0760525d8d8ab2
2023-07-18 05:56:20 +00:00
Kubernetes Publisher
efe741a289 Merge pull request #119312 from pacoxu/prometheus/common-v0.44
upgrade prometheus common to v0.44.0

Kubernetes-commit: d627c4b41cdd9ef08b13604ce1c460eca26684f8
2023-07-18 01:59:24 +00:00
Kubernetes Publisher
64339c0aa9 Merge pull request #116335 from gnufied/update-api-recovery-apis
Update api recovery apis

Kubernetes-commit: a776bf046286b578bc6259cca7e5bc0d0fb14e59
2023-07-18 01:59:19 +00:00
Paco Xu
251884f570 upgrade prometheus common to v0.44.0
Kubernetes-commit: 9b6af80a631f5659ea62d552d595b3dd137525a0
2023-07-14 11:05:46 +08:00
Alexander Zielenski
84505f7088 update-codegen
Kubernetes-commit: 9a595209bd28d6456f5f8cf5effe74944daf2105
2023-07-10 13:06:26 -07:00
Hemant Kumar
fe95890e7f Update generated data
Kubernetes-commit: 6a780f57ce5e64002d96200be59dea881aad977c
2023-07-10 12:19:57 -04:00
Kubernetes Publisher
5360d05de9 Merge pull request #118895 from RyanAoh/kep-1860
Make Kubernetes aware of the LoadBalancer behaviour

Kubernetes-commit: 890a6c8f70d2e0f45b3692d34a6df1ecb6d8335b
2023-07-17 21:52:50 +00:00
Aohan Yang
950fa167a0 Generated code for IP mode field
Kubernetes-commit: 7c6e399b228199bed94219dcaf36cd3cb5eb68e5
2023-07-17 16:00:57 +08:00
Kubernetes Publisher
162ee91898 Merge pull request #109616 from wzshiming/feat/pod-host-ips
Field `status.hostIPs` added for Pod

Kubernetes-commit: 8a0ea1bd587895a328f6587064c936022b16335d
2023-07-15 09:18:53 +00:00
Kubernetes Publisher
f19b40cda9 Merge pull request #119330 from bertinatto/fix-conn-reuse-test
Proactively bump golang.org/x/net to v0.12.0

Kubernetes-commit: c79be34fba3ad20532c9648216924afaa8434e06
2023-07-14 21:24:36 +00:00
Kubernetes Publisher
0f514c8c6b Merge pull request #118782 from MikeSpreitzer/exempt-borrowing-impl
Exempt borrowing implementation

Kubernetes-commit: 2a91bd1dfdd2e293b9ec017ea3a976ecc2ecd545
2023-07-14 17:25:41 +00:00
Fabio Bertinatto
1c4976d2f6 Proactively bump golang.org/x/net to v0.12.0
Proactively bump to v0.12.0 to avoid v0.10.0 and v0.11.0, which contain
a regression added by commit
82780d606d.
This commit was later reverted in v0.12.0.

Generated with:

hack/pin-dependency.sh golang.org/x/net v0.12.0 && hack/update-vendor.sh

Kubernetes-commit: d9bd413f991958492602c4bf51c43d6edca0e5cd
2023-07-14 10:25:23 -03:00
Mike Spreitzer
4c1cb3cb29 Update generated code for APF borrowing by exempt
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>

Kubernetes-commit: f78d6062eb8c4565e570f4c8657856a0bd082cf9
2023-07-14 01:00:06 +00:00
Jiahui Feng
0c7c900fd5 ValidatingAdmissionPolicy: Variable Composition (#118642)
* [API REVIEW] Variable Composition

* lazy map.

* variable composition implementation.

* check variables during VAP validation.

* generated: ./hack/update-vendor.sh

* generated: UPDATE_COMPATIBILITY_FIXTURE_DATA

(cd staging/src/k8s.io/api/ && env UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test)

* cost calucation.

* tests for cost calculations.

* e2e test for variables.

* fix doc for Validation.Expression.

* generated: ./hack/update-codegen.sh

* fix missing utilruntime import.

* generated: ./hack/update-openapi-spec.sh

Kubernetes-commit: b635f2a401fd03715f6a33c4a19f11c509c0ce03
2023-07-14 01:12:10 +00:00
Shiming Zhang
8c4503becd Regenerate
Kubernetes-commit: 3e2a1a7b9ce860dbe39a03014707c9bcdd333960
2023-07-12 15:02:44 +08:00
Kubernetes Publisher
560efb3b89 Merge pull request #117351 from pohly/dra-generated-resource-claim-names
DRA: generated resource claim names

Kubernetes-commit: e0dafe57a3858b798f4137223e7fdc70bd15b617
2023-07-11 21:08:44 +00:00
Patrick Ohly
86ae84acb9 generated files
Kubernetes-commit: c1eb18c00caaffa127ef554f3c0f693848a28d4a
2023-07-10 17:51:23 +02:00
Dr. Stefan Schimanski
05b412c425 Bump kube-openapi
Kubernetes-commit: 961c1503b5bd2b0f83d6b6b98e0c8f29525ca9cb
2023-06-26 13:09:30 +02:00
Eric Lin
411a1189f8 Run hack/update-codegen.sh informers subprojects
Signed-off-by: Eric Lin <exlin@google.com>

Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723
2023-06-04 20:33:01 +00:00
Eric Lin
da4a4e2e16 Add 'WithTransform' SharedInformerOption
Also add support for metadata informer factory to use SharedInformerOption

Signed-off-by: Eric Lin <exlin@google.com>

Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e
2023-06-04 12:26:58 +00:00
Jordan Liggitt
daed746fdc Add GroupDiscoveryFailedErrorGroups helper method
Kubernetes-commit: 733f63c6c423565b8cecf3f3db8e9d81e48b1311
2023-05-15 09:23:54 -04:00
Stephen Kitt
caded3c2dc api-machinery: stop using deprecated io/ioutil
This replaces deprecated ioutil functions as follows:

* ioutil.ReadAll -> io.ReadAll
* ioutil.ReadFile -> os.ReadFile
* ioutil.TempDir -> os.MkdirTemp
* ioutil.TempFile -> os.CreateTemp
* ioutil.WriteFile -> os.WriteFile

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

Kubernetes-commit: b60a3a58df2791ae67764f6325be31aea5eca5a0
2023-05-02 15:08:18 +02:00
Patrick Ohly
4ddde4e3b5 dra: generated files
Kubernetes-commit: 0fc62d5ded07b01c6ffe9110f5c4991c34efb205
2023-04-14 09:51:07 +02:00
Kubernetes Publisher
aed71fa5cf Merge pull request #116429 from SergeyKanzhelev/sidecar
Add SidecarContainers feature

Kubernetes-commit: 0e1409833360adf6b46ca5ae3ba355169d065285
2023-07-11 06:29:00 +00:00
Gunju Kim
d63727d2cb Sidecar: Generated code
Kubernetes-commit: c187b38117379777b77656526a4f12da311c8341
2023-05-10 01:39:38 +09:00
Kubernetes Publisher
d31edad7e2 Merge pull request #118010 from aimuz/cleanup
cleanup: duplicate request_test TestRequestAbsPathPreservesTrailingSlash

Kubernetes-commit: 823e0f77e8a736718bd88bfaa87226186dcaae25
2023-07-06 19:32:17 +00:00
Kubernetes Publisher
5d8fd6bf0a Merge pull request #118386 from Richabanker/enhance-storage-version
Add servedVersions info in StorageVersion API

Kubernetes-commit: cd32adebd9d52ae46827054350c17de085a4eb23
2023-07-06 06:37:06 +00:00
Richa Banker
61c0de83db Add servedVersions info in StorageVersion API
Kubernetes-commit: 1c48b7ec144785b4b2493a01d82e40d6d34ce578
2023-06-01 18:07:56 -07:00
Michal Fojtik
0cde78477a client-go: add DNS resolver latency metrics (#115357)
* client-go: add DNS resolver latency metrics

* client-go: add locking to DNS latency metrics

* client-go: add locking for whole DNSStart and DNSDone

Signed-off-by: Vu Dinh <vudinh@outlook.com>

* Fix a mismatched ctx on the request

Signed-off-by: Vu Dinh <vudinh@outlook.com>

* Clean up request code and fix comments

Signed-off-by: Vu Dinh <vudinh@outlook.com>

---------

Signed-off-by: Vu Dinh <vudinh@outlook.com>
Co-authored-by: Vu Dinh <vudinh@outlook.com>

Kubernetes-commit: 1c7e87cff27aa009488a9d55342220e223d5c146
2023-06-28 22:56:45 +02:00
Kubernetes Publisher
bb755c8cba Merge pull request #118922 from champtar/kubeadm-backdate-ca
kubeadm: backdate generated CAs

Kubernetes-commit: 4036b6fb41b36d76a6076e4f430f74423efe04f3
2023-06-28 22:17:23 +00:00
Etienne Champetier
089cdcdf71 client-go: allow to set NotBefore in NewSelfSignedCACert()
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>

Kubernetes-commit: 44692a486f96bda80ffd2a2a132a651b47457391
2023-06-28 00:01:34 -04:00
Kubernetes Publisher
4308ca3a0e Merge pull request #118903 from champtar/revert-118631-ca-not-before
Revert "Make CA valid 1 hour in the past"

Kubernetes-commit: b82240cfb02c282b3765920ca0d28ff754dafe9a
2023-06-27 18:35:02 +00:00
Etienne Champetier
d19c2b99a8 Revert "Make CA valid 1 hour in the past"
Kubernetes-commit: 56c5c8f7eef25748389987a416d272bf8db2431d
2023-06-27 08:57:59 -04:00
Kubernetes Publisher
9186f40b18 Merge pull request #114849 from padlar/handle-terminating-namespaces
handle event errors caused due to terminating namespaces

Kubernetes-commit: 2e93c65eff5979e21178d9d7117916e49af29838
2023-06-20 13:08:39 +00:00
Kubernetes Publisher
808ebc843b Merge pull request #118689 from bzsuni/clean
[dependencies] update prometheus/client_golang v1.14.0 to v1.16.0

Kubernetes-commit: 0004ce8684bd9c6be0af4ad8fc9b076f4a04e23e
2023-06-19 01:09:03 +00:00
Kubernetes Publisher
ebad5fbb0d Merge pull request #118631 from champtar/ca-not-before
Make CA valid 1 hour in the past

Kubernetes-commit: 604584d1d3cc230948498040281b2862f789c7c3
2023-06-15 11:22:30 -07:00
bzsuni
afed8d3bbe update prometheus/client_golang v1.14.0 to v1.16.0
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>

Kubernetes-commit: 5aa5f1abc9c9d83ccc34382ae2a8e0241ec1d866
2023-06-15 11:24:32 +00:00
Etienne Champetier
d606148375 Make CA valid 1 hour in the past
When running kubeadm / installing k8s early during boot,
the CA certificate can be generated before time is synchronised
and time is jumped backward.
Make notBefore 1 hour in the past to accept small clock jump.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>

Kubernetes-commit: e1735b9863777ff11ac35434e047c38dcce4b4f3
2023-06-13 01:04:28 -04:00
Kubernetes Publisher
92512ee2b8 Merge pull request #118055 from timofurrer/export-default-server-url-for-func
Export DefaultServerUrlFor utility function

Kubernetes-commit: cc60a9348536a85978946de3001dc6a3737cf516
2023-06-12 21:08:41 +00:00
Kubernetes Publisher
aa1fae7565 Merge pull request #118481 from cbandy/client-go-testing-setenv
Replace os.Setenv with testing.T.Setenv in tests

Kubernetes-commit: a4e6367bb60b0b0bdaf0007248c2c5cd990fcecd
2023-06-12 21:08:40 +00:00
Kubernetes Publisher
5a01920212 Merge pull request #118507 from jeremyrickard/go1205
[go] Bump images, versions and deps to use Go 1.20.5

Kubernetes-commit: c042d6956f70566a81bc29c9af6896fefbf89aae
2023-06-07 18:21:36 +00:00
Jeremy Rickard
5b9e822e45 Update vendor with hack/update-vendor.sh
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>

Kubernetes-commit: b1da721bdd711d9f75a57d782c5a33eea7ac35a4
2023-06-07 08:26:14 -06:00
Chris Bandy
3ffcfabea2 Replace os.Setenv with testing.T.Setenv in tests
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.

Kubernetes-commit: ac5ce5cbce7ddb6ffeff755d1cf670afadb8e1fb
2023-06-05 21:03:21 -05:00
Kubernetes Publisher
fe81cbee2b Merge pull request #118384 from Jefftree/gnostic-models-branch
Update gnostic library to point to gnostic-models

Kubernetes-commit: bd0ac4cba33f40195b4ffab5463f2b5397216400
2023-06-02 18:20:34 +00:00
Kubernetes Publisher
4485c4ecbb Merge pull request #117870 from howardjohn/client/run-errorhandler-race
informer: fix race against Run and SetTransform/SetWatchErrorHandler

Kubernetes-commit: decf1e1a9b53a4f4b24bb780d6433e2d5e959d83
2023-06-02 02:20:29 +00:00
Jefftree
2bd3f49236 Update gnostic references
Kubernetes-commit: 2111e79f56acdfa6a8dab56780c52e3abc608758
2023-06-01 18:25:39 +00:00
Jefftree
90e15d42fa vendor
Kubernetes-commit: 1993a4cb3798d818ff05db0e0c7c9c87d8b41dd2
2023-06-01 18:25:30 +00:00
Kubernetes Publisher
cf830e3cb3 Merge pull request #113362 from sxllwx/ftr/extract_listobject_use_copy
Faster ExtractList. Add ExtractListWithAlloc variant.

Kubernetes-commit: fe9ef26af5d90de9610153c73f47ce75805ee9d5
2023-05-29 18:20:30 +00:00
Kubernetes Publisher
f21df6e02d Merge pull request #118132 from marseel/improve_reflector_retries
Improve backoff policy in reflector.

Kubernetes-commit: 7f2a1e8cd3363b04d970c619daf9f9d5ee5d50c0
2023-05-29 18:20:28 +00:00
scott
6c7d1bc996 Add WithAlloc interface and stub implementations with base benchmarks
Kubernetes-commit: b8a3bd673dc61b4d7a0ad0f54fa423e0160078cf
2023-05-27 17:57:35 -04:00
Kubernetes Publisher
c670796be1 Merge pull request #118269 from liggitt/genproto
Update google.golang.org/genproto

Kubernetes-commit: d05b79c836c9db35ef0a60f0175b3a6bbeedfa7e
2023-05-26 22:20:21 +00:00
Jordan Liggitt
260c0c5584 Update google.golang.org/genproto
Kubernetes-commit: a045fedd025c08ad6cb116a9beb3042b6be39fd1
2023-05-25 21:10:02 -04:00
Kubernetes Publisher
7a7ea20936 Merge pull request #118054 from johanoskarsson/johan_leader_election_lock_id_validate
Validate lock identity

Kubernetes-commit: 36d81a5818665b55c2b0f307c15572626d84b07a
2023-05-25 18:20:05 +00:00
Kubernetes Publisher
151a5919db Merge pull request #118235 from kkkkun/set_watchlist_env
Lookup ENABLE_CLIENT_GO_WATCH_LIST_ALPHA in NewReflectorWithOptions

Kubernetes-commit: 6911d3b2b8a498c570d58827277347b2bb8c4100
2023-05-25 10:19:57 +00:00
Kubernetes Publisher
6fbb0bd42d Merge pull request #116656 from HirazawaUi/fik-fd-leaks
Cleanup fd leaks and file removal cleanup

Kubernetes-commit: 03ebd4b7ef3fc5d2ec5b407b36488c6324a058b6
2023-05-25 06:19:52 +00:00
Kubernetes Publisher
328d0fb9ee Merge pull request #118240 from Jefftree/bump-kube-openapi
Bump kube openapi

Kubernetes-commit: f99589b4f52a39a73a0a15449f9adb817a8865b8
2023-05-24 22:20:11 +00:00
Jefftree
17a70dc433 Update vendor
Kubernetes-commit: 4373ae05f345b5d85672bdeefe26e1f69d185086
2023-05-24 18:55:36 +00:00
Arda Güçlü
4cb373f7ca Add warning log callback in client-go loading rules (#117233)
* Add warning log callback in client-go loading rules

This provides a way to consumers use their own custom warning
mechanisms instead default klog warning.

* Use typed error instead plain string

* Fix interface change in unit test

Kubernetes-commit: 2ea6896f90c8b757d8a247d393b9a13fff2dab58
2023-05-24 18:20:07 +00:00
kkkkun
3195e36899 Should get ENABLE_CLIENT_GO_WATCH_LIST_ALPHA when new reflector
Signed-off-by: kkkkun <scuzk373x@gmail.com>

Kubernetes-commit: 2eed9b4143a9009b3327003ae50dbbebb44d2841
2023-05-24 21:09:53 +08:00
Marcel Zieba
bae10246dd Improve backoff policy in reflector.
Before, we've used two separate backoff managers for List and Watch
calls, now they share single backoff manager.

Kubernetes-commit: 337728b02559dec8a613fdef174f732da9cae310
2023-05-19 14:28:31 +02:00
Kubernetes Publisher
2a5f18df73 Merge pull request #116973 from apelisse/add-client-to-typeconverter
managedfields: A few improvements which will make testing easier

Kubernetes-commit: addf9d477840abd7555e9a7b2568f88e53644ed0
2023-05-17 01:00:17 +00:00
Timo Furrer
d11d5308d6 Export DefaultServerUrlFor utility function
Signed-off-by: Timo Furrer <tuxtimo@gmail.com>

Kubernetes-commit: ebaf49dbd709a94e0c44aa75b4c32b50898a05e3
2023-05-16 19:20:07 +02:00
Johan Oskarsson
0011bf6b0b Validate lock identity
Ensure that the lock identity is not empty. This can cause unexpected issues during leader election.

Kubernetes-commit: 5519b89a28eeea5a5b134092242aff770fcc07eb
2023-05-16 09:41:18 -07:00
aimuz
39f724a06e cleanup: duplicate request_test TestRequestAbsPathPreservesTrailingSlash
Signed-off-by: aimuz <mr.imuz@gmail.com>

Kubernetes-commit: 7da7468a3fc3f914c7b032c25c3e35097fd85449
2023-05-15 23:14:30 +08:00
John Howard
702d7378b6 informer: fix race against Run and SetTransform/SetWatchErrorHandler
`SetWatchErrorHandler` claims it will fail if Run() has already started.
But if they are called concurrently, it will actually trigger a data
race.

With this PR:
```
62702 runs so far, 0 failures (100.00% pass rate). 59.152682ms avg, 189.068387ms max, 26.623785ms min
```

Without this PR:
```
5012 runs so far, 38 failures (99.25% pass rate). 58.675502ms avg, 186.018084ms max, 29.468104ms min
```

Kubernetes-commit: 35d2431b3a89c5bd693846952e9d27ce4e3a0754
2023-05-08 10:11:54 -07:00
HirazawaUi
84dc0417b2 fix fd leaks and failed file removing for pkg client-go
Kubernetes-commit: 73aeed8766c2c42a6cb4fc8632b1b974f4508dde
2023-05-03 01:35:16 +08:00
HirazawaUi
a9b2f9e9eb add remove_file in client-go util directory
Kubernetes-commit: f49cc5eb113b839a5f5c6121ff0b89f82a483011
2023-05-03 01:33:28 +08:00
Antoine Pelisse
f454763642 openapi: Create client -> TypeConverter function
Allows creating a typeconverter from a client (i.e. by taking the data
of the client and formatting it so that one can create a type
converter).

Kubernetes-commit: 45853e20ae5c33d144939495650bb5cc49e1134c
2023-03-28 14:15:43 -07:00
Kubernetes Publisher
9e63bf0275 Merge pull request #117985 from howardjohn/patch-2
Fix comments on InformerFor

Kubernetes-commit: 54d2ced4d6e6e03f6e411f3c77f33bcc9ff809e1
2023-05-16 17:10:27 +00:00
Kubernetes Publisher
c2105c1815 Merge pull request #118014 from liggitt/mapstructure
Update kube-openapi, drop mapstructure

Kubernetes-commit: ea4cc84cf7c47d2bc45730ea2563bc320dfe5ff1
2023-05-16 01:12:09 +00:00
Jordan Liggitt
9cbecd3bd0 Update kube-openapi, drop mapstructure
Kubernetes-commit: d6d1dbdd82a412a06cdf458ca40836a018670131
2023-05-15 16:42:00 -04:00
John Howard
73d5348976 codegen
Kubernetes-commit: 3867569ae275b056e7f25b2228a5887dd9fa422b
2023-05-15 10:16:18 -07:00
Kubernetes Publisher
578f82a568 Merge pull request #117982 from jpbetz/sig-roles-jpbetz
Add api-machinery TL owners permissions for jpbetz

Kubernetes-commit: 1487fc762ff9b23952a75b69ca2b152efd3f7238
2023-05-15 17:04:28 +00:00
Kubernetes Publisher
435f839a9e Merge pull request #117645 from humblec/etcd-2
dependencies: update etcd dependencies to v3.5.9

Kubernetes-commit: 3a65b989e3db450029e796b370d103fe2c43006b
2023-05-15 17:04:27 +00:00
Kubernetes Publisher
79d967dc52 Merge pull request #117139 from pohly/test-integration-race-detection-update-utils
dependencies: bump k8s.io/utils

Kubernetes-commit: 87d8c4ed0ab58c5d19a4f2513fb49b920fdef346
2023-05-15 17:04:25 +00:00
Joe Betz
2c19e72cd0 Add api-machinery TL owners permissions for jpbetz
Kubernetes-commit: f0f92853ad82cba33c95803d9f869eaeba6cc3a7
2023-05-12 13:06:12 -04:00
Humble Chirammal
d400a4ae88 update vendor dependencies for the change
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: dcefc42b35acb229fcf95a172bfd635ee615d1be
2023-05-11 21:58:39 +05:30
Humble Chirammal
81fe15039a etcd depdencies are updated to v3.5.9
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: ae749238786f0c7b32a5291dd52ca31ea7c4fd18
2023-05-11 21:25:46 +05:30
Patrick Ohly
c1b43e3ea9 dependencies: bump k8s.io/utils
This includes a fix for a race condition.

Kubernetes-commit: 83fb5a50bc97cb58705084c0750f5a6b16fdf219
2023-04-06 13:11:47 +02:00
Kubernetes Publisher
2b18fa2c7a Merge pull request #117946 from lavalamp/lavalamp-taking-a-break
lavalamp is taking a long break

Kubernetes-commit: 8479db5876e95de535d9a8a361b6a2bff8251ea3
2023-05-13 01:08:23 +00:00
Kubernetes Publisher
f5cc996aa0 Merge pull request #117961 from humblec/ginkgo
ginkgo update to v2.9.4 and gomega to 1.27.6

Kubernetes-commit: 84c8abfb8bf900ce36f7ebfbc52794bad972d8cc
2023-05-12 17:14:55 +00:00
Kubernetes Publisher
54dbcc99c2 Merge pull request #116761 from iancoolidge/devel-cpuset-revendor
Complete cpuset export to k/utils by revendoring

Kubernetes-commit: 8f9c18569616eb65666a9271c3dd4d87b46ccece
2023-05-12 17:14:52 +00:00
Humble Chirammal
719a53871d ginkgo update to v2.9.4 and gomega to 1.27.6
https://github.com/onsi/ginkgo/v2/compare/v2.9.1...v2.9.4
 https://github.com/onsi/gomega/compare/v1.27.4...v1.27.6

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

Kubernetes-commit: cbe825b2b6cde3ae6e13b75e459227c71ea7e1f7
2023-05-12 09:33:31 +05:30
Kubernetes Publisher
23a9e82799 Merge pull request #117295 from aojea/transport_cache_metrics
add new metric for the internal client-go cache size

Kubernetes-commit: 64af2d93e5b97e41bb078e2fa81923fda6681154
2023-05-11 18:40:35 +00:00
Daniel Smith
aa75d3bd59 lavalamp is taking a long break
Kubernetes-commit: 1ffe3f467e8b8033312b7c68943d58125fd27663
2023-05-11 16:43:38 +00:00
Antonio Ojea
7cf3125431 add new metrics for the internal client-go transport generator
Add two new metrics to monitor the client-go logic that
generate http.Transports for the clients.

- rest_client_transport_cache_entries is a gauge metrics
with the number of existin entries in the internal cache

- rest_client_transport_create_calls_total is a counter
that increments each time a new transport is created, storing
the result of the operation needed to generate it: hit, miss
or uncacheable

Change-Id: I2d8bde25281153d8f8e8faa249385edde3c1cb39

Kubernetes-commit: 3f3e1d507d081528ce8081f0daf4446d8a3b9bc0
2023-05-10 22:40:13 +00:00
Kubernetes Publisher
783d0d3362 Merge pull request #116506 from HirazawaUi/fix-events-field
generate ReportingInstance and ReportingController in Event

Kubernetes-commit: b277afdf469c959955a2818b85fb1e4333ba3c11
2023-05-09 21:25:18 +00:00
Min Ni
a3b4cd32e5 update serial number to a valid non-zero number in ca certificate (#117791)
* update serial number to a valid non-zero number in ca certificate

* fix the existing problem (0 SerialNumber in all certificate) as part of this PR in a separate commit

Kubernetes-commit: e865b30abd0a862697ff1d2526ea8897ee98a523
2023-05-09 17:07:46 +00:00
Kubernetes Publisher
bbdc95deee Merge pull request #117422 from cbandy/client-go-testing-setenv
Replace os.Setenv with testing.T.Setenv in tests

Kubernetes-commit: 940101e07e1fbf45747ef67bca43b645b2a67065
2023-05-05 09:05:44 +00:00
Kubernetes Publisher
383ccb06d0 Merge pull request #117713 from flant/ssr-ga
KEP-3325: Promote SelfSubjectReview to GA

Kubernetes-commit: 78833e1b3385ea3485d38aa46586d39195377ec9
2023-05-03 18:02:28 +00:00
Kubernetes Publisher
bea472626f Merge pull request #117687 from pohly/klog-update
dependencies: klog v2.100.1

Kubernetes-commit: a6825c8542ee1e5e9d570ba1c267458a09287015
2023-05-03 18:02:26 +00:00
Kubernetes Publisher
d8abacd71f Merge pull request #117716 from thockin/validation_test_whitespace
Clean up brace whitespace in **/validation_test.go

Kubernetes-commit: 2e78e07ee56e4c7a6e764af39735a36454768ab4
2023-05-02 17:45:21 +00:00
Kubernetes Publisher
1513f87e7a Merge pull request #94021 from timoreimann/support-specifying-custom-lb-retry-period-from-cloud-provider
Support specifying custom LB retry period from cloud provider

Kubernetes-commit: f51dad586ddc1a02b4fcc4e3974092ad78b630a7
2023-05-02 09:44:08 +00:00
Tim Hockin
54190dfee5 Clean up brace whitespace in **/validation_test.go
This was making my eyes bleed as I read over code.

I used the following in vim.  I made them up on the fly, but they seemed
to pass manual inspection.

:g/},\n\s*{$/s//}, {/
:w
:g/{$\n\s*{$/s//{{/
:w
:g/^\(\s*\)},\n\1},$/s//}},/
:w
:g/^\(\s*\)},$\n\1}$/s//}}/
:w

Kubernetes-commit: d55b67b349021b6c46fc6ce78f2a36bd4217145f
2023-05-02 00:36:15 -07:00
Kubernetes Publisher
71d8553562 Merge pull request #115843 from rikatz/remote-netpol-status
Remove/Withdraw  NetworkPolicy Status

Kubernetes-commit: d6471d01a43d575351ec505f95a3691c977caccd
2023-05-02 05:34:53 +00:00
m.nabokikh
8009187f26 KEP-3325: Promote SelfSubjectReview to GA
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

Kubernetes-commit: 40de26dcff80f29380a4ba90a93ce3ece7482b78
2023-05-02 01:26:20 +02:00
Patrick Ohly
a4fdfdae72 dependencies: klog v2.100.1
Kubernetes-commit: 5fff8cae749cefbac63173f176831ea007b95b3a
2023-04-29 20:47:44 +02:00
Chris Bandy
18ffb5c67f Replace os.Setenv with testing.T.Setenv in tests
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.

Kubernetes-commit: 89467ad3e9b051515fa9632a7373d6ef01723256
2023-04-15 10:09:47 -05:00
HirazawaUi
0a0ddf8b6b generate ReportingInstance and ReportingController in Event
Kubernetes-commit: df0a25382053bb6c0f04fc4d807be6e059b552c1
2023-03-27 22:23:45 +08:00
Ian K. Coolidge
f4ef3f8afe Update k8s.io/utils version to v0.0.0-20230313181309-38a27ef9d749
Steps:
1) Manualy update go.mod with new version string
2) ./hack/update-vendor.sh
3) Fixup go.sum with new package hash
4) ./hack/update-vendor.sh

Kubernetes-commit: 9f46cbc6fa475c420af3ccd654d4e59606375836
2023-03-18 14:52:37 +00:00
Kensei Nakada
a46288252b feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity
Kubernetes-commit: d5d3c26337af418555fe6f62f86b9aaf38dc59d3
2023-02-26 04:25:59 +00:00
Ricardo Katz
224050a5b5 Generated files for NetworkPolicyStatus removal
Kubernetes-commit: ec997d5433afc09e79376e35936a027dc2ba8713
2023-02-16 14:31:49 -03:00
Kubernetes Publisher
10f4062eb6 Merge pull request #117705 from Jefftree/update-openapi-fix-race
Update kube-openapi to fix race

Kubernetes-commit: 3f8c4794eadf8aadd8a5bcb0b875bf0af5c2020b
2023-05-01 21:41:35 +00:00
Kubernetes Publisher
757bbef10a Merge pull request #117623 from skitt/intstr-fromint32-api-machinery
API machinery: use new intstr functions

Kubernetes-commit: 32703dec0faa19762f3cde83cfefae981de62027
2023-05-01 21:41:33 +00:00
Kubernetes Publisher
337feac705 Merge pull request #117576 from wzshiming/fix/clientcmd-localtion-of-origin
Fix LocationOfOrigin shows up unexpectedly

Kubernetes-commit: 34d6b92a8ceaf0b2243dd62b1f3517878fc75e35
2023-05-01 17:50:53 +00:00
Kubernetes Publisher
741627a2eb Merge pull request #117253 from akhilerm/update-containerd-dependencies
dependencies: update cgroups, ttrpc, ebpf versions

Kubernetes-commit: d33853edcfdb521c80cd9a659ed02b7fe52b40f4
2023-05-01 17:50:51 +00:00
Jefftree
fa6d692ff2 Update kube-openapi to fix race
Kubernetes-commit: de34540248a6cd4335a6aedd3f1d24c608d59c86
2023-05-01 17:19:03 +00:00
Shiming Zhang
3b78b11d95 Add json tag
Kubernetes-commit: d0677f528c03ff5556830bc2e9b9c40824b160ee
2023-05-01 23:05:32 +08:00
Arda Güçlü
fc96cec338 Use absolute path instead requestURI in openapiv3 discovery (#117495)
Currently, openapiv3 discovery uses requestURI to discover resources.
However, that does not work when the rest endpoint contains prefixes
(e.g. `http://localhost/test-endpoint/`).
Because requestURI overwrites prefixes also in rest endpoint
(e.g. `http://localhost/openapiv3/apis/apps/v1`).

Since `absPath` keeps the prefixes in the rest endpoint,
this PR changes to absPath instead requestURI.

Kubernetes-commit: d94c733ee2bfaedd9a1c45d58fbd56c99403c94d
2023-04-29 18:28:27 +03:00
Kubernetes Publisher
f775857c5d Merge pull request #117534 from Mskxn/fix_watcher
stop watcher when error occurs

Kubernetes-commit: 041bb9a56cb56ebf4ff9305f435a71c135bfc19c
2023-04-27 13:49:25 +00:00
Kubernetes Publisher
68394bf465 Merge pull request #117571 from seans3/agg-discovery-fix
Fixes bug when extra params added to discovery content-type

Kubernetes-commit: c5c2806e233b9c5ff49ac4ad0c6d734b530771de
2023-04-26 21:42:58 +00:00
Kubernetes Publisher
6aab78468d Merge pull request #116191 from aojea/spdy_passthrugh
improve remotecommand testing fuzzing the data stream

Kubernetes-commit: 928adb27abf755b402be7594844e3c248b0b7670
2023-04-26 17:48:31 +00:00
Msk233
5d5619d392 stop watcher when error occurs
Kubernetes-commit: da3e7e3781650024e4cc7cb65082908c531e8efa
2023-04-26 09:04:33 +08:00
Kubernetes Publisher
6c514ab3ff Merge pull request #117558 from wojtek-t/remove_multi_lock
Remove support for EndpointsLeases and ConfigMapsLeases lock from leader election

Kubernetes-commit: ff1e3ee26e94597f386b75fb60c5e2af6535a5be
2023-04-25 11:06:16 -07:00
Shiming Zhang
1ec6a37b5c Fix LocationOfOrigin shows up unexpectedly
Kubernetes-commit: 4d9261c7567a7498d16754b7c5bf3b9ea834e5a6
2023-04-25 10:58:07 +08:00
Sean Sullivan
5c4e72cc66 Refactors discovery content-type and helper functions
Kubernetes-commit: 2af662b05fe591083a029520e6da5b077cad8e31
2023-04-24 17:40:07 -07:00
Wojciech Tyczyński
27bbe76535 Remove support for EndpointsLeases and ConfigMapsLeases lock from leader election
Kubernetes-commit: 2bd42061b6e8035c3def54545ccc4baf95bd6586
2023-04-24 15:08:10 +02:00
Kubernetes Publisher
b26f379fe1 Merge pull request #117350 from mohitsharma-in/update/google-golang-protobuf
Dependencies: Update google.golang.org/protobuf v1.30.0

Kubernetes-commit: b925ce244638187dbf0f502ecb6e02db149970aa
2023-04-25 17:51:11 +00:00
Kubernetes Publisher
d2b87849d5 Merge pull request #117483 from ArkaSaha30/bump-gofuzz
dependencies:update `github.com/google/gofuzz` to v1.2.0

Kubernetes-commit: 7fbe3cba41915cad69f376eb6b3d3a326d51cd11
2023-04-24 21:58:24 +00:00
Kubernetes Publisher
e846cbee0d Merge pull request #117482 from ArkaSaha30/bump-go-logr
dependencies:update `github.com/go-logr/logr` to v1.2.4

Kubernetes-commit: f77e570fbadbf91c05840a1f6f9b6aec860de400
2023-04-24 21:58:15 +00:00
Akhil Mohan
a9d165e169 chore: update cgroups and ttrpc versions
- update github.com/containerd/cgroups to v1.1.0
- update github.com/containerd/ttrpc to v1.2.1

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>

Kubernetes-commit: 76fe41a996ec78d9774e1f1ca9d1d7ec40522f98
2023-04-23 22:23:42 -07:00
Kubernetes Publisher
bc930747ec Merge pull request #116972 from apelisse/update-openapi-file-client
openapi: Make file client more easy to re-use

Kubernetes-commit: 065428befa06c1d99deb4160b4490a8bf1a377ee
2023-04-21 05:44:30 +00:00
Kubernetes Publisher
861f50a667 Merge pull request #117352 from mohitsharma-in/update/golang_x_tools
dependencies: Update golang.org/x/tools to v0.8.0

Kubernetes-commit: bda7e8979088614c60ee21fd2602d00786e2ea78
2023-04-20 09:58:09 +00:00
ArkaSaha30
e367d8e4c2 update gofuzz dependency
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>

Kubernetes-commit: 1d15354ccb56b2e367cc403777255125ef65b7df
2023-04-19 21:08:16 +05:30
ArkaSaha30
061a00296e Update go-logr dependencies
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>

Kubernetes-commit: 2cd23c8b17c93f75a30cf3f651369d7a932aef2d
2023-04-19 21:01:55 +05:30
Mohit Sharma
23557e107c Dependencies Update golang.org/x/tools v0.7.0 to v0.8.0
Kubernetes-commit: 6f90c5363301c9417a3a806cac69f3e79e66a66c
2023-04-14 04:39:43 -07:00
Kubernetes Publisher
c84a3771c0 Merge pull request #117399 from mohitsharma-in/update/golang_time
dependencies : Update golang.org/x/time v0.3.0

Kubernetes-commit: cf89189ca3a3e5d280ba1cb09998c4b88dc1e127
2023-04-19 13:48:47 +00:00
Mohit Sharma
34d738fb5d Dependencies Update golang.org/x/timet 90d013bbcef8 to v0.3.0
Kubernetes-commit: 4d73864026cde02f4a1cdf9e889a124174d38e38
2023-04-16 22:18:35 -07:00
Mohit Sharma
1aeffb0799 Dependencies Update google.golang.org/protobuf v1.28.1 to v1.30.0
Kubernetes-commit: 8efeb5afcfd006a48d6e1263a5cf8de3284797df
2023-04-14 04:28:47 -07:00
Kubernetes Publisher
1dc92da663 Merge pull request #117278 from haoruan/cleanup/replace-spew-with-dump
replace spew methods with dump methods

Kubernetes-commit: d060d487dcd74bc1a557f9378035696db40c64c2
2023-04-14 05:53:56 +00:00
Kubernetes Publisher
4e89310f6e Merge pull request #117285 from humblec/azure-go-autorest
dependencies: update gh/Azure/auto-test/{adal,validation}

Kubernetes-commit: ba0a8f9cceb513bc36bd803e9bf8f9a8c3912ff2
2023-04-13 21:52:00 +00:00
Humble Chirammal
8b888b0027 dependencies: update gh/Azure/auto-test/{adal,validation}
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: 6d13cad2cf56d0bad77a6410a0c36b2cf8f0df57
2023-04-13 23:25:48 +05:30
Kubernetes Publisher
46f963913c Merge pull request #116896 from thockin/apimachinery_util_diff_cleanup
apimachinery util/diff cleanups

Kubernetes-commit: c3e3ff989ac9abfb0dc3b958fcb698fcce952f8c
2023-04-13 12:51:58 +00:00
Hao Ruan
ef522cc423 replace spew methods with dump methods
Kubernetes-commit: c4e1b01416ec05e6a520a181d4ce3b4333adb4e4
2023-04-13 09:41:07 +08:00
Antoine Pelisse
12beb34ceb openapi: Make file client more easy to re-use
A few notes about the change:
1. I need to initialize the fileclient once, in an init function, so I
don't have access to `testing.T` yet.
2. I want to be able to configure the openapi files that I use
3. We already have a "cache" client that wraps another client, we don't
need to re-implement caching here, one can just do:
`cache.NewClient(openapitest.NewFileClient("some/path"))` to do a cached
client. Or initialize it in an init/global var.

Since there is still some value to use the embedded file, make an
alternative constructor while using fs.FS interface to be able to
manipulate both virtual and disk-based filesystems.

Kubernetes-commit: 29503fd8d45bc2c9438e92936bf4111162529b40
2023-03-28 13:40:28 -07:00
Tim Hockin
12553015e2 Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: bc302fa4144d21a338683cd83701661f97be4aba
2023-03-23 11:34:03 -07:00
Tim Hockin
c4339eeca9 Replace uses of ObjectGoPrintDiff with cmp.Diff
ObjectGoPrintDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: 9627c50ef37f3b5274486e6f5ad37b73b1b69bf0
2023-03-23 11:31:25 -07:00
Tim Hockin
7114041b4f Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or
behavior changes

Kubernetes-commit: 29c0b73d640b6e50c4f2dfeee7b07ca66a530dbd
2023-03-23 11:29:01 -07:00
Kubernetes Publisher
8005e0d28b Merge pull request #116869 from MikeSpreitzer/add-structure
Add structured alternatives to strings in client-go/tools/cache

Kubernetes-commit: 5052d31d6582c58cd82ccba084b11590fc82ba47
2023-04-12 04:02:58 +00:00
Kubernetes Publisher
20bcfef42d Merge pull request #114800 from haoruan/feature-8976-spew-sprintf-refactor
Capture spew.Sprintf() with all our favorite config into a util func

Kubernetes-commit: d0fc9d16ce1c8ac523e9dc90e14af542b09cd3b3
2023-04-12 00:07:19 +00:00
Kubernetes Publisher
04ef61f72b Merge pull request #116948 from MadhavJivrajani/fix-verify-vendor
.*: update vendor dir and cleanup

Kubernetes-commit: 3a46f2611503b4d8a8ab557bf2541ac9c1be695a
2023-03-27 18:23:04 +00:00
Madhav Jivrajani
012beed4e0 .*: update vendor dir and cleanup
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 63b5ca69f1f481b2b4b2ee967f5b8b7b58937211
2023-03-27 19:18:05 +05:30
Mike Spreitzer
8301a60862 Added conversions to/from NamespacedName
Also renamed file to something more on-point.

Kubernetes-commit: 8d92cfb13163f596feddfe1b5e734fd1ba4f6323
2023-03-22 16:55:07 -04:00
Mike Spreitzer
42799afb70 Add structured alternatives to strings in client-go/tools/cache
Kubernetes-commit: ec9515a828ec3907ffc66913947adf4e8ee7b9d6
2023-03-22 16:21:17 -04:00
Kubernetes Publisher
1517ffb8d3 Merge pull request #116623 from lavalamp/xfrmr
change where transformers are called

Kubernetes-commit: 76d351065e504e23b7962158ef0e9067b6bd96ed
2023-03-17 00:11:43 +00:00
Kubernetes Publisher
308e6b1055 Merge pull request #113218 from ahmedtd/kep-3257
Add certificates.k8s.io/v1alpha1 ClusterTrustBundle

Kubernetes-commit: a34e37c9963af5944435b736882bfcd1e81f7e09
2023-03-16 20:00:06 +00:00
Daniel Smith
c3b84f0438 Change where transformers are called.
Kubernetes-commit: e76dff38cf74c3c8ad9ed4d3bc6e3641d9b64565
2023-03-14 23:05:20 +00:00
Stephen Kitt
20433f9965 api-machinery: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

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

Kubernetes-commit: 94410ee8078971b8894e5c400ce3fc79f02bc510
2023-03-14 16:17:48 +01:00
Antonio Ojea
9ed804b6d5 improve remotecommand testing fuzzing the data stream
Change-Id: I1303bc79a8c43fc4fb04bf76afcf90653ceb9e14

Kubernetes-commit: 60d25c3ed77cbd8341fc7ae984e165e7046e5c9b
2023-03-01 19:56:41 +00:00
Sunil Shivanand
aea98eb150 combine conditional checks
Signed-off-by: Sunil Shivanand <sunil.shivanand@statnett.no>

Kubernetes-commit: 80480f8e21572cba152a4f6f171ebb5de8c6bafb
2023-01-11 09:45:37 +01:00
Sunil Shivanand
0d54cf50db handle event errors caused due to terminating namespaces
Create events are forbidden in terminating namespaces, use info
instead of error to log the failed event.

Signed-off-by: Sunil Shivanand <sunil.shivanand@statnett.no>

Kubernetes-commit: 7a6d58001b7d824f92601fd246b3aad9fbb9c583
2023-01-05 12:56:40 +01:00
Hao Ruan
db3650d98f replaced spew.Sprintf with a util pretty print function
Kubernetes-commit: f638e2849fbddeb201b8290586a4747af99086bf
2023-01-04 14:12:56 +08:00
Timo Reimann
d3003795b3 Localize SpyWorkQueue to cloud-provider for now
Kubernetes-commit: 208af2d1d83488de933977849581207149b829ee
2022-11-09 07:32:40 +01:00
Taahir Ahmed
4c5879adb0 ClusterTrustBundles: make update
Kubernetes-commit: 2e4b637bf8f304c5264b93cced659c2bcbb66733
2022-11-07 11:45:53 -08:00
Max Smythe
4666344cbc Custom match criteria (#116350)
* Add custom match conditions for CEL admission

This PR is based off of, and dependent on the following PR:

https://github.com/kubernetes/kubernetes/pull/116261

Signed-off-by: Max Smythe <smythe@google.com>

* run `make update`

Signed-off-by: Max Smythe <smythe@google.com>

* Fix unit tests

Signed-off-by: Max Smythe <smythe@google.com>

* Fix unit tests

Signed-off-by: Max Smythe <smythe@google.com>

* Update compatibility test data

Signed-off-by: Max Smythe <smythe@google.com>

* Revert "Update compatibility test data"

This reverts commit 312ba7f9e74e0ec4a7ac1f07bf575479c608af28.

* Allow params during validation; make match conditions optional

Signed-off-by: Max Smythe <smythe@google.com>

* Add conditional ignoring of matcher CEL expression validation on update

Signed-off-by: Max Smythe <smythe@google.com>

* Run codegen

Signed-off-by: Max Smythe <smythe@google.com>

* Add more validation tests

Signed-off-by: Max Smythe <smythe@google.com>

* Short-circuit CEL matcher when no matchers specified

Signed-off-by: Max Smythe <smythe@google.com>

* Run codegen

Signed-off-by: Max Smythe <smythe@google.com>

* Address review comments

Signed-off-by: Max Smythe <smythe@google.com>

---------

Signed-off-by: Max Smythe <smythe@google.com>

Kubernetes-commit: e5fd204c33e90a7e8f5a0ee70242f1296a5ec7af
2023-03-16 04:07:18 +00:00
Igor Velichkovich
38589731da Matchconditions admission webhooks alpha implementation for kep-3716 (#116261)
* api changes adding match conditions

* feature gate and registry strategy to drop fields

* matchConditions logic for admission webhooks

* feedback

* update test

* import order

* bears.com

* update fail policy ignore behavior

* update docs and matcher to hold fail policy as non-pointer

* update matcher error aggregation, fix early fail failpolicy ignore, update docs

* final cleanup

* openapi gen

Kubernetes-commit: 5e5b3029f3bbfc93c3569f07ad300a5c6057fc58
2023-03-15 06:19:12 +00:00
Kubernetes Publisher
445660b561 Merge pull request #116332 from klueska/extend-resourceclaimstatus
Update resource.AllocationResult with a slice of ResourceHandlers

Kubernetes-commit: ae36991498282514da3fe771b0dd9de66b991c86
2023-03-15 06:19:06 +00:00
Kubernetes Publisher
e023fb8815 Merge pull request #116119 from vinaykul/restart-free-pod-vertical-scaling-fixes
Restructure resize policy naming and set default resize policy values

Kubernetes-commit: 9053b5dc2c8e0b977e759b9f076d1a52bafabbb7
2023-03-15 06:18:59 +00:00
Kubernetes Publisher
9ff2627505 Merge pull request #115075 from aojea/ipaddress
IPAddress allocator

Kubernetes-commit: f44d561c1f8c327bdf2ff3bff175bd10d161454c
2023-03-15 06:18:52 +00:00
Kubernetes Publisher
84ae514115 Merge pull request #116539 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.9.1, gomega v1.27.3

Kubernetes-commit: f22504a9bafd5e34d86853a816d10578376aadc2
2023-03-15 06:18:45 +00:00
Kubernetes Publisher
ef07195878 Merge pull request #114242 from austince/feat/per-queue-metrics
Allow setting per-workqueue metrics providers

Kubernetes-commit: 98b1980a42ad197404d65a5022a32dcdc2087784
2023-03-15 06:18:38 +00:00
Kubernetes Publisher
23d016c390 Merge pull request #107826 from smarterclayton/context_wait
wait: Introduce new methods that allow detection of context cancellation

Kubernetes-commit: 5469b170fe8717cb9fae8f12498cd1afd5586891
2023-03-15 06:18:32 +00:00
Kubernetes Publisher
f3dc70cf10 Merge pull request #116603 from seans3/discovery-resilience
Aggregated discovery client resilient to nil GVK in response

Kubernetes-commit: a9fd6dfc736da314096f1fda24171119e58017c6
2023-03-15 06:18:27 +00:00
Kubernetes Publisher
48d97c09db Merge pull request #116556 from pohly/dra-podschedulingcontext
dra: PodScheduling -> PodSchedulingContext

Kubernetes-commit: fbfc887a097b2f7cddd065deacbff03abf0bfef6
2023-03-15 06:18:23 +00:00
Kubernetes Publisher
2a7ba94880 Merge pull request #112334 from dgrisonnet/fix-eventseries-count
Fix EventSeries starting count discrepancy

Kubernetes-commit: 689fc37dd2f92ca61f4f2405186cb7e097be3ab1
2023-03-15 06:18:17 +00:00
Kubernetes Publisher
3cafc13f5d Merge pull request #116299 from pohly/dra-v1alpha2
api: resource.k8s.io v1alpha1 -> v1alpha2

Kubernetes-commit: 0e06be57a65792ad5744b5ddf6abe95dd20ac773
2023-03-15 06:18:13 +00:00
Sean Sullivan
2bd557faec Aggregated discovery resilient to nil GVK
Kubernetes-commit: 26bf8a7ceb51bac357d8a02fd3e62b84363716db
2023-03-14 17:59:19 +00:00
Patrick Ohly
76262aa83e api: generated files for PodSchedulingContext
Kubernetes-commit: 2b8a4e809710f1b5eb3846a2964431a0266f287e
2023-03-13 23:16:18 +01:00
Patrick Ohly
a952148a50 dependencies: ginkgo v2.9.1, gomega v1.27.4
They contain some nice-to-have improvements (for example, better printing of
errors with gomega/format.Object) but nothing that is critical right now.

"go mod tidy" was run manually in
staging/src/k8s.io/kms/internal/plugins/mock (https://github.com/kubernetes/kubernetes/pull/116613
not merged yet).

Kubernetes-commit: fe59e091eb3331db54cff2351f16eabfe0cb681d
2023-03-13 16:06:20 +01:00
Antonio Ojea
568393e257 make update
Change-Id: I19e12ca05d977dca63043cb07ecf8a90e0e525c5

Kubernetes-commit: ba42ed9a49345f8a182829e72c7013ea3ff0d224
2023-03-12 13:50:02 +00:00
austin ce
21b4553e44 Allow custom metric provider for retry metrics
Kubernetes-commit: a60624ffbc265d61b35cab16ea9ded485909f3ed
2023-03-10 17:48:10 -05:00
austin ce
66fa9d308f Unify queue constructors, deprecate current constructors
Kubernetes-commit: fea83b78243c77e81b91f3f0a812979809aeacaf
2023-03-10 17:46:26 -05:00
Clayton Coleman
250fc3d6b4 wait: Update tests to reference the constant error
The structure of the error is changing, and we don't guarantee
reflect.DeepEqual(...) will remain true for ErrWaitTimeout currently.

Kubernetes-commit: 8d4004bbc77d012642db97e09238f4f65a926bca
2023-03-10 11:02:59 -06:00
Kevin Klues
ff60d1bd90 Update generated code for resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>

Kubernetes-commit: 452f345c472a206b148bbe7e4e27f772841dc363
2023-03-07 11:35:08 +00:00
Patrick Ohly
324f43b974 api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.

Kubernetes-commit: 29941b8d3e7928244f48b05bf5bd453221fe7a9d
2023-03-06 12:43:58 +01:00
Kubernetes Publisher
362ffe4fcd Merge pull request #115668 from jiahuif-forks/feature/validating-admission-policy/type-system
Type System for ValidatingAdmissionPolicy

Kubernetes-commit: 152876a3eb9c6211c48bb159c87e2bf834e4eedc
2023-03-15 06:18:05 +00:00
Jiahui Feng
8dcee0c630 generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh
Kubernetes-commit: deb467261ca23ca5decfdb6b67bef3591d4cb842
2023-03-13 19:44:28 -07:00
Kubernetes Publisher
b5e4a5a9c3 Merge pull request #116397 from jiahuif-forks/feature/validating-admission-policy/message-expression
MessageExpression for ValidatingAdmissionPolicy

Kubernetes-commit: 6b3e2b7873f8518b95f5b09fa04f5f316669c7b2
2023-03-14 05:26:20 +00:00
Kubernetes Publisher
471f66fb10 Merge pull request #116490 from tallclair/docs-urls2
Fix broken links in API documentation

Kubernetes-commit: 110541b3d72e32e0016061cbaaecb4db9683e1eb
2023-03-14 01:10:18 +00:00
Kubernetes Publisher
e4aa1125e3 Merge pull request #116542 from enj/enj/f/go1.20
Explicit bump to go 1.20

Kubernetes-commit: de9ce03f19e8b1ace1e79fae17119820c4232b67
2023-03-13 21:15:40 +00:00
Kubernetes Publisher
b14244a3db Merge pull request #116477 from twz123/synctrack-64bit-alignment
Properly align synctrack.SingleFileTracker struct

Kubernetes-commit: 077ca3b7367d0761eaee833dffb15e7eed73fa2a
2023-03-13 21:15:38 +00:00
Monis Khan
e0b969df98 Explicit bump to go 1.20
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: ba471884fba92246e1547ce4a27f9d5e735afc60
2023-03-13 12:47:36 -04:00
Tom Wieczorek
9e8c663097 Properly align synctrack.SingleFileTracker struct
count is used with atomic operations so it must be 64-bit aligned,
otherwise atomic operations will panic. Having it at the top of the
struct will guarantee that, even on 32-bit arches.

This fixes panics like that one observed in kube-apiserver:

    E0310 13:48:47.476124     676 runtime.go:77] Observed a panic: unaligned 64-bit atomic operation
    goroutine 141 [running]:
    k8s.io/apimachinery/pkg/util/runtime.logPanic({0x2482378, 0x2db2ff8})
    	vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:75 +0x94
    k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x0})
    	vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:49 +0x78
    panic({0x2482378, 0x2db2ff8})
    	/usr/local/go/src/runtime/panic.go:884 +0x218
    runtime/internal/atomic.panicUnaligned()
    	/usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
    runtime/internal/atomic.Load64(0x685f794)
    	/usr/local/go/src/runtime/internal/atomic/atomic_arm.s:280 +0x14
    k8s.io/client-go/tools/cache/synctrack.(*SingleFileTracker).HasSynced(0x685f790)
    	vendor/k8s.io/client-go/tools/cache/synctrack/synctrack.go:115 +0x3c
    k8s.io/client-go/tools/cache.(*processorListener).HasSynced(0x6013e60)
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:907 +0x20
    k8s.io/client-go/tools/cache.WaitForCacheSync.func1()
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:332 +0x50
    k8s.io/apimachinery/pkg/util/wait.ConditionFunc.WithContext.func1({0x2dcf274, 0x607c600})
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:222 +0x1c
    k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext({0x2dcf274, 0x607c600}, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:262 +0x64
    k8s.io/apimachinery/pkg/util/wait.waitForWithContext({0x2dcf274, 0x607c600}, 0x64a6060, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:649 +0x11c
    k8s.io/apimachinery/pkg/util/wait.poll({0x2dcf274, 0x607c600}, 0x1, 0x64a6060, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:600 +0xc4
    k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext({0x2dcf274, 0x607c600}, 0x5f5e100, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:551 +0x60
    k8s.io/apimachinery/pkg/util/wait.PollImmediateUntil(0x5f5e100, 0x6298020, 0x607c600)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:542 +0x48
    k8s.io/client-go/tools/cache.WaitForCacheSync(0x607c600, {0x6298000, 0x3, 0x3})
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:329 +0x80
    k8s.io/client-go/tools/cache.WaitForNamedCacheSync({0x283c5e1, 0xf}, 0x607c600, {0x6298000, 0x3, 0x3})
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:316 +0xe8
    created by k8s.io/kubernetes/plugin/pkg/auth/authorizer/node.AddGraphEventHandlers
    	plugin/pkg/auth/authorizer/node/graph_populator.go:65 +0x5b0
    panic: unaligned 64-bit atomic operation [recovered]
    	panic: unaligned 64-bit atomic operation

    goroutine 141 [running]:
    k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x0})
    	vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:56 +0xf4
    panic({0x2482378, 0x2db2ff8})
    	/usr/local/go/src/runtime/panic.go:884 +0x218
    runtime/internal/atomic.panicUnaligned()
    	/usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
    runtime/internal/atomic.Load64(0x685f794)
    	/usr/local/go/src/runtime/internal/atomic/atomic_arm.s:280 +0x14
    k8s.io/client-go/tools/cache/synctrack.(*SingleFileTracker).HasSynced(0x685f790)
    	vendor/k8s.io/client-go/tools/cache/synctrack/synctrack.go:115 +0x3c
    k8s.io/client-go/tools/cache.(*processorListener).HasSynced(0x6013e60)
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:907 +0x20
    k8s.io/client-go/tools/cache.WaitForCacheSync.func1()
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:332 +0x50
    k8s.io/apimachinery/pkg/util/wait.ConditionFunc.WithContext.func1({0x2dcf274, 0x607c600})
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:222 +0x1c
    k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext({0x2dcf274, 0x607c600}, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:262 +0x64
    k8s.io/apimachinery/pkg/util/wait.waitForWithContext({0x2dcf274, 0x607c600}, 0x64a6060, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:649 +0x11c
    k8s.io/apimachinery/pkg/util/wait.poll({0x2dcf274, 0x607c600}, 0x1, 0x64a6060, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:600 +0xc4
    k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext({0x2dcf274, 0x607c600}, 0x5f5e100, 0x6382050)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:551 +0x60
    k8s.io/apimachinery/pkg/util/wait.PollImmediateUntil(0x5f5e100, 0x6298020, 0x607c600)
    	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:542 +0x48
    k8s.io/client-go/tools/cache.WaitForCacheSync(0x607c600, {0x6298000, 0x3, 0x3})
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:329 +0x80
    k8s.io/client-go/tools/cache.WaitForNamedCacheSync({0x283c5e1, 0xf}, 0x607c600, {0x6298000, 0x3, 0x3})
    	vendor/k8s.io/client-go/tools/cache/shared_informer.go:316 +0xe8
    created by k8s.io/kubernetes/plugin/pkg/auth/authorizer/node.AddGraphEventHandlers
    	plugin/pkg/auth/authorizer/node/graph_populator.go:65 +0x5b0

Kubernetes-commit: ffcf653e0666366e6241c99d9418e830840afa0f
2023-03-13 08:37:13 +01:00
Kubernetes Publisher
012954e4d5 Merge pull request #116450 from vinaykul/restart-free-pod-vertical-scaling-api
Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources

Kubernetes-commit: 3c6e419cc3e364e0fce874e6c51ca058f1b9daab
2023-03-13 01:21:52 +00:00
Tim Allclair
b8c2b4bd8c Fix broken API docs URLs
Kubernetes-commit: ea974280dc9948e31d426ee6366abff0957a5f82
2023-03-10 19:18:06 -08:00
Jiahui Feng
d2cdd64ea8 generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh
Kubernetes-commit: 1fff4949bd3168bea68f9d64525f394fd6821c54
2023-03-10 09:03:49 -08:00
Kubernetes Publisher
6df09021f9 Merge pull request #116435 from pohly/client-go-cache-reflector-leak
client-go: shut down watch reflector as soon as stop channel closes

Kubernetes-commit: fcfe5dfc2177320833caa451b401f2d1dc5668e7
2023-03-10 17:01:51 +00:00
Kubernetes Publisher
1f020beddb Merge pull request #110772 from p0lyn0mial/upstream-reflector-gets-stream
client-go: Add support for API streaming to the reflector

Kubernetes-commit: 90c3232de77aa0dd09b948ffdd27c575688fba8a
2023-03-10 17:01:47 +00:00
Kubernetes Publisher
d2ebc4d27c Merge pull request #116349 from apelisse/use-smarter-cache
Update kube-openapi to 15aac26d736a

Kubernetes-commit: a034962173e2b481d59e81178e3897870511ec7d
2023-03-10 08:45:19 +00:00
Kubernetes Publisher
756a0f3ae9 Merge pull request #114290 from Jefftree/mime-remove
remove mime AddExtensionType in discovery test

Kubernetes-commit: 37260b764811fc4f6ddddcb8b5b51f49f733c50c
2023-03-10 08:45:16 +00:00
vinay kulkarni
d906637aa7 Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources - generated files
Kubernetes-commit: 565fd4116df866a642e245d6ef9c2fe94448b265
2023-03-10 03:36:01 +00:00
Patrick Ohly
29ad2bc1d4 client-go: shut down watch reflector as soon as stop channel closes
Without this change, sometimes leaked goroutines were reported for
test/integration/scheduler_perf. The one that caused the cleanup to get delayed
was this one:

    goleak.go:50: found unexpected goroutines:
        [Goroutine 2704 in state chan receive, 2 minutes, with k8s.io/client-go/tools/cache.(*Reflector).watch on top of the stack:
        goroutine 2704 [chan receive, 2 minutes]:
        k8s.io/client-go/tools/cache.(*Reflector).watch(0xc00453f590, {0x0, 0x0}, 0x1f?, 0xc00a128080?)
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/cache/reflector.go:388 +0x5b3
        k8s.io/client-go/tools/cache.(*Reflector).ListAndWatch(0xc00453f590, 0xc006e94900)
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/cache/reflector.go:324 +0x3bd
        k8s.io/client-go/tools/cache.(*Reflector).Run.func1()
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/cache/reflector.go:279 +0x45
        k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc007aafee0)
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:157 +0x49
        k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc003e18150?, {0x75e37c0, 0xc00389c280}, 0x1, 0xc006e94900)
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:158 +0xcf
        k8s.io/client-go/tools/cache.(*Reflector).Run(0xc00453f590, 0xc006e94900)
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/client-go/tools/cache/reflector.go:278 +0x257
        k8s.io/apimachinery/pkg/util/wait.(*Group).StartWithChannel.func1()
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:58 +0x3f
        k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1()
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:75 +0x74
        created by k8s.io/apimachinery/pkg/util/wait.(*Group).Start
                /nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:73 +0xe5

watch() was stuck in an exponential backoff timeout. Logging confirmed that:

        I0309 21:14:21.756149 1572727 reflector.go:387] k8s.io/client-go/informers/factory.go:150: watch of *v1.PersistentVolumeClaim returned Get "https://127.0.0.1:38269/api/v1/persistentvolumeclaims?allowWatchBookmarks=true&resourceVersion=1&timeout=7m47s&timeoutSeconds=467&watch=true": dial tcp 127.0.0.1:38269: connect: connection refused - backing off

Kubernetes-commit: b4751a52d53d4acc6a5ce3e796938c9a12f81fcb
2023-03-09 21:19:17 +01:00
Kubernetes Publisher
65be885753 Merge pull request #116409 from p0lyn0mial/upstream-reflector-list-n-watch
reflector: allow watch method to accept a watcher

Kubernetes-commit: 20e44913853fba580997cacad594e5274613bd2d
2023-03-09 15:59:46 +00:00
Maksim Nabokikh
64e2c7ff16 KEP-3325: Promote SelfSubjectReview to Beta (#116274)
* Promote SelfSubjectReview to Beta

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fix whoami API

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fixes according to code review

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

---------

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

Kubernetes-commit: c1431af4f83b2b06a581f23806ee12a0663fed3b
2023-03-09 03:35:44 +00:00
Kubernetes Publisher
223d456ea2 Merge pull request #116145 from seans3/discovery-stale
Surface "stale" GroupVersions from AggregatedDiscovery

Kubernetes-commit: b1ba5c54625efc61931fbdf831044c76780dd8b4
2023-03-08 23:43:50 +00:00
Kubernetes Publisher
e6ae4ec2c5 Merge pull request #116354 from pacoxu/cleanup-CronJobTimeZone
cleanup: sync testdata as CronJobTimeZone is GAed

Kubernetes-commit: a66e13921408b0db8956e6d76feb5db1388f7603
2023-03-08 19:49:17 +00:00
Lukasz Szaszkiewicz
ac7598edb4 reflector: allow watch method to accept a watcher
Kubernetes-commit: f6161a51e93bfa70585f1797f447f13ec1fde68b
2023-03-08 12:52:32 +01:00
Paco Xu
7bf37ef90f cleanup: sync testdata as CronJobTimeZone is GAed
Kubernetes-commit: 23a583dc3679111d5aaebf2a87db67e4d7c58739
2023-03-08 13:15:46 +08:00
Lukasz Szaszkiewicz
262b98af03 cache/controller: Add ENABLE_CLIENT_GO_WATCH_LIST_ALPHA
Kubernetes-commit: 966b26d55c22f7fbf20841a3a993de4f984d88db
2023-03-07 12:34:11 +01:00
Kubernetes Publisher
60e53732bb Merge pull request #115973 from jpbetz/enforcement-actions
KEP-3488: Implement Enforcement Actions and Audit Annotations

Kubernetes-commit: 04675428bbfc9bf7ba4c9e1abfc427b6228069d9
2023-03-07 07:41:01 +00:00
Joe Betz
bbbf092e1d Generate code
Kubernetes-commit: 932a4d97249cb79f3041b5d8842425b0ed7275b3
2023-03-06 17:30:37 -05:00
Kubernetes Publisher
48ca73428a Merge pull request #115978 from seans3/discovery-empty-response
"empty response" not logged as error in memcache discovery client

Kubernetes-commit: 6bfa9371cffc66e7b80a848d72b81d4007ab05b8
2023-03-06 19:38:33 +00:00
Kubernetes Publisher
29a689d161 Merge pull request #116297 from p0lyn0mial/upstream-reflector-list-n-watch-refactor
reflector: extract watch and startResyncAsync methods

Kubernetes-commit: 778b24c97e189dcc8f14a81ce32e022b959f8fd3
2023-03-06 15:46:20 +00:00
Lukasz Szaszkiewicz
ac0a428e7a reflector watchlist tests
Kubernetes-commit: 194ffd779e7699c3f756f12e604b479b73f9f66c
2023-03-06 09:24:36 +01:00
Lukasz Szaszkiewicz
b33e818785 reflector: use watchlist
Kubernetes-commit: 51ec7305aa9fc2541c46c4836f5e150c818341f9
2023-03-09 14:11:59 +01:00
Lukasz Szaszkiewicz
d1c260eddc reflector: introduce watchList
Kubernetes-commit: 2fed6b8a19dde62fb6824aa9d008baedf51c2466
2023-03-09 14:08:58 +01:00
Kubernetes Publisher
06ad6b391d Merge pull request #116166 from pohly/test-go-vet
fix "go vet" issues, check as part of golangci-lint

Kubernetes-commit: ff735dff85367c2a096c4065b8b3c1fbbeecabc4
2023-03-04 00:02:04 +00:00
Kubernetes Publisher
d39f8291fc Merge pull request #116162 from apelisse/update-openapi
Update kube-openapi to afdc3dddf62d31f5e3868d699379c571a6007920

Kubernetes-commit: 253ab3eda71f250ad6692bb16f035cebaf0651c9
2023-03-04 00:02:02 +00:00
Antoine Pelisse
59fa142a96 Update kube-openapi to afdc3dddf62d31f5e3868d699379c571a6007920
Kubernetes-commit: 736123f447219375219a23b9acc9d550fe8ec4c4
2023-03-03 08:43:44 -08:00
Kubernetes Publisher
bfa72fd2d3 Merge pull request #116237 from seans3/openapi3-add-error
Add custom error struct for Group/Version not found

Kubernetes-commit: a6c775333cb1012ecdc192b68f7a411e38ff4ae7
2023-03-02 22:56:57 -08:00
Sean Sullivan
4c5eaaf0d7 Add custom error struct for Group/Version not found
Kubernetes-commit: dc83af0b44bd6432dea3ccd29a77ca3a0b6122a2
2023-03-03 00:01:22 +00:00
Kubernetes Publisher
3f4372de09 Merge pull request #115865 from seans3/discovery-client-cleanup
Updates old 403 and 404 discovery response tolerations

Kubernetes-commit: e0ca10118e0aa0076a49a6f96ea96534ffe30dcd
2023-03-03 00:01:45 +00:00
Lukasz Szaszkiewicz
f694a7978b reflector: extract watch and startResyncAsync methods
Kubernetes-commit: 34fe27355b8b5acc4d29d053ed4361b4f72e147b
2023-03-02 16:26:41 +01:00
Kubernetes Publisher
02d652e007 Merge pull request #116195 from seans3/openapi3-root-fix
Fixes bug with Root not handling Group without Version

Kubernetes-commit: bb8e9f3afb961920ef62dc073b283f3724d5adb2
2023-03-02 01:18:32 +00:00
Kubernetes Publisher
91199a69ee Merge pull request #115277 from pohly/klog-update
klog update

Kubernetes-commit: 51dedff4f3efd407ebf47de11d0db521274471a3
2023-03-02 01:18:31 +00:00
Sean Sullivan
6ddf61b8c1 Fixes bug with Root not handling Group without Version
Kubernetes-commit: 17cd59ec1cf5c0a83d52bc94995025e802f1a123
2023-03-01 21:24:02 +00:00
John Howard
089d04441d client-go: support Shutdown() for metadata and dynamic informers (#114434)
* client-go: support `Shutdown()` for metadata and dynamic informers

Followup to https://github.com/kubernetes/kubernetes/pull/112200,
specifically
https://github.com/kubernetes/kubernetes/pull/112200#issuecomment-1344812038.

* add comments

* Defer lock

Kubernetes-commit: b99fe0d5b9896dd3fe9a2c1bc3b399a18ad080d2
2023-02-28 23:09:17 -08:00
Kubernetes Publisher
9ea785f819 Merge pull request #116090 from abserari/patch-1
Typo: fix EndpointsLeasesResourceLock ->ConfigMapsLeasesResourceLock

Kubernetes-commit: 11ff3fbeeeba56b28be3bf0badf8b49ec7d9fc2b
2023-03-01 01:18:45 +00:00
Patrick Ohly
3259c410fa staging: fix "go vet" issues
These issues were not found earlier because "make vet" ignored staging. Some of
these fixes are stylistic and/or don't matter in practice, but all of the
loopclosure issues seem to be real: those tests didn't run as intended.

Here's the full error report:

staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go:304:11: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersion struct literal uses unkeyed fields (govet)
				gv := schema.GroupVersion{crd.Spec.Group, v.Name}
				      ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go:790:119: composites: k8s.io/apimachinery/pkg/runtime/serializer/json.SerializerOptions struct literal uses unkeyed fields (govet)
			delegate := serializerjson.NewSerializerWithOptions(serializerjson.DefaultMetaFactory, unstructuredCreator{}, nil, serializerjson.SerializerOptions{tc.yaml, false, tc.strictDecoding})
			                                                                                                                   ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go:171:30: composites: k8s.io/apiserver/pkg/cel.Error struct literal uses unkeyed fields (govet)
		compilationResult.Error = &apiservercel.Error{apiservercel.ErrorTypeInvalid, "compilation failed: " + issues.String()}
		                           ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go:175:30: composites: k8s.io/apiserver/pkg/cel.Error struct literal uses unkeyed fields (govet)
		compilationResult.Error = &apiservercel.Error{apiservercel.ErrorTypeInvalid, "cel expression must evaluate to a bool"}
		                           ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go:182:30: composites: k8s.io/apiserver/pkg/cel.Error struct literal uses unkeyed fields (govet)
		compilationResult.Error = &apiservercel.Error{apiservercel.ErrorTypeInternal, "unexpected compilation error: " + err.Error()}
		                           ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go:201:30: composites: k8s.io/apiserver/pkg/cel.Error struct literal uses unkeyed fields (govet)
		compilationResult.Error = &apiservercel.Error{apiservercel.ErrorTypeInvalid, "program instantiation failed: " + err.Error()}
		                           ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go:206:30: composites: k8s.io/apiserver/pkg/cel.Error struct literal uses unkeyed fields (govet)
		compilationResult.Error = &apiservercel.Error{apiservercel.ErrorTypeInternal, "cost estimation failed: " + err.Error()}
		                           ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:38:14: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
				Default: structuralschema.JSON{"foo"},
				         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:44:15: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
					Default: structuralschema.JSON{"foo"},
					         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:53:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"A"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:58:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"B"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:63:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"C"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:76:19: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
									Default: structuralschema.JSON{"A"},
									         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:81:19: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
									Default: structuralschema.JSON{"B"},
									         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:91:18: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
								Default: structuralschema.JSON{"N"},
								         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:96:18: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
								Default: structuralschema.JSON{"O"},
								         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:108:21: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
											Default: structuralschema.JSON{"alpha"},
											         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:113:21: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
											Default: structuralschema.JSON{"beta"},
											         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:123:16: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
						Default: structuralschema.JSON{"bar"},
						         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:133:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"A"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:147:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"A"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:159:15: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
					Default: structuralschema.JSON{"A"},
					         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:169:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
						Default:  structuralschema.JSON{"A"},
						          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:179:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
						Default:  structuralschema.JSON{"A"},
						          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:190:18: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default:  structuralschema.JSON{"A"},
							          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/algorithm_test.go:202:18: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default:  structuralschema.JSON{"A"},
							          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/prunenulls_test.go:38:14: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
				Default: structuralschema.JSON{"foo"},
				         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/prunenulls_test.go:47:17: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default: structuralschema.JSON{"A"},
							         ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting/prunenulls_test.go:57:18: composites: k8s.io/apiextensions-apiserver/pkg/apiserver/schema.JSON struct literal uses unkeyed fields (govet)
							Default:  structuralschema.JSON{"C"},
							          ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/defaulting_test.go:289:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/listtype_test.go:140:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go:453:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:214:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:266:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:377:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:418:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:471:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/test/integration/pruning_test.go:556:38: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	fooClient := dynamicClient.Resource(schema.GroupVersionResource{crd.Spec.Group, crd.Spec.Versions[0].Name, crd.Spec.Names.Plural})
	                                    ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go:1096:32: loopclosure: loop variable validRule captured by func literal (govet)
					s := withRule(*tt.schema, validRule)
					                          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go:1107:19: loopclosure: loop variable expectedCost captured by func literal (govet)
					if rtCost != expectedCost {
					             ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go:1108:83: loopclosure: loop variable expectedCost captured by func literal (govet)
						t.Fatalf("runtime cost %d does not match expected runtime cost %d", rtCost, expectedCost)
						                                                                            ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go:2009:30: loopclosure: loop variable tt captured by func literal (govet)
			celValidator := validator(tt.schema, true, model.SchemaDeclType(tt.schema, true), PerCallLimit)
			                          ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go:2013:65: loopclosure: loop variable tt captured by func literal (govet)
			errs, _ := celValidator.Validate(ctx, field.NewPath("root"), tt.schema, tt.obj, tt.oldObj, math.MaxInt)
			                                                             ^
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go:2015:22: loopclosure: loop variable tt captured by func literal (govet)
			for _, e := range tt.errors {
			                  ^
staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go:28:67: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	gvr := func(g, v, r string) schema.GroupVersionResource { return schema.GroupVersionResource{g, v, r} }
	                                                                 ^
staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go:30:63: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
	gvk := func(g, v, k string) schema.GroupVersionKind { return schema.GroupVersionKind{g, v, k} }
	                                                             ^
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go:150:35: composites: k8s.io/apimachinery/pkg/runtime.WithoutVersionDecoder struct literal uses unkeyed fields (govet)
		if err := d.DecodeNestedObjects(runtime.WithoutVersionDecoder{c.decoder}); err != nil {
		                                ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/namespace/matcher.go:119:18: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
		return false, &apierrors.StatusError{status.Status()}
		               ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/testcase.go:300:17: composites: k8s.io/api/admissionregistration/v1.MutatingWebhook struct literal uses unkeyed fields (govet)
		mutating[i] = registrationv1.MutatingWebhook{h.Name, h.ClientConfig, h.Rules, h.FailurePolicy, h.MatchPolicy, h.NamespaceSelector, h.ObjectSelector, h.SideEffects, h.TimeoutSeconds, h.AdmissionReviewVersions, nil}
		              ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:70:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "", schema.GroupVersionKind{"extensions", "v1beta1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:71:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:72:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1beta1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1beta1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:73:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1alpha1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1alpha1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:75:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "scale", schema.GroupVersionKind{"extensions", "v1beta1", "Scale"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:76:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", schema.GroupVersionKind{"autoscaling", "v1", "Scale"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:77:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1beta1", "deployments"}, "scale", schema.GroupVersionKind{"apps", "v1beta1", "Scale"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:78:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1alpha1", "deployments"}, "scale", schema.GroupVersionKind{"apps", "v1alpha1", "Scale"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:81:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"example.com", "v1", "widgets"}, "", schema.GroupVersionKind{"", "", ""})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:82:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"example.com", "v2", "widgets"}, "", schema.GroupVersionKind{"", "", ""})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:100:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:114:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:116:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"apps", "v1", "Deployment"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:139:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:141:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"apps", "v1", "Deployment"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:159:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:179:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:199:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:201:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"extensions", "v1beta1", "Deployment"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:220:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"apps", "v1", "Deployment"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:222:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"apps", "v1beta1", "Deployment"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:246:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:248:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"autoscaling", "v1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:266:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:286:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:306:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:308:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"extensions", "v1beta1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:327:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:329:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"apps", "v1beta1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:343:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:345:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"autoscaling", "v1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:359:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:375:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:377:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"autoscaling", "v1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:392:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "scale", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:413:61: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:           admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                         ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:415:22: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectMatchKind: &schema.GroupVersionKind{"autoscaling", "v1", "Scale"},
			                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:435:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:450:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:460:59: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{"autoscaling", "v1", "Scale"}, "ns", "name", schema.GroupVersionResource{"apps", "v1", "deployments"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:475:70: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(&example.Pod{}, nil, schema.GroupVersionKind{"example.apiserver.k8s.io", "v1", "Pod"}, "ns", "name", schema.GroupVersionResource{"example.apiserver.k8s.io", "v1", "pods"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:491:70: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(&example.Pod{}, nil, schema.GroupVersionKind{"example.apiserver.k8s.io", "v1", "Pod"}, "ns", "name", schema.GroupVersionResource{"example.apiserver.k8s.io", "v1", "pods"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:507:70: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(&example.Pod{}, nil, schema.GroupVersionKind{"example.apiserver.k8s.io", "v1", "Pod"}, "ns", "name", schema.GroupVersionResource{"example.apiserver.k8s.io", "v1", "pods"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:523:70: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			attrs:         admission.NewAttributesRecord(&example.Pod{}, nil, schema.GroupVersionKind{"example.apiserver.k8s.io", "v1", "Pod"}, "ns", "name", schema.GroupVersionResource{"example.apiserver.k8s.io", "v1", "pods"}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
			                                                                  ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:591:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"extensions", "v1beta1", "deployments"}, "", schema.GroupVersionKind{"extensions", "v1beta1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:592:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:593:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1beta1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1beta1", "Deployment"})
	                       ^
staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go:594:25: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionResource struct literal uses unkeyed fields (govet)
	mapper.RegisterKindFor(schema.GroupVersionResource{"apps", "v1alpha1", "deployments"}, "", schema.GroupVersionKind{"apps", "v1alpha1", "Deployment"})
	                       ^
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go:120:19: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
		r.AcquireTime = metav1.Time{spec.AcquireTime.Time}
		                ^
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go:123:17: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
		r.RenewTime = metav1.Time{spec.RenewTime.Time}
		              ^
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go:135:26: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		AcquireTime:          &metav1.MicroTime{ler.AcquireTime.Time},
		                       ^
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go:136:26: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		RenewTime:            &metav1.MicroTime{ler.RenewTime.Time},
		                       ^
staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go:1088:28: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
			ExpirationTimestamp:   &v1.Time{now.Add(time.Hour)},
			                        ^
staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go:1100:28: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
			ExpirationTimestamp:   &v1.Time{now.Add(time.Hour)},
			                        ^
staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go:1110:28: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
			ExpirationTimestamp:   &v1.Time{now.Add(time.Hour)},
			                        ^
staging/src/k8s.io/client-go/tools/events/event_recorder.go:44:15: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
	timestamp := metav1.MicroTime{time.Now()}
	             ^
staging/src/k8s.io/client-go/tools/events/eventseries_test.go:95:24: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		EventTime:           metav1.MicroTime{time.Now()},
		                     ^
staging/src/k8s.io/client-go/tools/events/eventseries_test.go:299:56: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
	cachedEvent := recorder.makeEvent(regarding, related, metav1.MicroTime{time.Now()}, v1.EventTypeNormal, "test", "some verbose message: 1", "eventTest", "eventTest-"+hostname, "started")
	                                                      ^
staging/src/k8s.io/client-go/tools/events/eventseries_test.go:385:57: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		cachedEvent := recorder.makeEvent(regarding, related, metav1.MicroTime{time.Now()}, v1.EventTypeNormal, "test", "some verbose message: 1", "eventTest", "eventTest-"+hostname, "started")
		                                                      ^
staging/src/k8s.io/client-go/tools/leaderelection/leaderelection_test.go:365:26: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		AcquireTime:          &metav1.MicroTime{time.Now()},
		                       ^
staging/src/k8s.io/client-go/tools/leaderelection/leaderelection_test.go:366:26: composites: k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime struct literal uses unkeyed fields (govet)
		RenewTime:            &metav1.MicroTime{time.Now()},
		                       ^
staging/src/k8s.io/client-go/tools/auth/exec/types_test.go:40:53: loopclosure: loop variable cluster captured by func literal (govet)
			testClientAuthenticationClusterTypesAreSynced(t, cluster)
			                                                 ^
staging/src/k8s.io/cli-runtime/pkg/resource/scheme_test.go:44:16: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectGVK: &schema.GroupVersionKind{"", "v1", "Status"},
			            ^
staging/src/k8s.io/cli-runtime/pkg/resource/scheme_test.go:50:16: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectGVK: &schema.GroupVersionKind{"meta.k8s.io", "v1", "Status"},
			            ^
staging/src/k8s.io/cli-runtime/pkg/resource/scheme_test.go:56:16: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectGVK: &schema.GroupVersionKind{"example.com", "v1", "Status"},
			            ^
staging/src/k8s.io/cli-runtime/pkg/resource/scheme_test.go:62:16: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
			expectGVK: &schema.GroupVersionKind{"example.com", "v1", "Foo"},
			            ^
staging/src/k8s.io/cli-runtime/pkg/resource/builder_example_test.go:77:1: tests: ExampleLocalBuilder refers to unknown identifier: LocalBuilder (govet)
func ExampleLocalBuilder() {
^
staging/src/k8s.io/component-base/metrics/desc_test.go:159:26: copylocks: call of reflect.DeepEqual copies lock value: k8s.io/component-base/metrics.Desc contains sync.RWMutex (govet)
			if !reflect.DeepEqual(*descA, *descB) {
			                      ^
staging/src/k8s.io/component-base/logs/json/json_benchmark_test.go:46:6: structtag: struct field secret has json tag but is not exported (govet)
					secret  string `json:"secret"`
					^
staging/src/k8s.io/component-base/logs/json/json_benchmark_test.go:76:6: structtag: struct field secret has json tag but is not exported (govet)
					secret  string `json:"secret"`
					^
staging/src/k8s.io/component-base/logs/json/json_benchmark_test.go:105:6: structtag: struct field secret has json tag but is not exported (govet)
					secret  string `json:"secret"`
					^
staging/src/k8s.io/csi-translation-lib/plugins/vsphere_volume_test.go:31:26: composites: k8s.io/api/core/v1.TopologySelectorTerm struct literal uses unkeyed fields (govet)
	topologySelectorTerm := v1.TopologySelectorTerm{[]v1.TopologySelectorLabelRequirement{
	                        ^
staging/src/k8s.io/csi-translation-lib/plugins/vsphere_volume_test.go:37:40: composites: k8s.io/api/core/v1.TopologySelectorTerm struct literal uses unkeyed fields (govet)
	topologySelectorTermWithBetaLabels := v1.TopologySelectorTerm{[]v1.TopologySelectorLabelRequirement{
	                                      ^
staging/src/k8s.io/csi-translation-lib/plugins/vsphere_volume_test.go:43:34: composites: k8s.io/api/core/v1.TopologySelectorTerm struct literal uses unkeyed fields (govet)
	expectedTopologySelectorTerm := v1.TopologySelectorTerm{[]v1.TopologySelectorLabelRequirement{
	                                ^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:506:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:509:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, encLocalKEK)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:539:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:542:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, lk.encKEK)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:589:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:592:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, encLocalKEK)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:627:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:630:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, lk.encKEK)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:677:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:680:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, encLocalKEK)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:717:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() error = %v", err)
				^
staging/src/k8s.io/kms/pkg/hierarchy/hierarchy_test.go:720:5: testinggoroutine: call to (*T).Fatalf from a non-test goroutine (govet)
				t.Fatalf("Encrypt() annotations = %v, want %v", resp.Annotations, lk.encKEK)
				^
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug_test.go:451:25: composites: k8s.io/apimachinery/pkg/apis/meta/v1.Time struct literal uses unkeyed fields (govet)
					CreationTimestamp: metav1.Time{time.Now()},
					                   ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:341:5: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			&errors.StatusError{metav1.Status{
			 ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:352:5: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			&errors.StatusError{metav1.Status{
			 ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:364:5: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			&errors.StatusError{metav1.Status{
			 ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:374:5: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			&errors.StatusError{metav1.Status{
			 ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:385:50: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			AddSourceToErr("creating", "configmap.yaml", &errors.StatusError{metav1.Status{
			                                              ^
staging/src/k8s.io/kubectl/pkg/cmd/util/helpers_test.go:395:5: composites: k8s.io/apimachinery/pkg/api/errors.StatusError struct literal uses unkeyed fields (govet)
			&errors.StatusError{metav1.Status{
			 ^
staging/src/k8s.io/kubectl/pkg/explain/v2/funcs_test.go:204:15: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
				"needle": schema.GroupVersionKind{"testgroup.k8s.io", "v1", "Kind"},
				          ^
staging/src/k8s.io/kubectl/pkg/explain/v2/funcs_test.go:206:6: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
					{"randomgroup.k8s.io", "v1", "OtherKind"},
					^
staging/src/k8s.io/kubectl/pkg/explain/v2/funcs_test.go:207:6: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
					{"testgroup.k8s.io", "v1", "OtherKind"},
					^
staging/src/k8s.io/kubectl/pkg/explain/v2/funcs_test.go:208:6: composites: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind struct literal uses unkeyed fields (govet)
					{"testgroup.k8s.io", "v1", "Kind"},
					^
staging/src/k8s.io/kubectl/pkg/polymorphichelpers/history_test.go:95:46: composites: k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference struct literal uses unkeyed fields (govet)
				OwnerReferences: []metav1.OwnerReference{{"apps/v1", "Deployment", deployment.Name, deployment.UID, &trueVar, nil}},
				                                         ^
staging/src/k8s.io/kubectl/pkg/polymorphichelpers/history_test.go:222:46: composites: k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference struct literal uses unkeyed fields (govet)
				OwnerReferences: []metav1.OwnerReference{{"apps/v1", "StatefulSet", "moons", "1993", &trueVar, nil}},
				                                         ^
staging/src/k8s.io/kubectl/pkg/polymorphichelpers/history_test.go:326:46: composites: k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference struct literal uses unkeyed fields (govet)
				OwnerReferences: []metav1.OwnerReference{{"apps/v1", "DaemonSet", "moons", "1993", &trueVar, nil}},
				                                         ^
staging/src/k8s.io/kubectl/pkg/util/i18n/i18n_test.go:143:31: loopclosure: loop variable envVar captured by func literal (govet)
					defer func() { os.Setenv(envVar, envVarValue) }()
					                         ^
staging/src/k8s.io/legacy-cloud-providers/aws/aws_assumerole_provider_test.go:95:9: copylocks: range var tt copies lock: struct{name string; fields k8s.io/legacy-cloud-providers/aws.fields; want github.com/aws/aws-sdk-go/aws/credentials.Value; wantProviderCalled bool; sleepBeforeCallingProvider time.Duration; wantErr bool; wantErrString string} contains k8s.io/legacy-cloud-providers/aws.fields contains sync.RWMutex (govet)
	for _, tt := range tests {
	       ^
staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go:190:5: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
				ctx, cancel := context.WithCancel(context.Background())
				^
staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go:236:3: lostcancel: this return statement may be reached without using the cancel var defined on line 190 (govet)
		}()
		^
staging/src/k8s.io/pod-security-admission/policy/registry_test.go:152:35: composites: k8s.io/pod-security-admission/api.LevelVersion struct literal uses unkeyed fields (govet)
		results := registry.EvaluatePod(api.LevelVersion{tc.level, versionOrPanic(tc.version)}, nil, nil)
		                                ^
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/etcd.go:50:10: composites: k8s.io/sample-apiserver/pkg/registry.REST struct literal uses unkeyed fields (govet)
	return &registry.REST{store}, nil
	        ^
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/etcd.go:50:10: composites: k8s.io/sample-apiserver/pkg/registry.REST struct literal uses unkeyed fields (govet)
	return &registry.REST{store}, nil
	        ^

Kubernetes-commit: a58eb1b3da870b2b568fcf0ffd42332d6a0fd667
2023-02-28 21:22:40 +01:00
Sean Sullivan
6b8e57ec24 Plumb stale GroupVersions through aggregated discovery
Kubernetes-commit: fed7bb7c51e9f85db122ad6d111cb8326dce9f8a
2023-02-28 19:44:34 +00:00
Kubernetes Publisher
8f4ee7119f Merge pull request #102884 from vinaykul/restart-free-pod-vertical-scaling
In-place Pod Vertical Scaling feature

Kubernetes-commit: b9fd1802ba0aec68508b4e9eec00819008a79370
2023-02-28 09:06:23 +00:00
vinay kulkarni
2932f6b3c1 Restructure naming of resource resize restart policy - generated files
Kubernetes-commit: c5130fb0d6337436c405426468de47ae96717243
2023-02-28 08:13:36 +00:00
DingRui Yang
af12621334 Typo: fix EndpointsLeasesResourceLock ->ConfigMapsLeasesResourceLock
The comment on ConfigMapsLeasesResourceLock begins with the wrong name: EndpointsLeasesResourceLock.

Kubernetes-commit: a50c9db09ba4d22328088887d2fd00b61b36e6c4
2023-02-27 21:09:07 +08:00
Kubernetes Publisher
b46677097d Merge pull request #115393 from seans3/openapi3-root
OpenAPI V3 Root interface and basic implementation

Kubernetes-commit: fb57080e069fe2efe11734a4570a92873e673c35
2023-02-25 01:06:03 +00:00
Kubernetes Publisher
6e69fba05a Merge pull request #114872 from Iceber/fix_acquire_leader
client-go: fix the wait time for trying to acquire the leader lease

Kubernetes-commit: 6e213e7390b60c6db85210f322a213768cefb172
2023-02-24 17:06:01 +00:00
Kubernetes Publisher
ba2fdddad1 Merge pull request #115784 from seans3/openapi-fake-client
Refactor to use openapi fake client

Kubernetes-commit: 5961d8ce1bb4eb6537f7ca3b3eaf7fd9d5cd2595
2023-02-24 05:05:58 +00:00
Sean Sullivan
0bc91705fa Tolerate empty discovery response in memcache client
Kubernetes-commit: a49f13258548c71194e3001ebf5fa219b88155d0
2023-02-22 23:59:37 +00:00
Sean Sullivan
bc1864f6cf Removes old discovery hack ignoring 403 and 404
Kubernetes-commit: 298cb361c85be02d6336437bde37c8a4ccf5583a
2023-02-17 12:47:05 -08:00
Sean Sullivan
0a3ea4f4da Refactor to use openapi fake client
Kubernetes-commit: e352d94e45cdd7f92574ac02e37fc3ab78a34798
2023-02-14 18:00:08 -08:00
Kubernetes Publisher
1ea719588e Merge pull request #115933 from intUnderflow/clean-up-fake-recorder
Clean up FakeRecorder event emission

Kubernetes-commit: b2a40948bdf18e622147a38421f4145b3302ae84
2023-02-22 01:05:51 +00:00
Lucy Sweet
3a78ee0346 Fix typo
Kubernetes-commit: 247299946bb424407590219729c4f16b073f1e4a
2023-02-21 22:05:02 +01:00
Lucy Sweet
1fc8a8a5a7 Clean up FakeRecorder event emission
Kubernetes-commit: 191fe47b6ca537040b22e56776bb97d3d21737e3
2023-02-21 20:35:54 +01:00
Kubernetes Publisher
269abfd8b0 Merge pull request #115860 from intUnderflow/include-annotations-fake-recorder
Allow inclusion of annotations in channel events when using FakeRecorder

Kubernetes-commit: 3a4583aeb6b66452fdfc7958fbc28d744805a63e
2023-02-21 21:05:39 +00:00
Lucy Sweet
c633a8222b Include annotations all the time
Kubernetes-commit: 8373afef0e0886fcd05a4cbf8b0bedeaa82a4d05
2023-02-21 16:42:37 +01:00
Lucy Sweet
f7f367ebae Respond to review
Kubernetes-commit: 7a48c6e2171d23fea76b7a15ab4971989f125b96
2023-02-21 16:29:38 +01:00
Kubernetes Publisher
dda9c5244f Merge pull request #115809 from seans3/openapi-file-client
New openapi v3 testing file client

Kubernetes-commit: 1c97dbc8c9096495706b1e141b0fe256ff3185e9
2023-02-17 21:05:23 +00:00
Kubernetes Publisher
d7a20b15ab Merge pull request #115472 from lanycrost/client-go-110992-GenerateSelfSignedCertKeyWithFixtures-permissions
client-go: make generating certificate/key permissions more restrictive (600)

Kubernetes-commit: 8014155cb5828d7d39905da68c3e2d39b1dab132
2023-02-17 21:05:21 +00:00
Lucy Sweet
a43f324cb9 Allow inclusion of annotations in channel events when using FakeRecorder
Kubernetes-commit: 9839ce96f557413f522230fa3e374e26356ae3d9
2023-02-17 16:38:10 +01:00
Khachatur Ashotyan
bd24c4230e client-go: change permissions of key
Kubernetes-commit: 49af62e64f33317ec0c12f9ed8ab8a0d4f365d44
2023-02-17 14:21:24 +04:00
Khachatur Ashotyan
a7dbbf8255 client-go: change permissions of GenerateSelfSignedCertKeyWithFixtures generated cert
Kubernetes-commit: 3cc99c5e77185ce26fd2d5513336e7229c5f7441
2023-02-17 11:20:39 +04:00
Khachatur Ashotyan
be82893604 client-go: change permissions of directories and certs
Kubernetes-commit: c941877438c2219318b0625f5b4e321efe324171
2023-02-17 11:16:46 +04:00
Kubernetes Publisher
d0008d188f Merge pull request #115620 from odinuge/ou-relist-missing-delete
client-go/cache: fix missing delete event on replace

Kubernetes-commit: 814faade7fa3916478df963cfc6e34042e79ce89
2023-02-17 01:05:14 +00:00
Kubernetes Publisher
df55688a24 Merge pull request #115604 from pacoxu/fix-design-proposals-links
old design proposals are now moved to Design Proposals Archive repo

Kubernetes-commit: ffe410bbb4e43ba7b7ceaec379709575e817d866
2023-02-16 21:05:13 +00:00
Paco Xu
4bd9226d28 API docs: point to current docs instead of archived designs
Kubernetes-commit: 3d536bd14bba0586f20d1d96560073e5d9e82f97
2023-02-16 15:29:56 +08:00
Sean Sullivan
1369f160e9 New openapi v3 testing file client
Kubernetes-commit: 195a55c84c1a0ba9dcc278cc1cccee320334d5e1
2023-02-15 11:37:08 -08:00
Kubernetes Publisher
60f5c9b463 Merge pull request #115786 from liggitt/net-0.7.0-master
Update golang.org/x/net to v0.7.0

Kubernetes-commit: b3d8ac8496a23d65a907f9333d906bcd5463764e
2023-02-15 10:47:27 +00:00
Kubernetes Publisher
249eb86644 Merge pull request #115785 from liggitt/fix-kubectl-test
Revert "Refactor fake versions of openapi client into testing subdir"

Kubernetes-commit: 98406e2a3e88bd6a2affe5674b7a577aa0926d48
2023-02-14 21:26:39 -08:00
Jordan Liggitt
e850f4518c Update golang.org/x/net to v0.7.0
Kubernetes-commit: f8e00778ddca11c08117ccf1d1c410641c70c428
2023-02-14 23:14:30 -05:00
Jordan Liggitt
fb55d97d70 Revert "Refactor fake versions of openapi client into testing subdir"
This reverts commit 869da89eab37ce670759cea2c86325f36625e7fc.

Kubernetes-commit: f98944590058f936c7adb76ea2c974899a460fe2
2023-02-14 22:14:37 -05:00
Kubernetes Publisher
278918a593 Merge pull request #115465 from seans3/openapi-client-testing
Refactor fake versions of openapi client into testing subdir

Kubernetes-commit: 08bbecb8e315fc976e35575e4e33c8a4a0e1cd28
2023-02-15 06:24:06 +00:00
Kubernetes Publisher
8ef4d7d4e8 Merge pull request #115685 from skitt/rest-req-error
client-go: add an Error() function on Request

Kubernetes-commit: 30f15671456283f37c3ed09412299b27cb92bcb4
2023-02-13 14:53:41 -08:00
Odin Ugedal
b2a4f028d6 client-go/cache: update Replace comment to be more clear
Since the behavior is now changed, and the old behavior leaked objects,
this adds a new comment about how Replace works.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 27f4bcae5c52a3bb88141f940ec23d907a15cde5
2023-02-13 11:23:50 +00:00
Odin Ugedal
a01b5a2a96 client-go/cache: rewrite Replace to check queue first
This is useful to both reduce the code complexity, and to ensure clients
get the "newest" version of an object known when its deleted. This is
all best-effort, but for clients it makes more sense giving them the
newest object they observed rather than an old one.

This is especially useful when an object is recreated. eg.

Object A with key K is in the KnownObjects store;
- DELETE delta for A is queued with key K
- CREATE delta for B is queued with key K
- Replace without any object with key K in it.

In this situation its better to create a DELETE delta with
DeletedFinalStateUnknown with B (with this patch), than it is to give
the client an DeletedFinalStateUnknown with A (without this patch).

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 7bcc3e00fc28b2548886d04639a2e352ab37fb55
2023-02-13 11:12:37 +00:00
Odin Ugedal
b250bf51ae client-go/cache: merge ReplaceMakesDeletionsForObjectsInQueue tests
Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: cd3e98b65c1339a8adc157175630de099a057d3f
2023-02-10 14:30:10 +00:00
Odin Ugedal
8279635aa4 client-go/cache: fix missing delete event on replace without knownObjects
This fixes an issue where a relist could result in a DELETED delta
with an object wrapped in a DeletedFinalStateUnknown object; and then on
the next relist, it would wrap that object inside another
DeletedFinalStateUnknown, leaving the user with a "double" layer
of DeletedFinalStateUnknown's.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 0bf0546d9f75d92c801e81c9f7adf040bba64102
2023-02-10 14:16:26 +00:00
Stephen Kitt
22e2a9b6b1 client-go: add an Error() function on Request
Requests can accumulate errors with no obvious indication, e.g. if
their primary purpose is to construct a URL: URL() itself doesn't
return an error if r.err is non-nil.

Instead of changing URL() to return an error, which has quite a large
impact, add an Error() function and indicate on URL() that it should
be checked.

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

Kubernetes-commit: f69c1c47463ff70ad61adf6f38c4d5b7373e9d0a
2023-02-10 14:44:07 +01:00
Kubernetes Publisher
d46293369e Merge pull request #115665 from aramase/aramase/f/update_vendor_k8s_utils
Update k8s.io/utils to `a36077c30491`

Kubernetes-commit: 9a51625ebebcc8345c851afc2b5cc98eb19ac193
2023-02-10 01:08:12 +00:00
Anish Ramasekar
86a4c64374 Update k8s.io/utils to a36077c30491
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 09e02052fdf3d248368b3d05d5c922d616528c4c
2023-02-09 20:09:41 +00:00
Odin Ugedal
2ded6b6eb8 client-go/cache: fix missing delete event on replace
This fixes a race condition when a "short lived" object
is created and the create event is still present on the queue
when a relist replaces the state. Previously that would lead in the
object being leaked.

The way this could happen is roughly;

1. new Object is added O, agent gets CREATED event for it
2. watch is terminated, and the agent runs a new list, L
3. CREATE event for O is still on the queue to be processed.
4. informer replaces the old data in store with L, and O is not in L
  - Since O is not in the store, and not in the list L, no DELETED event
    is queued
5. CREATE event for O is still on the queue to be processed.
6. CREATE event for O is processed
7. O is <leaked>; its present in the cache but not in k8s.

With this patch, on step 4. above it would create a DELETED event
ensuring that the object will be removed.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 25d77218acdac2f793071add9ea878b08c7d328b
2023-02-08 14:57:23 +00:00
Kubernetes Publisher
efd0415f67 Merge pull request #115514 from pohly/event-broadcaster-shutdown
client-go: don't wait too long after EventBroadcaster.Shutdown

Kubernetes-commit: b0171f77f68427813efbb478c0ba89f48322d34a
2023-02-08 13:07:28 +00:00
Paco Xu
878a4f8bbe archived design proposals are now moved to Design Proposals Archive Repo.
Kubernetes-commit: 019d2615af3f7fd0ed0d593ef9df348f6d85b204
2023-02-08 11:12:22 +08:00
Kubernetes Publisher
00b9d76f44 Merge pull request #115315 from enj/enj/i/kas_kubelet_conn_close
kubelet/client: collapse transport wiring onto standard approach

Kubernetes-commit: 22b88dea360b0aae4ecaa57142718386b3cbd40d
2023-02-07 17:07:30 +00:00
Kubernetes Publisher
9c5046523c Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls

Kubernetes-commit: 6eb008620cd0ee3501326ee003d47fbaf1fa5b52
2023-02-07 05:07:29 +00:00
Kubernetes Publisher
2e3265cc1d Merge pull request #108396 from tkashem/retry-metric
client-go: add a metric to count request retries

Kubernetes-commit: 2ab3151936f1df6b3ffb4d49bf9dc90218264545
2023-02-07 05:07:26 +00:00
Iceber Gu
899a109017 leaderelection: using le.clock for the time calculations
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: 9c31f14a7cfea7cc793a9a3f98bdd117cb438316
2023-02-07 13:00:55 +08:00
Monis Khan
d8b14dc089 kubelet/client: collapse transport wiring onto standard approach
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 754cb3d601a820180d19567c3600a789d77b0f07
2023-02-05 20:51:54 -05:00
vinay kulkarni
85d57cfad9 Generated files and compat data from API changes
Kubernetes-commit: 3c70be1a1231e11c45698e209b01e91b92f8c5d2
2023-02-05 04:44:45 +00:00
Artem Minyaylov
13c89f7a54 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex

Kubernetes-commit: f573e149423dc578284789fdff8eeb3c195b5ccf
2023-02-03 14:51:25 -08:00
Patrick Ohly
f6a5a1f139 client-go: don't wait too long after EventBroadcaster.Shutdown
When Shutdown was called, delivery of each pending event would still be retried
12 times with a delay of ~10s between each retry. In apiserver integration
tests that caused the goroutine to linger long after the corresponding
apiserver of the test was shut down.

Kubernetes-commit: 15b01af9c18a0840d71e2bb7dff4d8c29b158aad
2023-02-03 14:52:20 +01:00
Khachatur Ashotyan
71253f0b35 fix: comment about permission bits
Kubernetes-commit: fd17dcf3876458229ac15d426eb1bd58f8c52cb4
2023-02-03 13:40:33 +04:00
Khachatur Ashotyan
03568a1821 client-go: make generating certificate/key permissions more secure (600)
Kubernetes-commit: 5f81c3005f6d3aeb652a0626c3632ff68b036577
2023-02-02 14:52:45 +04:00
Sean Sullivan
bb1833cfed Refactor fake versions of openapi client into testing subdir
Kubernetes-commit: 869da89eab37ce670759cea2c86325f36625e7fc
2023-02-01 18:39:18 -08:00
Sean Sullivan
6eb57690dc OpenAPI V3 Root interface and basic implementation
Kubernetes-commit: 5b482476b1bb458b8206c122be045ced759550f2
2023-01-29 23:28:35 -08:00
Patrick Ohly
6a9f0eb8ac dependencies: update klog v2.90.1
This improves performance of the text formatting and ktesting.

Because ktesting no longer buffers messages by default, one unit
test needs to ask for that explicitly.

Kubernetes-commit: 961819a4d09488e20931103e0c36d2bed588fdcb
2023-01-23 18:19:54 +01:00
Iceber Gu
b4217e149b client-go: fix the wait time for trying to acquire the leader lease
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: 9d80516abb4244ac1df4ceb84a32d3204fe5b308
2023-01-10 13:09:07 +08:00
Antoine Pelisse
e2867f9cdc Update kubernetes code for minor API changes to kube-openapi
Kubernetes-commit: 88ec8fba32f0ef7b768ec528cfbe44046877ea34
2022-12-29 12:12:33 -08:00
Antoine Pelisse
3d77c7c648 Update kube-openapi to 15aac26d736a
Kubernetes-commit: 9bbdb9f130516a14a73914d0b41396ddb72a88ea
2023-03-07 16:14:54 -08:00
Jefftree
eec00dc791 remove mime AddExtensionType in discovery test
Kubernetes-commit: 50c6b6c86a50d0196af4bc659948d8dfd2147308
2022-12-05 17:30:08 +00:00
austin ce
9668243c04 Integrate new metrics provider option in test case
Kubernetes-commit: 9e83e7e975dd5971e60e9768e06520aa5ebf9bf8
2022-12-02 14:08:11 -05:00
austin ce
e0785d6713 Remove options from queue ctors w/o metrics
Kubernetes-commit: 31f16db1959bb1db02fcc578f4aa7d47414a26f4
2022-12-02 14:06:37 -05:00
austin ce
89a4c1271f Add license header to new file
Kubernetes-commit: 95ad089ff8164d455f766694b1292ca8f1d200df
2022-12-01 18:28:02 -05:00
austin ce
98d0d1a9ba Allow setting per-queue metrics providers
Kubernetes-commit: da71811514ac6e8fedd265831fed71f897b97781
2022-11-29 20:47:33 -05:00
Timo Reimann
0536a4e40c Add tests
Kubernetes-commit: fc8b4657c18a6e58b2587060ad3c862d3d2ae262
2022-10-22 00:47:04 +02:00
Damien Grisonnet
9c7c60b695 events: fix EventSeries starting count discrepancy
The kube-apiserver validation expects the Count of an EventSeries to be
at least 2, otherwise it rejects the Event. There was is discrepancy
between the client and the server since the client was iniatizing an
EventSeries to a count of 1.

According to the original KEP, the first event emitted should have an
EventSeries set to nil and the second isomorphic event should have an
EventSeries with a count of 2. Thus, we should matcht the behavior
define by the KEP and update the client.

Also, as an effort to make the old clients compatible with the servers,
we should allow Events with an EventSeries count of 1 to prevent any
unexpected rejections.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: d00364902bda05eed4f7f02051ab81f7be55f8a9
2022-09-08 23:50:41 +02:00
Patrick Ohly
9445f86b9d Generate go.work files
This creates go.work and enables Go Workspaces.  This is a file that
includes info on k/k and all the staging modules.

This depends on go 1.22 and setting FORCE_HOST_GO=true (for kube
scripts, which try to be hermetic).

Make this part of the normal update/verify sequence.

The top-level go.work file contains no replace statements. Instead, the
replace statements in the individual go.mod files are used. For this to
work, replace statements in the individual go.mod files have to be
consistent.

hack/tools has different dependencies and can't be in the main
workspace, so this adds a go.work just for that.  Without this, go tries
to consider all deps in all modules and pick one that works for all.
This is problematic because there are so many of them that it is
difficult to manage.

Likewise for k8s.io/code-generator/examples and
k8s.io/kms/internal/plugins/_mock - add trivial go.work files.

For example k/k depends on an older version of a lib that gloangci-lint
needs (transitively) and it breaks.

This also updates vendor (needed to make go happy), and removes
vendor'ed symlinks.  This breaks a LOT of our build tools, which will be
fixed subsequently.

Result: `go` commands work across modules:

Before:
```
$ go list ./pkg/proxy/iptables/ ./staging/src/k8s.io/api/core/v1/
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api/core/v1

$ go build ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api

$ go test ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api
```

After:
```
$ go list ./pkg/proxy/iptables/ ./staging/src/k8s.io/api/core/v1/
k8s.io/kubernetes/pkg/proxy/iptables
k8s.io/api/core/v1

$ go build ./pkg/proxy/iptables/ ./staging/src/k8s.io/api

$ go test ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
ok  	k8s.io/kubernetes/pkg/proxy/iptables	0.360s
ok  	k8s.io/api	2.302s
```

Result: `make` fails:

```
$ make
go version go1.22rc1 linux/amd64
+++ [0106 12:11:03] Building go targets for linux/amd64
    k8s.io/kubernetes/cmd/kube-proxy (static)
    k8s.io/kubernetes/cmd/kube-apiserver (static)
    k8s.io/kubernetes/cmd/kube-controller-manager (static)
    k8s.io/kubernetes/cmd/kubelet (non-static)
    k8s.io/kubernetes/cmd/kubeadm (static)
    k8s.io/kubernetes/cmd/kube-scheduler (static)
    k8s.io/component-base/logs/kube-log-runner (static)
    k8s.io/kube-aggregator (static)
    k8s.io/apiextensions-apiserver (static)
    k8s.io/kubernetes/cluster/gce/gci/mounter (static)
    k8s.io/kubernetes/cmd/kubectl (static)
    k8s.io/kubernetes/cmd/kubectl-convert (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    k8s.io/kubernetes/test/e2e/e2e.test (test)
    k8s.io/kubernetes/test/conformance/image/go-runner (non-static)
    k8s.io/kubernetes/cmd/kubemark (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    k8s.io/kubernetes/test/e2e_node/e2e_node.test (test)
test/e2e/e2e.go:35:2: cannot find package "k8s.io/api/apps/v1" in any of:
	/home/thockin/src/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/api/apps/v1 (vendor tree)
	/home/thockin/src/kubernetes/_output/local/.gimme/versions/go1.22rc1.linux.amd64/src/k8s.io/api/apps/v1 (from $GOROOT)
	/home/thockin/src/kubernetes/_output/local/go/src/k8s.io/api/apps/v1 (from $GOPATH)
	... more ...
	... more ...
	... more ...
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: /home/thockin/src/kubernetes/hack/lib/golang.sh:948 kube::golang::build_binaries_for_platform(...)
!!! [0106 12:13:41]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [Makefile:96: all] Error 1
```

Again, this requires go 1.22 (e.g. gotip), as go 1.21.x does not have
`go work vendor` support.

TO REPEAT:
    ( \
      ./hack/update-go-workspace.sh; \
      ./hack/update-vendor.sh; \
      ./hack/update-go-workspace.sh; \
    )

Kubernetes-commit: 65b841c077e0d3282d28b9199aec72d23d045104
2022-06-08 12:12:42 +02:00
Abu Kashem
d2388d199c client-go: add metric to count retries
Kubernetes-commit: b6c369f5c90bbef8058b3d44949f4e815dd6607f
2022-02-28 12:22:09 -05:00
Kubernetes Publisher
f457a57d6d Merge pull request #112072 from tkashem/retry-concurrency-test
client-go: add unit test for Request thread safety

Kubernetes-commit: 87759c73eb7d7804c8b5116becbce3f1066678bd
2023-01-31 01:46:49 -08:00
Abu Kashem
67f1485c1d client-go: add unit test for Request thread safety
Kubernetes-commit: ca492a9b62a586caf3e3cd22bc020108a63fb395
2022-08-26 13:24:36 -04:00
Kubernetes Publisher
b1350830d0 Merge pull request #115266 from pohly/gomega-update
dependencies: update gomega to v1.26.0

Kubernetes-commit: 6d17cb2051b3a9958ed3353df242312d85e75d43
2023-01-30 21:07:00 +00:00
Kubernetes Publisher
d7d6bcf014 Merge pull request #115354 from pohly/dra-reserved-for-list-type
dynamic resource allocation: avoid apiserver complaint about list content

Kubernetes-commit: c829397f7a1fa956766f6479a8ca454b6937feda
2023-01-30 17:06:56 +00:00
Kubernetes Publisher
648d82831a Merge pull request #110253 from tkashem/retry-condition-test
client-go: add a test to document retry conditions

Kubernetes-commit: 3bf42a7aec041f4e50e7b4ce3b3cfe04de0af859
2023-01-27 09:14:48 +00:00
Patrick Ohly
fa4e59aaee dynamic resource allocation: avoid apiserver complaint about list content
This fixes the following warning (error?) in the apiserver:

E0126 18:10:38.665239   16370 fieldmanager.go:210] "[SHOULD NOT HAPPEN] failed to update managedFields" err="failed to convert new object (test/claim-84; resource.k8s.io/v1alpha1, Kind=ResourceClaim) to smd typed: .status.reservedFor: element 0: associative list without keys has an element that's a map type" VersionKind="/, Kind=" namespace="test" name="claim-84"

The root cause is the same as in e50e8a0c919c0e02dc9a0ffaebb685d5348027b4:
nothing in Kubernetes outright complains about a list of items where the item
type is comparable in Go, but not a simple type. This nonetheless isn't
supposed to be done in the API and can causes problems elsewhere.

For the ReservedFor field, everything seems to work okay except for the
warning. However, it's better to follow conventions and use a map. This is
possible in this case because UID is guaranteed to be a unique key.

Validation is now stricter than before, which is a good thing: previously,
two entries with the same UID were allowed as long as some other field was
different, which wasn't a situation that should have been allowed.

Kubernetes-commit: 508cd60760567b3832da748140e3cf782c1b8695
2023-01-26 20:37:00 +01:00
Patrick Ohly
55c90d535e dependencies: update gomega to v1.26.0
If gomega.Eventually/Consistently run into a situation where it observes some
state of e.g. a pod which does not satisfy the condition and then further
polling fails with API server errors, gomega will report both the most recent
pod state and API error instead of just the API error.

Kubernetes-commit: aa1279b5eb79177f5351368d8d9159982b1bfb5e
2023-01-23 15:19:38 +01:00
Abu Kashem
79c4b4060a client-go: add test to document retry conditions
Kubernetes-commit: 68c542d52246b0b750e332616884350164018695
2022-05-27 09:13:30 -04:00
Kubernetes Publisher
adb1f506f9 Merge pull request #114550 from alexzielenski/apiserver/smd/update-kube-openapi
update kube-openapi dependency

Kubernetes-commit: df03edaf755f71a61f4f817ca374ebe3b6416270
2023-01-25 05:06:36 +00:00
Alexander Zielenski
1c9d8a00ef update kube-openapi
Kubernetes-commit: 7641ff75412c1d8b547c4fa388d3901aeeda6948
2023-01-23 15:32:33 -08:00
Kubernetes Publisher
cbb60162c0 Merge pull request #111652 from ash2k/ash2k/leader-elector-tweaks
Always emit the stopped leading event

Kubernetes-commit: f21c60341740874703ce12e070eda6cdddfd9f7b
2023-01-23 13:06:19 +00:00
Mikhail Mazurskiy
ac40ba3297 Always emit the stopped leading event
Kubernetes-commit: 771ab7488d53f0d6c85238992a8e5f4bcb73e24e
2022-10-12 20:53:05 +11:00
Kubernetes Publisher
84ad8a7920 Merge pull request #113540 from wongearl/cleanup-client-go
diff.ObjectReflectDiff is DEPRECATED use cmp.Diff

Kubernetes-commit: 60d73ba75148483d150622a4d8b6e122e189ceab
2023-01-19 21:09:35 +00:00
Kubernetes Publisher
7059973891 Merge pull request #115186 from thockin/codegen-2-rm-deprecated-clients
Remove deprecated and orphaned generated code

Kubernetes-commit: 2fba771792023756b539501cdabdb19a32bb9536
2023-01-19 21:09:34 +00:00
Kubernetes Publisher
31586e6042 Merge pull request #115184 from thockin/codegen-1-clientset-doc-go
Don't generate clientset/doc.go in client-gen

Kubernetes-commit: c2d18a6d14974b123d09c4ce40ea0dd79184787d
2023-01-19 04:13:56 +00:00
Kubernetes Publisher
c33df1cccb Merge pull request #113637 from mikedanese/http-proxy
switch spdy round trip tests to simple http proxy

Kubernetes-commit: 0acf6dbf7c094b71291b9fd7f78d5385565aa97c
2023-01-19 00:27:41 +00:00
Tim Hockin
7c57428f98 Remove obsolete generated listers
These are not regenerated by any input.  The OWNERS files were the last
things left for these 2 directories

Kubernetes-commit: dc88f34ce30eb98285f7f30e391b135e842cdbc2
2023-01-14 17:54:12 -08:00
Tim Hockin
0f17f43973 Remove obsolete generated applyconfigs
These are not regenerated by any input.

Kubernetes-commit: 37ca6b0fac3c118c9cb0619a07a2fe40e567f6d1
2023-01-14 17:20:06 -08:00
Tim Hockin
1d637ff29e Don't generate clientset/doc.go in client-gen
It seems valuable to be able to provide hand-written docs for these
first-level directories, and if don't want them, the generated doc.go
files are not actually very helpful.

This commit also adds new doc.go files for client-go listers/ and
informers/.

Kubernetes-commit: 95bf7b0afe9dd6a0f00125b1d290514a23e778e2
2023-01-12 09:51:33 -08:00
Tim Hockin
b94c7fc493 Fix client-go doc.go - not generated
As per liggitt, lavalamp, and jpbetz

Kubernetes-commit: f95a840c12ef24615d1069b98dca8a061c710cbb
2023-01-04 15:04:06 -08:00
Mike Danese
9edd019f97 vendor: removed unused dep github.com/elazarl/goproxy
Kubernetes-commit: f61c4245c18724dcac88f0ad9f347e82bbb57cd7
2022-11-04 22:14:46 +00:00
Kubernetes Publisher
e6998df99e Merge pull request #115093 from xuzhenglun/too-large-resource-version-1.16
Fix bug in reflector not detecting "Too large resource version" error before 1.17.0

Kubernetes-commit: d3f881f7508ec3bd8aa83712038bdcf5f4703396
2023-01-18 11:59:00 +00:00
Kubernetes Publisher
a13376f3fa Merge pull request #114542 from pacoxu/EphemeralContainers
cleanup: EphemeralContainers feature gate related codes

Kubernetes-commit: c913e6ce62d23b19eebec9beda91d7599bf5099b
2023-01-17 20:14:45 +00:00
xuzhenglun
7685b51912 Fix bug in reflector not detecting "Too large resource version" error before 1.17.0
Kubernetes-commit: 11e5e92dc65c1caaeb248a60d90ccc8e29eb9ff0
2023-01-16 11:36:28 +08:00
Kubernetes Publisher
228b004f4a Merge pull request #115077 from smarterclayton/reflector_mock_clock
cache: Reflector should have the same injected clock as its informer

Kubernetes-commit: 4c4d4ad0a4aea4d015561ae3e7d48e8aaf609277
2023-01-15 17:24:49 -08:00
Clayton Coleman
08e22c4b64 cache: Reflector should have the same injected clock as its informer
While refactoring the backoff manager to simplify and unify the code
in wait a race condition was encountered in
TestSharedInformerWatchDisruption. The new implementation failed
because the fake clock was not propagated to the backoff managers
when the reflector was used in a controller. After ensuring the
mangaers, reflector, controller, and informer shared the same
clock the test needed was updated to avoid the race condition by
advancing the fake clock and adding real sleeps to wait for
asynchronous propagation of the various goroutines in the controller.

Due to the deep structure of informers it is difficult to inject
hooks to avoid having to perform sleeps. At a minimum the FakeClock
interface should allow a caller to determine the number of waiting
timers (to avoid the first sleep).

Kubernetes-commit: 91b3a81fbd916713afe215f7d701950e13a02869
2023-01-14 14:17:33 -05:00
Kubernetes Publisher
241dfe3630 Merge pull request #114794 from lavalamp/improved-has-synced
Do not N^2 loading webhook configurations

Kubernetes-commit: cc9cc4d3eaec45206f353216a1c3ff6edaf07d30
2023-01-12 16:03:24 -08:00
Daniel Smith
cb28a0e57e Fix N^2 startup for webhook configurations
Add a "lazy" type to track when an update is needed. It uses a nested
locking technique to avoid extra evaluation calls.

Kubernetes-commit: 5a1091d88d95bd1dd5c27f2c72cee4ecb4219dda
2023-01-09 23:29:25 +00:00
Kubernetes Publisher
895a515b59 Merge pull request #114766 from MadhavJivrajani/prepare-for-go1.20
[Prepare for go1.20] *: Bump versions and fix tests

Kubernetes-commit: 4802d7bb62c2623be8e4f940f6b5c1fcddd6c744
2023-01-12 18:42:58 +00:00
Madhav Jivrajani
47c0033395 *: Bump version of vmware/govmomi
Bumping version to include changes that
better handle TLS errors. Bump nescessary
to prepare for when the version of Go is
bumped to 1.20

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 8b064fa4be71b5f1b498fabb5caade3c57f5d434
2023-01-02 20:56:02 +05:30
Kubernetes Publisher
ce349e1afa Merge pull request #114879 from olivierlemasle/bump-kube-openapi
Bump kube-openapi

Kubernetes-commit: 8fdaac238e4f7f560066ea3a324cdbcaae564ac9
2023-01-12 02:09:56 +00:00
Kubernetes Publisher
6500345693 Merge pull request #113467 from pacoxu/psp-cleanup
Remove PodSecurityPolicy related code except client-go & API type

Kubernetes-commit: 08d9a0ef5b3b30952a558786e4b6e360701a16c6
2023-01-12 02:09:49 +00:00
Kubernetes Publisher
674e53a7cb Merge pull request #112365 from dgrisonnet/consolidate-isomorphic-events
Update isomorphic event definition in the events/v1 client to match aggregation logic from core/v1

Kubernetes-commit: f56c79398e3c58b4f5a9c7e6a1f4d64248ef1b83
2023-01-11 09:22:09 +00:00
Kubernetes Publisher
2c828f0e97 Merge pull request #114859 from pohly/e2e-ginkgo-spec-ordering
dependencies: update ginkgo to v2.7.0

Kubernetes-commit: a11ad04564f05e5d7e2d5a3f421ec5a45b6807c5
2023-01-11 01:23:10 +00:00
Olivier Lemasle
640dd29fa4 Bump kube-openapi
Kubernetes-commit: 8b8e20fcdbbeeb4520995e4f7c6a003a33062dd2
2023-01-09 20:41:41 +01:00
Patrick Ohly
e96d4a06a4 dependencies: update ginkgo to v2.7.0
The new ginkgo release adds sorting of specs. This was triggered by
the observation that parallel test execution of Kubernetes E2E tests
sometimes ran the same spec twice and (presumably) other specs not at all
because spec order was random due to iteration over a map.

Sorting should avoid that problem.

Kubernetes-commit: baf832d80d798d53ceb7d4de3a39330c6eda5c6a
2023-01-05 21:19:14 +01:00
Kubernetes Publisher
fda1b1132e Merge pull request #114869 from liggitt/kube-openapi
bump kube-openapi

Kubernetes-commit: 0e49c542d7a73dd056f8f32f33939207dd009b14
2023-01-07 07:51:03 +00:00
Jordan Liggitt
61a4d65439 bump kube-openapi
Kubernetes-commit: d78de56d769ee9bd2193ccadbac5621d4a0ae89d
2023-01-06 12:21:58 -05:00
Kubernetes Publisher
bd7ed9e647 Merge pull request #114460 from brianpursley/pf-exit
portforward: return error on lost connection to pod

Kubernetes-commit: 61cdb86814489624dd5a169526797e186a118e66
2023-01-07 07:51:00 +00:00
Kubernetes Publisher
5ea7f43b5d Merge pull request #113654 from stevekuznetsov/skuznets/fake-group-name-registration
code-generator: refer to the API package for GV{R,K}

Kubernetes-commit: c97dbd1afb815731cbebf9cb0d888a29c39e2b76
2023-01-07 07:50:58 +00:00
Kubernetes Publisher
dc46266e11 Merge pull request #114829 from liggitt/oauth-revert
Revert "bump golang.org/x/oauth2"

Kubernetes-commit: 293bf70916de8ef61d5f868f53959f1e15b3e091
2023-01-07 07:50:56 +00:00
Kubernetes Publisher
37a1df5cba Merge pull request #111660 from pacoxu/key-encipherment-v1.26
Key encipherment usage  v1.27

Kubernetes-commit: 492637878f0b26fa126f2025af2ee5c1f1fd5867
2023-01-07 07:50:51 +00:00
Kubernetes Publisher
26d70e3a1c Merge pull request #114822 from liggitt/oauth2
bump golang.org/x/oauth2

Kubernetes-commit: 4e785dc7e3ac1d01cedd23a0ed9c4a67dc9c214f
2023-01-07 07:50:50 +00:00
Jordan Liggitt
338dcc21ed Revert "bump golang.org/x/oauth2"
This reverts commit fc9a140badf29382c1396b7de4813849d6f3e3c9.

Kubernetes-commit: 9f07c8e346fef454942d205f2702885475c7fc9a
2023-01-04 17:58:08 -05:00
Jordan Liggitt
4dad476f03 bump golang.org/x/oauth2
Kubernetes-commit: fc9a140badf29382c1396b7de4813849d6f3e3c9
2023-01-04 11:16:43 -05:00
Kubernetes Publisher
3e0d990533 Merge pull request #114236 from dgrisonnet/fix-eventseries-race
Fix data race when emitting similar Events consecutively

Kubernetes-commit: ca858e0c961db6ef8b22ecc3e257a02757261ea1
2023-01-02 17:28:37 +00:00
Kubernetes Publisher
7e3470802f Merge pull request #114237 from dgrisonnet/handle-series-error
Retry when recording an EventSerie results in an AlreadyExist error

Kubernetes-commit: 2b6c8420a245583d5055e9b4b8ed2b648c42529d
2023-01-02 17:28:33 +00:00
Brian Pursley
b0a6a6f777 portforward: Add unit test to cover stopChan usage
Kubernetes-commit: 6f08ab013c6ce54de239aab46b4086c09464f977
2022-12-23 10:11:21 -05:00
Kubernetes Publisher
b69cda3e4e Merge pull request #113538 from pohly/e2e-ginkgo-timeline
e2e: ginkgo timeline

Kubernetes-commit: 020fb2eb776c0affad3a9ff7dd21ba231e6c646d
2022-12-23 02:39:06 +00:00
Kubernetes Publisher
32f9a1505d Merge pull request #114585 from JoelSpeed/fix-resource-requirements-claims
Resource Claims must be a map type, not set

Kubernetes-commit: 5882479457ac2554f70fc4678aa86eca8c49ae8b
2022-12-23 02:39:04 +00:00
Kubernetes Publisher
bc218e478a Merge pull request #114578 from ardaguclu/wrap-ctx-error-until
Embed context deadline exceeded in error to let errors.Is can work

Kubernetes-commit: b704b96565249fe451d9d023f7f743efc1cc90fe
2022-12-23 02:39:02 +00:00
Kubernetes Publisher
19c9966172 Merge pull request #114291 from MaxHorstmann/master
#79612 fix(client-go): return error in fake discovery

Kubernetes-commit: 0783cf49e853e56f2f5e1708519c09fa83f0349f
2022-12-23 02:38:59 +00:00
Joel Speed
984a230dff Resource claims should be a map type
Kubernetes-commit: e50e8a0c919c0e02dc9a0ffaebb685d5348027b4
2022-12-19 16:02:02 +00:00
Arda Güçlü
21fffc1153 Embed context deadline exceeded in error to let errors.Is can work
Currently, watch package embeds context deadlineexceeded error
in it's own error using `%v`, as can be seen in here;

`fmt.Errorf("UntilWithSync: unable to sync caches: %v", ctx.Err())`

However, consumers of this function can not use
`errors.Is(err, context.DeadlineExceeded)` due this `%v`.

To let consumers can distinguish context deadlineexceeded errors,
this PR changes error embedding format to `%w`.

Kubernetes-commit: 6b7c365f8f6d50280c2dab171efdd4b93d964f32
2022-12-19 15:26:08 +03:00
Kubernetes Publisher
089645a7c5 Merge pull request #114559 from liggitt/gofmt
Fix indentation/spacing in comments to render correctly in godoc

Kubernetes-commit: 76522eb1a339a95544523c1ed85da09f287f1ade
2022-12-19 01:08:52 +00:00
Jordan Liggitt
422fe1f61e Fix indentation/spacing in comments to render correctly in godoc
Kubernetes-commit: 78cb3862f11225135afdf76f3424e2d7b33104c7
2022-12-17 17:31:05 -05:00
Paco Xu
20ca706950 cleanup: EphemeralContainers feature gate related codes
Kubernetes-commit: 70e56fa71af5aa4f3d1448fcbc26e86309cd0cf3
2022-12-16 23:46:47 +08:00
Kubernetes Publisher
97591331ce Merge pull request #113985 from lavalamp/improved-has-synced
Propagate HasSynced properly

Kubernetes-commit: 843b40aeb421347ae00f206ea879bc1e1ae2912d
2022-12-15 21:18:24 +00:00
Max Horstmann
24248303bf client-go: properly return error in fake discovery (#79612)
Fake discovery should return an error if an error-returning reactor was prepended.

This is relevant e.g. for unit tests which test a function which relies
on discovery to check if an API Server is available.

Matches existing behavior of other fake types, for example fake_namespace.

Adds unit test coverage as well.

Kubernetes-commit: b47748103a53c0fe5ba1ddc950662ffc9bd9ed0f
2022-12-14 11:41:10 -05:00
Brian Pursley
d0842249d3 portforward: return error on lost connection to pod
Currently, when the remote connection is unexpected closed, forward() prints an error message saying "lost connection to pod" via runtime.HandleError, but then it returns nil for the error.

This prevents the caller from being able to handle this error differently.

This commit changes forward() to return the "lost connection to pod" error so that it can be handled by the caller.

Making this change enables kubectl port-forward to exit with code 1, instead of 0, which is the expected behavior for a command that has failed.

Kubernetes-commit: a9f04103854893056237a09250ad3335867b0391
2022-12-13 13:32:42 -05:00
Damien Grisonnet
e3ded99476 tools/events: retry on AlreadyExist for Series
When attempting to record a new Event and a new Serie on the apiserver
at the same time, the patch of the Serie might happen before the Event
is actually created. In that case, we handle the error and try to create
the Event. But the Event might be created during that period of time and
it is treated as an error today. So in order to handle that scenario, we
need to retry when a Create call for a Serie results in an AlreadyExist
error.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: 2f83117bcfe30ad3ada7f1ca66f4b885a1d5df25
2022-12-01 15:40:01 +01:00
Damien Grisonnet
4b578e1242 tools/events: fix data race when emitting series
There was a data race in the recordToSink function that caused changes
to the events cache to be overriden if events were emitted
simultaneously via Eventf calls.

The race lies in the fact that when recording an Event, there might be
multiple calls updating the cache simultaneously. The lock period is
optimized so that after updating the cache with the new Event, the lock
is unlocked until the Event is recorded on the apiserver side and then
the cache is locked again to be updated with the new value returned by
the apiserver.

The are a few problem with the approach:

1. If two identical Events are emitted successively the changes of the
   second Event will override the first one. In code the following
   happen:
   1. Eventf(ev1)
   2. Eventf(ev2)
   3. Lock cache
   4. Set cache[getKey(ev1)] = &ev1
   5. Unlock cache
   6. Lock cache
   7. Update cache[getKey(ev2)] = &ev1 + Series{Count: 1}
   8. Unlock cache
   9. Start attempting to record the first event &ev1 on the apiserver side.

   This can be mitigated by recording a copy of the Event stored in
   cache instead of reusing the pointer from the cache.

2. When the Event has been recorded on the apiserver the cache is
   updated again with the value of the Event returned by the server.
   This update will override any changes made to the cache entry when
   attempting to record the new Event since the cache was unlocked at
   that time. This might lead to some inconsistencies when dealing with
   EventSeries since the count may be overriden or the client might even
   try to record the first isomorphic Event multiple time.

   This could be mitigated with a lock that has a larger scope, but we
   shouldn't want to reflect Event returned by the apiserver in the
   cache in the first place since mutation could mess with the
   aggregation by either allowing users to manipulate values to update
   a different cache entry or even having two cache entries for the same
   Events.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: 55ec09d377274b4a6107fe0b7a061ad408fe05a7
2022-12-01 15:39:34 +01:00
Daniel Smith
5d70a118df Enable propagration of HasSynced
* Add tracker types and tests
* Modify ResourceEventHandler interface's OnAdd member
* Add additional ResourceEventHandlerDetailedFuncs struct
* Fix SharedInformer to let users track HasSynced for their handlers
* Fix in-tree controllers which weren't computing HasSynced correctly
* Deprecate the cache.Pop function

Kubernetes-commit: 8100efc7b3122ad119ee8fa4bbbedef3b90f2e0d
2022-11-18 00:12:50 +00:00
Kubernetes Publisher
e7e7d01afd Merge pull request #110991 from thockin/svc-typenames-starTrafficPolicyType
Svc typenames star traffic policy type

Kubernetes-commit: 923ee203f362aa947a7b0c9b1357488e0a244ea7
2022-12-13 04:24:09 +00:00
Steve Kuznetsov
9bcbb56a27 code-generator: refer to the API package for GV{R,K}
There should only be one source of truth for the API group's name and
version.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: e13198ec6f52c4a6405388e90053954dc7656a31
2022-11-06 07:05:42 -07:00
Paco Xu
be1f5d4ebb client-go: remove extensions psp only
Kubernetes-commit: e41b1bff5853c616f7872ccf36fbefa480f72892
2022-11-03 10:12:16 +08:00
wongearl
5d95f80033 diff.ObjectReflectDiff is DEPRECATED use cmp.Diff
Kubernetes-commit: 6da08775f9fc8d70f867435f55cf712d3a6ef056
2022-11-02 17:40:19 +08:00
Patrick Ohly
beb71aae41 dependencies: update to ginkgo v2.6.1, gomega v1.24.2
Ginkgo v2.5.0 adds support for a "timeline": a full description of what happened
while a specific test ran, including failures, timeouts, and log output.

Ginkgo v2.6.0 adds ReportBeforeSuite which we need for
https://github.com/kubernetes/kubernetes/issues/114313.

Kubernetes-commit: f3ef4004317c1a12d84021be29dd5f92badc8eff
2022-11-02 09:07:12 +01:00
Damien Grisonnet
1113415196 event_broadcaster: update isomorphic event def
Update the definition of an isomorphic event in the events/v1 client to
match the aggregation logic that was already present in the core/v1
implementation.

The note field was omitted even though the message was used in the core
API aggregation because we didn't reach consensus.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: 21f2f746abc1a5a1b3193274401f5728e19cc26f
2022-09-09 19:16:40 +02:00
Paco Xu
6a07cedcd3 kubelet: add key encipherment usage only if it is rsa key
remove allowOmittingUsageKeyEncipherment as it is always true

Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: 160f015ef4affe903f98e74cf42b40fceef15cb9
2022-08-03 16:41:09 +08:00
Tim Hockin
31e7d402a3 ServiceInternalTrafficPolicyType: s/Type//
Rename ServiceInternalTrafficPolicyType => ServiceInternalTrafficPolicy

Kubernetes-commit: dd0a50336e283775e05e54b0b174b7c7a9367d99
2021-11-09 23:30:23 -08:00
Tim Hockin
f5f28c4de4 ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy

Kubernetes-commit: d0e2b068500b260851f48c636185e1dcbb438d2e
2021-11-09 23:25:43 -08:00
Kubernetes Publisher
5a489e8d10 Merge pull request #114404 from hoskeri/discovery-error-check
Check the correct error in d.downloadAPIs

Kubernetes-commit: 47d58265ae6661fa5e21575f688ce761a11c090e
2022-12-11 00:05:15 -08:00
Abhijit Hoskeri
4dbb1cd1d5 Check the correct error in d.downloadAPIs
The error result of `d.downloadAPIs()` is set in `aerr`,
not `err`.

This prevents a nil-ptr dereference of apiGroups in the next step.

Signed-off-by: Abhijit Hoskeri <abhijithoskeri@gmail.com>

Kubernetes-commit: 450ba4f50638ad9ee4d287a762a8530c64e89ebd
2022-12-10 16:32:02 -08:00
Kubernetes Publisher
58ff029093 Merge pull request #113933 from liggitt/retry-race
Fix client-go request retry race

Kubernetes-commit: 8d2fbfc5a9635bc3247d7f739f8a057962049aca
2022-12-10 23:34:13 +00:00
Kubernetes Publisher
ca60156554 Merge pull request #111898 from ncdc/reflector-unstructured-fixes
Reflector: support logging Unstructured type

Kubernetes-commit: 054274d77c3fc12eeb56fd03d6e371d4aa61f0c1
2022-12-10 03:34:09 +00:00
Kubernetes Publisher
d21defd4b1 Merge pull request #113904 from apelisse/add-owners-apelisse
Add apelisse into some more OWNERS files

Kubernetes-commit: b47752022b5b856a3516ad5377e3b020f43c4f2b
2022-12-09 23:33:52 +00:00
Kubernetes Publisher
6cbd19f22f Merge pull request #114319 from liggitt/net-master
Update golang.org/x/net 1e63c2f

Kubernetes-commit: 72acaad83924360960e21915aa94cd1db8d0196c
2022-12-07 02:03:56 +00:00
Jordan Liggitt
b044399795 Update golang.org/x/net 1e63c2f
Includes fix for CVE-2022-41717

Kubernetes-commit: afe5378db9d17b1e16ea0028ecfab432475f8e25
2022-12-06 17:29:11 -05:00
Andy Goldstein
fbb7f087d1 reflector: refactor setting typeDescription & expectedGVK
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>

Kubernetes-commit: 784ec157e67c86bc3383b326bbfe8ee70737aa4d
2022-12-02 12:39:58 -05:00
Antoine Pelisse
0193d08605 Add jpbetz to k8s.io/client-go/applyconfigurations
Kubernetes-commit: a1f5e36fab45645ad4776eca927347d8dc715c8b
2022-11-17 14:54:41 -08:00
Jordan Liggitt
e2f402cda3 Limit request retrying to []byte request bodies
Kubernetes-commit: 69fad419a7666ac416307de4c3ee88c7e61b94db
2022-11-15 17:47:35 -05:00
Antoine Pelisse
a4d38f89cb Add apelisse into some more OWNERS files
Kubernetes-commit: b5f2130f240b0a9ebd1d0edd400b899d0efb8b2b
2022-11-14 16:28:14 -08:00
Kubernetes Publisher
1ac8d45935 Merge pull request #113797 from seans3/force-no-aggregated
Adds field to force non-aggregated discovery

Kubernetes-commit: 418608e926049e7458f03226fe27f101e7fdc47f
2022-11-14 21:50:55 +00:00
Kubernetes Publisher
c8ffed3108 Merge pull request #111023 from pohly/dynamic-resource-allocation
dynamic resource allocation

Kubernetes-commit: d1c0171aed848900daa07212370c991c19c318b1
2022-11-12 01:50:36 +00:00
Kubernetes Publisher
61cd728579 Merge pull request #113826 from jsafrane/add-openstack
Add CSI migration of OpenStack Cinder volumes

Kubernetes-commit: e4d46148de9d83c23001323d6613618c2897a427
2022-11-11 21:50:36 +00:00
Kubernetes Publisher
cfd682c60b Merge pull request #113375 from atiratree/PodHealthyPolicy-api
api: add unhealthyPodEvictionPolicy for PDBs

Kubernetes-commit: cc704f97784c3359db4690b97201ebfe6b481869
2022-11-11 13:50:33 +00:00
Patrick Ohly
522eaa15ef api: generated files
Kubernetes-commit: 9683c60c05491a9e9cafd3419c150caf7355bf49
2022-11-10 20:22:42 +01:00
Filip Křepinský
f1c80d7a4f generated
Kubernetes-commit: 3e3912467a0d7b00ec8a5231da3603b3aa31337d
2022-11-10 18:41:33 +01:00
Kubernetes Publisher
acc9fa7e04 Merge pull request #113186 from ttakahashi21/KEP-3294
Introduce APIs to support CrossNamespaceSourceProvisioning

Kubernetes-commit: d94261e904c90578e913c42c4d2a0fc8cb30937f
2022-11-10 17:39:30 +00:00
Jan Safranek
f2b10f39ac Remove OpenStack cloud provider
And keep OpenStack Cinder CSI translation

Kubernetes-commit: 6005c3b5120d2bfa1ce72b02389ac951a0482545
2022-11-10 18:26:00 +01:00
Jan Safranek
a3d3eb0cc9 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae93600d3314bce0acbff1f3a0a42e74b.

Kubernetes-commit: 5b284a50b78cb7d68b12825f5c0cfa29503c1577
2022-11-10 18:22:07 +01:00
Takafumi Takahashi
c7bdab2154 Generate code
Kubernetes-commit: cb12a2bc5118fe34e2eb396dc1a3b8e7cc1de9f4
2022-11-09 21:21:52 +00:00
Kubernetes Publisher
0a1f6a8fd0 Merge pull request #112744 from pwschuurman/statefulset-slice-impl
Add implementation of KEP-3335, StatefulSetSlice

Kubernetes-commit: ff19efdf9bd2d1f4abece3229f1e36c1d58b96df
2022-11-09 21:30:32 +00:00
Sean Sullivan
3ac73ea2c8 Adds bool to force non-aggregated discovery
Kubernetes-commit: a84d877310ba5cf9237c8e8e3218229c202d3a1e
2022-11-09 12:30:05 -08:00
Kubernetes Publisher
1c7a870d4f Merge pull request #113485 from MikeSpreitzer/apf-borrowing
Add borrowing between priority levels in APF

Kubernetes-commit: 1193a9abcbd6c6ce6fc7d4ce38872f1933ef5159
2022-11-09 13:30:37 +00:00
Kubernetes Publisher
7280270f31 Merge pull request #113599 from seans3/discovery-client-update
Aggregated discovery client

Kubernetes-commit: c288251818d9d39ffc10d8d133a5094288e73b3b
2022-11-09 09:30:03 +00:00
Marly Puckett
769443557e Update redacting functionality to redact all sensitive info in config when printing with view (#109189)
* Add RedactSecrets function

* Move RedactSecrets method to existing RawBytesData case

* Update TestRedactSecrets to use new pattern of os.CreateTemp()

Kubernetes-commit: e721272d10dd6c4d85ff613182ba0eaddcec9272
2022-11-08 17:30:10 +00:00
Kubernetes Publisher
4b1a9fdfb5 Merge pull request #113314 from cici37/celIntegration
CEL validation in Admission chain

Kubernetes-commit: 595ea324113580ae61f4a15ab3e5b22303a195cf
2022-11-08 05:49:13 +00:00
Kubernetes Publisher
ea9ec91697 Merge pull request #112905 from alexzielenski/kubectl-apply-csa-migration
kubectl: `apply --server-side` managed fields migration

Kubernetes-commit: 2f837dc113ba35f84e7012a6d1b06b075b349353
2022-11-08 05:49:10 +00:00
Kubernetes Publisher
3daf180aa6 Merge pull request #113688 from dashpole/update_utils
Update k8s.io/utils to fix util tracing panic

Kubernetes-commit: fa2e203a6bde89a84443ee9813e1f27aa31326a9
2022-11-08 05:49:08 +00:00
David Ashpole
dbe034bd24 update k8s.io/utils to fix util tracing panic
Kubernetes-commit: 3f1511c8e9a64cf60821036aa1fc3ec9d58a2931
2022-11-07 19:30:21 +00:00
Kubernetes Publisher
7ed3193a72 Merge pull request #111545 from jlsong01/rewrite_signature_of_StartEventWatcher
rewrite signature of function StartEventWatcher

Kubernetes-commit: f33209a6ede53ce6ead8aed6cfc1823df1afedfc
2022-11-08 05:49:05 +00:00
Kubernetes Publisher
cbe28cf468 Merge pull request #113274 from Huang-Wei/kep-3521-A
[KEP-3521] Part 1: New Pod API .spec.schedulingGates

Kubernetes-commit: 8c77820759cc28a5d82e9a68f3d335d1a27f4466
2022-11-04 07:56:09 +00:00
Alexander Zielenski
898b7a3cbd add FindFieldsOwners util function
to be used by kubectl to determine csa manager name used

findowners

Kubernetes-commit: 26a6e1234869b5c546195aaf416f3424cd3c3dc8
2022-11-03 12:01:34 -07:00
Alexander Zielenski
4f63b629b5 add UpgradeManagedFieldsPatch
rather than modify the object directly, this function provides a JSONPATCH that should be sent to the server to upgrade its managed fields.

Kubernetes-commit: 4e4d748c06e2c2dfec7608f96237c4b0a42540c9
2022-11-03 17:38:08 -07:00
Alexander Zielenski
c8c6cb5745 add OWNERS to csaupgrade
Kubernetes-commit: 5002ba215bcaec75a65ccd1ee879c64538b970b7
2022-11-03 17:38:02 -07:00
Alexander Zielenski
a45874a99b remove kubectl annotation logic from upgrade patch
adds unneccessary complexity. also discussed in SIG CLI meeting to keep annotation around for a while longer

Kubernetes-commit: 0c055eae3c9eaea26574743f0623d6b0e9e3d6b4
2022-11-03 12:05:45 -07:00
Sean Sullivan
25d5761bfa Aggregated discovery client
Kubernetes-commit: b8fe2c7b8061e6ab0b093a49351bac256606da4a
2022-11-03 11:09:58 -07:00
Wei Huang
2248bf3801 Automated codegen
Kubernetes-commit: fc831d70881d0ef3f4016ad6fa830256f53bb5f3
2022-10-28 15:06:18 -04:00
Kubernetes Publisher
d576a3570d Merge pull request #113387 from wojtek-t/refactor_client_indexing
Refactor store index into its structure

Kubernetes-commit: ee0b179a7b9867203a9cc73f5c90909318a240e3
2022-11-03 07:56:00 +00:00
Kubernetes Publisher
4fbef5bda9 Merge pull request #106242 from thockin/revive-copy-lb-status-type-to-ingress
Copy LoadBalancerStatus from core to networking

Kubernetes-commit: 818b13544f6421cd414d648637db48c9271b0bb7
2022-11-03 07:55:58 +00:00
Kubernetes Publisher
bc6266d159 Merge pull request #103177 from arkbriar/support_cancelable_exec_stream
Support cancelable SPDY executor stream

Kubernetes-commit: 3cf75a2f760b8093f7c97f26b4b2b059f3777bec
2022-11-03 03:55:56 +00:00
Wojciech Tyczyński
5e7ba1f8d7 Minor cleanup of thread safe store
Kubernetes-commit: 72194de96f0bb5c1c1e3247a129cf9e3f11972ef
2022-11-02 13:02:29 +01:00
Kubernetes Publisher
19b2e89c0c Merge pull request #113523 from seans3/content-type-response
Get response content-type

Kubernetes-commit: ccf57ba09dafa94906310059e42a6b896c0eaf44
2022-11-01 22:52:45 -07:00
arkbriar
0563decd0a Propagate the panic with a channel
Signed-off-by: arkbriar <arkbriar@gmail.com>

Kubernetes-commit: b7e6c23e9f73e4cc0209e94fe95c5e2809998bf6
2022-11-02 11:36:22 +08:00
Sean Sullivan
8ff4970e81 Get response content-type
Kubernetes-commit: 4ca128d71aa94653927b0e529b746cb7428563b1
2022-11-02 00:03:24 +00:00
Kubernetes Publisher
0d57396335 Merge pull request #113304 from mimowo/handling-pod-failures-beta-ssa
Use SSA to add pod failure conditions

Kubernetes-commit: 3c9928e4f87c1d023e595292e6139cbd8dfedd5c
2022-10-28 15:55:54 +00:00
Kubernetes Publisher
a232cf00b9 Merge pull request #113367 from pohly/dep-ginkgo-gomega
dependencies: update to gomega v1.23.0 and ginkgo v2.4.0

Kubernetes-commit: 9e8558158478f622104afd0328883577756bff9f
2022-10-28 15:55:53 +00:00
Michal Wozniak
a191e58772 SSA to add pod failure conditions - ready for review
Kubernetes-commit: fea883687feafc597591e15773f8c6f491b35d08
2022-10-24 14:55:16 +02:00
Patrick Ohly
984bdbf170 dependencies: update to gomega v1.23.0 and ginkgo v2.4.0 and dependencies
Gomega adds support for formatting extensions and StopTrying in matchers.
Ginkgo enhances DeferCleanup.

This also triggered an update of other dependencies.

Kubernetes-commit: e6ad2f2f23449c9d24606b864c4737dc66a7427e
2022-10-24 13:43:15 +02:00
Kubernetes Publisher
f87d0472f2 Merge pull request #112693 from aimuz/fix-GO-2022-0969
Fixed CVE-2022-27664 Bump golang.org/x/net to v0.1.1-0.20221027164007-c63010009c80

Kubernetes-commit: 6cb473b6c4f1239d411e0a50a1cdf9c4c092c42a
2022-10-28 07:55:43 +00:00
aimuz
d2367833c1 Fixed (CVE-2022-27664) Bump golang.org/x/net to v0.1.1-0.20221027164007-c63010009c80
Fixed https://pkg.go.dev/vuln/GO-2022-0969

Signed-off-by: aimuz <mr.imuz@gmail.com>

Kubernetes-commit: 78c704d4f60d54996d483d49c23c6aac82f28dc9
2022-10-28 10:07:56 +08:00
Kubernetes Publisher
ef8a2e5227 Merge pull request #113089 from zackzhangkai/fix-doc
fix typo

Kubernetes-commit: 594d34872c73f6abe5eba740f9e4557c6f970887
2022-10-19 07:54:59 +00:00
Kubernetes Publisher
197e4799dc Merge pull request #108959 from astraw99/fix-duplicate-list
Fix duplicate code block of `ListAll` function

Kubernetes-commit: 0be68925f5d584966f3ca131bbfad3ea275a491a
2022-10-18 19:55:26 +00:00
Kubernetes Publisher
42a0e1ca70 Merge pull request #113062 from alexzielenski/client-go-json-output
client-go: raw data options for fetching openapiv3

Kubernetes-commit: bfb78f3e74188b19e627c1126cafaa1be36901d4
2022-10-18 03:55:16 +00:00
Kubernetes Publisher
b6d3c8d376 Merge pull request #107278 from harsimranmaan/allow_pagination_in_dynamic_fake_lister
Preserve metadata for fake dynamic client unstructured lists

Kubernetes-commit: aaee0f57da21e4b00181ad577da862246a5fa73c
2022-10-17 23:59:41 +00:00
Kubernetes Publisher
9cc33a48a7 Merge pull request #113106 from pohly/dep-ginkgo-gomega
dependencies: update to gomega v1.22.1 and ginkgo v2.3.1

Kubernetes-commit: 4216ad3542ff5defcfdb303945772a8e1663a7f6
2022-10-17 19:55:18 +00:00
Alexander Zielenski
624929cd3f address feedback
Kubernetes-commit: 32d834a88673614080bc37727f8cc94b9b85bc86
2022-10-17 10:51:27 -07:00
Harsimran Singh Maan
0c269b7a5b remove selflink as per review feedback
Kubernetes-commit: 5da368d012f7635f9718876061bec864b7dcf8e6
2022-10-17 09:19:21 -07:00
zackzhangkai
0945beb5d7 fix typo
Signed-off-by: zackzhangkai <zhangkaiamm@gmail.com>

Kubernetes-commit: 5a1ca395b28efd6537f93f9615bc5c7ca401a9dd
2022-10-17 14:10:09 +08:00
Alexander Zielenski
12cafe2b1b refactor to use Schema(contentType)
Kubernetes-commit: e6e6dd826d76a2b19515cd907062f1f74f9e52c2
2022-10-14 12:46:36 -07:00
Alexander Zielenski
8b6ceae557 add more options for fetching openapiv3 in clients
remove serialized types from client

update tests

Kubernetes-commit: fec79e75a50f334d8384a5377513fc78222ea36a
2022-10-12 11:43:46 -07:00
arkbriar
2362c7b162 use subtests and defer in TestSPDYExecutorStream
Signed-off-by: arkbriar <arkbriar@gmail.com>

Kubernetes-commit: 86e5d069ecece8591ad693b50bcea49000f6df26
2022-10-10 11:24:40 +08:00
Patrick Ohly
9b5106747f dependencies: update to gomega v1.22.1 and ginkgo v2.3.1
This adds support for timeouts and intermediate reports in Eventually and
Consistently.

Kubernetes-commit: d1dbf7ae3e223d5d93d0b3d875e4f03ff38e6de0
2022-10-07 17:19:09 +02:00
Kubernetes Publisher
fa9ed7f5fe Merge pull request #112860 from nckturner/remove-log-line
Remove log line from expiration cache

Kubernetes-commit: c5bc8f929baf0ef7d6b1559e76f7569e8792a1bd
2022-10-15 07:53:38 +00:00
Kubernetes Publisher
6b2491258e Merge pull request #112988 from alexzielenski/update-kube-openapi
update kube-openapi

Kubernetes-commit: 353e00796ef4c1e8fcea1cb51bcc62fc3acac3c8
2022-10-15 03:54:03 +00:00
Kubernetes Publisher
aea20dde59 Merge pull request #113037 from pacoxu/fsnotify-v1.6.0
update fsnotify to v1.6.0

Kubernetes-commit: 542ec977054c16c7981606cb1590cc39154ddf01
2022-10-14 07:56:41 +00:00
Alexander Zielenski
e3bb48f784 update kube-openapi
hack/pin-dependency.sh k8s.io/kube-openapi 172d655c2280350c77cf05962948fc67ff043492
hack/update-vendor.sh

Kubernetes-commit: f622dd918ab5d3bc902a8c625a0a89b21e8afe43
2022-10-13 19:51:22 -07:00
Paco Xu
1af37115fa update fsnotify to v1.6.0
Kubernetes-commit: 3fee9d27355afe64dec7fa264e1faf209712f169
2022-10-13 13:14:43 +08:00
Kubernetes Publisher
e6d958c7a8 Merge pull request #112989 from ameukam/bump-golang.org/x/text-to-v0.3.8
Bump golang.org/x/text to v0.3.8

Kubernetes-commit: 054d86feb42b67bb13608d9aa9a7c986750da753
2022-10-12 03:53:33 +00:00
Arnaud Meukam
5e469bad4c Bump golang.org/x/text to v0.3.8
Signed-off-by: Arnaud Meukam <ameukam@gmail.com>

Kubernetes-commit: 0d19690a54e480923e8222ce79566e6879667a1f
2022-10-11 23:30:39 +02:00
Kubernetes Publisher
f515a4cb9f Merge pull request #112774 from stevekuznetsov/skuznets/dynamic-client-similar
client-go: factor the dynamic client similarly to others

Kubernetes-commit: bb2101bac12748aa77adfa15b07b5b8d8dcd0672
2022-10-10 19:53:31 +00:00
Kubernetes Publisher
b28f6c94f4 Merge pull request #112875 from pohly/update-yaml
dependencies: update to sigs.k8s.io/yaml v1.3.0

Kubernetes-commit: 93d1c43b491a39740297cf1e76782b99d8739865
2022-10-06 15:53:38 +00:00
Patrick Ohly
c9afc73c5f dependencies: update to sigs.k8s.io/yaml v1.3.0
No particular benefit and no relevant changes, it's just to stay up-to-date and
to avoid having to pull that in when merging
https://github.com/kubernetes/kubernetes/pull/111023 which indirectly depends
on the newer release.

Kubernetes-commit: 9b93cc663a102b6e36f07eecc7b6e32225f39295
2022-10-05 11:14:23 +02:00
Nick Turner
5870c622c7 Remove log line from expiration cache
Kubernetes-commit: e7bfd5909f5540f884a8bb914a9230c9bf7c2803
2022-10-04 11:01:37 -07:00
Kubernetes Publisher
f24bd6967c Merge pull request #112306 from tkashem/v1beta3
add v1beta3 for Priority And Fairness

Kubernetes-commit: 9720af2ba3f0d792c873bfa6e4d54e60736fb7a0
2022-10-03 19:47:29 +00:00
Cici Huang
3a430a4884 API - make update
API - Auto update

API - make update

API - make update

Kubernetes-commit: 19b2df871560816c3eb29fbb271953afab1e39c8
2022-10-03 17:17:45 +00:00
Abu Kashem
d4a3675975 apiserver: add generated files for borrowing in flowcontrol
Kubernetes-commit: a76223f8da90e984cb3a699fe908b0e7a35ad5f9
2022-10-03 13:17:24 -04:00
Kubernetes Publisher
ebc7cd4b2d Merge pull request #112707 from enj/enj/i/https_links
Use https links for k8s KEPs, issues, PRs, etc

Kubernetes-commit: 3af1e5fdf6f3d3203283950c1c501739c21a53e2
2022-09-29 22:29:31 +00:00
Steve Kuznetsov
34e8a5d862 client-go: factor the dynamic client similarly to others
All other clients:

 - expose a New() method that takes a rest.Interface
 - expose their RESTClient()
 - return pointers to the type, not instances of an interface that the
   type implements

For code that is generic over all Kubernetes clients, and for general
developer experience, it's best to make sure that this client adheres to
these common practices.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 74af6f1e7d9057bfcb64f4d875063c14041937e5
2022-09-28 08:57:22 -06:00
Peter Schuurman
eed251634d Adding implementation of KEP-3335, StatefulSetSlice
Kubernetes-commit: 7b3d77a41af88083ba14ffe2cc8ad3a66010c43b
2022-09-26 18:34:03 -07:00
Kubernetes Publisher
2f43d370b3 Merge pull request #112705 from stevekuznetsov/skuznets/fix-comment
clients: clarify a misleading comment

Kubernetes-commit: bc6e801aa0e0cf17d22652ff881ebc3540b7af55
2022-09-26 16:34:18 +00:00
Kubernetes Publisher
369734286b Merge pull request #112680 from enj/enj/i/tls_cache_key_comparable
transport/cache: statically assert that tlsCacheKey is comparable

Kubernetes-commit: a024252328430d90e807eabfcb86d84e6651b7db
2022-09-26 16:34:16 +00:00
Kubernetes Publisher
c81636cd44 Merge pull request #112665 from NoicFank/fix-typo
Fix typo error in shared_informer

Kubernetes-commit: 953ce2212bd00f4d212ec3b1c35b5aba01952cb1
2022-09-24 22:44:02 +00:00
Monis Khan
166580894e Use https links for k8s KEPs, issues, PRs, etc
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: b738be9b46a899571303c8c887e32bf4d5b71a0a
2022-09-23 16:13:22 -04:00
Steve Kuznetsov
956c1ce5e8 clients: clarify a misleading comment
It's clear that client-sets contain many versions of one group, so this
comment just seems to be out-dated.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 588f016c3bc04ea2da85d7077643677028a8cb1b
2022-09-23 12:25:52 -06:00
Kubernetes Publisher
be20b2bd91 Merge pull request #112673 from dims/update-to-latest-k8s.io/utils-sep-22
Update to latest k8s.io/utils to pick up changes

Kubernetes-commit: 722e02408ed1d0d1fc5b7304e2ad8c23125aa2b4
2022-09-22 18:51:49 +00:00
Monis Khan
cc2441c02c transport/cache: statically assert that tlsCacheKey is comparable
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: a6d0f483002926f075009e69d533e244dec3cd2b
2022-09-22 13:14:38 -04:00
Davanum Srinivas
04dbcd88ed Update to latest k8s.io/utils to pick up changes
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 4e7e7cdd3ce7cd0cec806298c2b7705ea240369c
2022-09-22 07:14:21 -04:00
Lurong
59765b8784 fix typo error
Kubernetes-commit: 0b2ad4cc42e727ec93011411033cac1abfb637ea
2022-09-22 14:42:41 +08:00
Abu Kashem
9b97b72528 rename assuredConcurrencyShares for flowcontrol v1beta3
Kubernetes-commit: 66fc0d703794f309c9715028d3b63f64c281a5fd
2022-09-21 15:40:33 -04:00
Kubernetes Publisher
2fd4aac190 Merge pull request #112613 from dims/update-github.com/go-openapi/jsonreference-to-drop-github.com/PuerkitoBio/purell
Update github.com/go-openapi/jsonreference to drop github.com/PuerkitoBio/purell

Kubernetes-commit: 299e65cdc5799b982b6af69858c14bfe41463540
2022-09-21 14:44:50 +00:00
Davanum Srinivas
47ad72abfd update github.com/go-openapi/jsonreference to drop github.com/PuerkitoBio/purell
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 005a5ca08173b080193ecb01421e2513f32d045b
2022-09-20 20:49:55 -04:00
Kubernetes Publisher
f7c9c639d4 Merge pull request #112545 from dims/update-etcd-3.5.5-and-all-otel-related-to-latest
Update etcd 3.5.5 and all otel related libraries to newer versions

Kubernetes-commit: 6820a383be4a1bbb5cd526eb3aeb9e6ade351498
2022-09-20 02:44:03 +00:00
Kubernetes Publisher
b6e72dce28 Merge pull request #112226 from aojea/client_go_transport
client-go: test transport generation is goroutine safe

Kubernetes-commit: 5d45f766b5f1527cb54bbc9b625f90cc64b3b784
2022-09-19 18:47:00 +00:00
Kubernetes Publisher
acfaa39399 Merge pull request #112352 from pohly/e2e-ginkgo-progress
e2e: better ginkgo progress reports

Kubernetes-commit: 25b93a607a3edd28b0c720701ab7b6ebf1252148
2022-09-19 10:56:47 +00:00
Davanum Srinivas
6b5ecadcc5 updated etcd to v3.5.5 and newer otel libraries as well
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 5be80c05c423daf4bd2a4eb1cabf61fae9a03629
2022-09-17 14:04:16 -04:00
Kubernetes Publisher
037b5fd01d Merge pull request #112514 from markmc/patch-1
client-go: remove reference to TPR in examples

Kubernetes-commit: 86c46a4bcc2b5be6371422fd3130feb98c6697ab
2022-09-16 22:23:41 +00:00
Mark McLoughlin
3f66212017 client-go: remove reference to TPR in examples
5 years after third party resources were removed, we're probably just confusing readers with this reference.

Kubernetes-commit: d21fc6e762276747e3306cfaf27b0ce1201071c2
2022-09-16 15:14:13 +01:00
Kubernetes Publisher
86ffa32437 Merge pull request #112475 from vatsalparekh/fix-TestRESTClientLimiter
Fix Infelicities in TestRESTClientLimiter

Kubernetes-commit: 8b7840e393d8107647b1818e0a623018786f006f
2022-09-16 14:41:04 +00:00
Kubernetes Publisher
ece64627e4 Merge pull request #112476 from enj/enj/i/list_pager_flake
Check for context cancellation on each buffered chunk

Kubernetes-commit: be506dc46e4ba13c701bd8f228a4d1d1581873be
2022-09-16 14:41:03 +00:00
Kubernetes Publisher
58155b7df0 Merge pull request #112450 from enj/enj/i/exec_tls_cache_holder_cleanup
client-go/transport: drop Dial and GetCert fields in favor of Holders

Kubernetes-commit: 6824cd3addbb214e88e00f451babb8a44eb738d1
2022-09-16 14:41:02 +00:00
Kubernetes Publisher
eecd3e52a3 Merge pull request #112091 from xyz-li/master
kubectl: fix memory leaks in port forwarding client

Kubernetes-commit: 7a68c8a21a29787adf9e959271b8f955a68d3d82
2022-09-15 14:36:40 +00:00
Monis Khan
67030989c0 Check for context cancellation on each buffered chunk
TestListPager_EachListItem flakes without this change.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 7458ed01d6aa150b8a6046e0dbeba88d5d5ff1bb
2022-09-15 10:33:33 -04:00
Vatsal Parekh
bf2b395a89 Fix Infelicities in TestRESTClientLimiter
Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>

Kubernetes-commit: c980cf489eeb39fd0fe0af7e80cfea2dbe2007db
2022-09-15 19:30:40 +05:30
Kubernetes Publisher
f6b8521807 Merge pull request #111333 from flant/selfsubjectattributesreviews
Add auth API to get self subject attributes

Kubernetes-commit: 4e8b11d4411cefbe1a32cf9e54810d9e0bd7378e
2022-09-14 22:43:31 +00:00
Patrick Ohly
ec6c80aa4d e2e: bump ginkgo to v2.2.0
The new release adds support for intermediate progress reports.

Kubernetes-commit: 1e4edaf2fe0a7bedd7e54725b489f62c20c92954
2022-09-09 15:47:46 +02:00
Monis Khan
5dab9a0b84 client-go/transport: drop Dial and GetCert fields in favor of Holders
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 3313a70d5bcc40a39f99f482c18effc9de6072ba
2022-09-09 08:06:01 -04:00
Abu Kashem
9bac803bd8 apiserver: generate for apf v1beta3
Kubernetes-commit: 6ac0e879790ddaf62942ea101d6edb24b0c57cbd
2022-09-08 10:53:38 -04:00
Antonio Ojea
1bd914a925 client-go: test transport generation is goroutine safe
Kubernetes-commit: fe41181c3d470207772d3ac9a91d4ef2c2a6720d
2022-09-04 12:36:01 +02:00
LiHui
cc3cc93e6a kubectl: fix memory leaks in port forwarding client
Signed-off-by: LiHui <andrewli@kubesphere.io>

Kubernetes-commit: 1df24569a0bf62a528c49f73fdb236fd56eb05ee
2022-08-29 14:15:01 +08:00
arkbriar
5e0a53136c Support cancelable SPDY executor stream
Mark remotecommand.Executor as deprecated and related modifications.

Handle crash when streamer.stream panics

Add a test to verify if stream is closed after connection being closed

Remove blank line and update waiting time to 1s to avoid test flakes in CI.

Refine the tests of StreamExecutor according to comments.

Remove the comment of context controlling the negotiation progress and misc.

Signed-off-by: arkbriar <arkbriar@gmail.com>

Kubernetes-commit: 42808c8343671e6783ba4c901dcd619bed648c3d
2022-08-24 10:21:35 +08:00
Andy Goldstein
37897aff8d Reflector: support logging Unstructured type
Add an annotation that can be added to the exampleType passed to
NewReflector to indicate the expected type for the Reflector. This is
useful for types such as unstuctured.Unstructured, which, when used with
a dynamic informer, do not have their TypeMeta filled in.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>

Kubernetes-commit: 474fc8c5234000bce666a6b02f7ffbb295ef135f
2022-08-17 15:49:26 -04:00
jlsong01
34679611a8 rewrite signature of function StartEventWatcher
Kubernetes-commit: c8291e393b32f8ce4e8fd1d4f18e848247be13f8
2022-07-29 23:43:05 +08:00
m.nabokikh
b2b55e607d Add auth API to get self subject attributes
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

Kubernetes-commit: 00dfba473b08528f0a21f7bd3b921f5dd35b013a
2022-07-22 04:01:52 +04:00
Kubernetes Publisher
18c3338d48 Merge pull request #112200 from pohly/client-go-shared-informer-factory-shutdown
client-go: support waiting for SharedInformerFactory shutdown

Kubernetes-commit: 084a412e03816ef3ea57da928ae8fd332d17ab59
2022-09-13 18:36:50 +00:00
Kubernetes Publisher
9dae6917fb Merge pull request #112309 from shyamjvs/disable-compression
Add a "DisableCompression" option to kubeconfig

Kubernetes-commit: ed520f3cac2243cd5f66967e2c590caf1e98b9e2
2022-09-12 18:36:27 +00:00
Kubernetes Publisher
ab826d2728 Merge pull request #112349 from pohly/klog-update
build: update to klog v2.80.1

Kubernetes-commit: b48b0eac6ad3556b343f54c26b49ed74cac276e3
2022-09-09 22:42:45 +00:00
Patrick Ohly
ab0bfda62e build: update to klog v2.80.1
The fix for https://github.com/kubernetes/klog/issues/348 is required before
https://github.com/kubernetes/kubernetes/pull/111998 can be merged because the
way how a unit test in that PR uses klog triggers the data race.

Kubernetes-commit: 60d92dd96a4ba3873dd9e061c3e332c16c213e30
2022-09-09 13:11:55 +02:00
Kubernetes Publisher
f32861cf25 Merge pull request #112341 from enj/enj/i/second_time_is_the_charm
Remove in-tree credential plugins (again)

Kubernetes-commit: d569886a234cb65cb1ec777b7ab2e5b9a35d7145
2022-09-09 06:35:35 +00:00
Monis Khan
7d208ba573 Remove in-tree credential plugins (again)
This change reverts three commits:

1. Revert "Revert "Remove gcp and azure auth plugins""
   This reverts commit 651b4f5b647a205d12fad4d0edc489d97109cccc.

2. Revert "update-gofmt"
   This reverts commit 79c09f0b310b8b66f8f14ad254f268788c42e076.

3. Revert "Update removal warnings to 1.26"
   This reverts commit 68758fc5c5099c83104a637e6d6ad3f4534f0d08.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 09cde58bbc13ff1229f61146221f56af4ff675dc
2022-09-08 19:11:03 -04:00
Kubernetes Publisher
e003fa92aa Merge pull request #112017 from enj/enj/i/exec_tls_cache
exec auth: support TLS config caching

Kubernetes-commit: 082da2f04e413932615bcc32cba83959e7d043f7
2022-09-09 02:35:35 +00:00
Shyam Jeedigunta
49ac40b489 Autogen code
Kubernetes-commit: f9c46a0e3361e19de93c02562fedfff7de448dc2
2022-09-07 18:05:42 -07:00
Shyam Jeedigunta
b8a8d94944 Add DisableCompression option to KubeConfig
Kubernetes-commit: 641fd5b482c6117d459a22d99f76aae086c3524f
2022-09-07 18:04:17 -07:00
Kubernetes Publisher
2698e8276e Merge pull request #111967 from alexzielenski/csa-to-ssa
[client-go] add function to upgrade managedfields CSA to SSA

Kubernetes-commit: 385cc255c77dd8c03bba6322946f7c97fdb33f53
2022-09-07 22:50:19 +00:00
Kubernetes Publisher
27c67e708a Merge pull request #111122 from alexzielenski/informer
support removal of event handlers from SharedIndexInformers

Kubernetes-commit: 2969000db3fae354b7b27bc79712d244248e640e
2022-09-07 22:50:16 +00:00
Kubernetes Publisher
d28c73639f Merge pull request #112022 from JackZxj/release-lock
update lock getter of leaderelection

Kubernetes-commit: 2b203348fbe7d05dec9e913e0fb50045a2474425
2022-09-07 18:39:46 +00:00
Alexander Zielenski
00d892f447 correct spacing
Kubernetes-commit: dbff8e117c8d4aeccac6ea211dfa334e30621727
2022-09-06 20:58:50 -07:00
Alexander Zielenski
2efbeaf56e add boilerplate
Kubernetes-commit: 3528fd7e47f585c144b13c0c2b75bc4e432987c6
2022-09-06 19:51:47 -07:00
Alexander Zielenski
dac0826f18 remove inaccurate comment
Kubernetes-commit: 52fcd20b578b67234a9ac84b5abf1cd2b3d06ea4
2022-09-02 17:42:08 -07:00
Alexander Zielenski
7634f2e002 make upgrade modify input instead of deep copying
Kubernetes-commit: adcb5ec3d43908a916fd1ae75af121568f26b80d
2022-09-02 17:40:34 -07:00
Alexander Zielenski
9aa7c11460 remove fieldsv1 from upgrade body
Kubernetes-commit: 5c9534b9cfdcfa9625153051f0859e101abb97a9
2022-09-02 17:38:29 -07:00
Alex Zielenski
703d15eff6 Update staging/src/k8s.io/client-go/util/csaupgrade/upgrade.go
Co-authored-by: Antoine Pelisse <apelisse@gmail.com>

Kubernetes-commit: 5caffef694b50168f546d7758a26de832302b541
2022-09-02 17:34:07 -07:00
Kubernetes Publisher
b8b620636c Merge pull request #112199 from pohly/klog-update
dependencies: update to klog v2.80.0

Kubernetes-commit: bacd6029b3bac1dbc468b0cc2bc5770bef671af2
2022-09-02 18:36:24 +00:00
Patrick Ohly
5a2c3e9222 dependencies: update to klog v2.80.0
Contains one bug fix in the code path for formatting of objects that support
LogMarshal.

Kubernetes-commit: 1bc3bde128463cdc6d55d5d222f489e8eda5eeb7
2022-09-02 08:05:47 +02:00
Patrick Ohly
ec4fedd955 client-go: support waiting for SharedInformerFactory shutdown
SharedInformerFactory starts goroutines in Start and those can be stopped by
closing the stop channel. However, there was no API that waits for the
goroutines.

This is a problem for unit testing. A test has to return while the informers
are still running, which may get flagged by tools like
https://github.com/uber-go/goleak or by klog/ktesting when those informers
lead to log output.

While at it, more documentation gets added to address
https://github.com/kubernetes/kubernetes/issues/65036.

Kubernetes-commit: e89d1d47e8365cad31600b17dab662d3c8a359dd
2022-09-01 13:46:08 +02:00
Kubernetes Publisher
7ccf7b05af Merge pull request #112134 from apelisse/client-go-valid-segment
Validate segments with client-go/dynamic

Kubernetes-commit: b274815e200528c77b66f352e223cdaa987505f5
2022-09-01 02:35:55 +00:00
Kubernetes Publisher
d83ec9e727 Merge pull request #112129 from pohly/e2e-ginkgo-report-after-each
e2e: suppress too verbose output

Kubernetes-commit: d0e413e86d150e0d4638ce306ca3fd437fe0b763
2022-08-31 18:36:12 +00:00
Antoine Pelisse
a4b84d86ec Validate segments with client-go/dynamic
Kubernetes-commit: 7d64440dd1edf2acb8e71ecd6726904962c6bd02
2022-08-30 16:32:10 -07:00
Alexander Zielenski
675ca93180 refactor if statement
Kubernetes-commit: f7defeecce9c9e32d180deb2a2c67e063a10265f
2022-08-30 15:46:43 -07:00
Alexander Zielenski
a300ae0dfe return when test is done
Kubernetes-commit: cc0b9ffbd5a4edfe7ce01293c2bf963d4335d8d6
2022-08-30 14:38:21 -07:00
Alexander Zielenski
cfaca90a30 address comments
Kubernetes-commit: e8d8eb4381f96ec4923a801116050ee998de4887
2022-08-30 13:21:29 -07:00
Patrick Ohly
cac10a8427 dependencies: update to ginkgo v2.1.6 and gomega v1.20.1
Ginkgo v2.1.6 adds ginkgo.SuppressProgressReporting which is needed
to suppress too verbose output each time the ReportAfterEach of the custom
progress reporter is invoked.

Kubernetes-commit: 311144fb3e61dabdbcd48d164dc80716b5ba5a73
2022-08-30 19:33:50 +02:00
Alexander Zielenski
93e5e0e8a0 hold listener lock while waiting for goroutines to finish
Kubernetes-commit: 7ce19b75a8dbca12837ed9f4c5c2828c38b82a03
2022-08-29 12:34:35 -07:00
Alexander Zielenski
e11a988e1c simplify control flow
Kubernetes-commit: ee24648300f8575f503156f45b44034054c2e49d
2022-08-29 11:52:35 -07:00
jackzhang
d04c2ced1c update lock getter of leaderelection
The lock acquired by tryAcquireOrRenew is released when the leader ends
leadership. However, due to the cancellation of the context, the lock may
be set as an empty lock, so the Update cannot be run normally, resulting
in a failure to release the lock.

Signed-off-by: jackzhang <x_jackzhang@qq.com>

Kubernetes-commit: 8690ff6264cceb38bd81dec99bb8affcc40286a9
2022-08-29 09:58:13 +08:00
Kubernetes Publisher
46d4284b93 Merge pull request #111241 from Abirdcfly/fixtestorsource
make TestListPager_EachListItem rework

Kubernetes-commit: ce2c5875d83487eae67896b2ec099bbb9e40395f
2022-08-26 22:35:39 +00:00
Kubernetes Publisher
bdae576b94 Merge pull request #112068 from aojea/aojea_client_go
add aojea as client-go reviewer

Kubernetes-commit: 213d811fcb23d918ade553cbb74b174946768045
2022-08-26 11:30:26 -07:00
Antonio Ojea
fd22687940 add aojea as client-go reviewer
Kubernetes-commit: 7ddb0ef4642d62ac8bc5a58cf0370b14b8d44f01
2022-08-26 17:01:56 +02:00
Kubernetes Publisher
35ead05f62 Merge pull request #112052 from tosi3k/bump-client-golang
Bump prometheus/client_golang to v1.13.0

Kubernetes-commit: 8ccd03226f81573b91550f21c6b8d63f65e7c2f1
2022-08-26 10:35:28 +00:00
Antoni Zawodny
5291ca2900 Bump prometheus/client_golang to v1.13.0
Kubernetes-commit: f78e7a2b19fe275b7cb43c01099366c52545e4d1
2022-08-26 05:40:17 +02:00
Kubernetes Publisher
e6538dd42b Merge pull request #112024 from cndoit18/remove-redundant-judgment
style: remove redundant judgment

Kubernetes-commit: bc9f48b84187e6fd9ba5b828a449893d4569e4c6
2022-08-25 18:35:19 +00:00
Alexander Zielenski
089614c43e remove last applied configuration information
Kubernetes-commit: a7fe0f0283765e4970211f7227602e2caa4b3a57
2022-08-24 12:31:57 -07:00
Alexander Zielenski
efe378914a add more test cases
Kubernetes-commit: 42c960497a4737d8147d40d436a00be81ec4248d
2022-08-24 11:51:30 -07:00
Alexander Zielenski
46dc22f46a clean up test
Kubernetes-commit: 8f6d7f1fa13db3d7a3354a13f014e1ce7acabda0
2022-08-24 10:24:05 -07:00
Alexander Zielenski
ced85a8521 update godoc
Kubernetes-commit: f94ef92f2ac44fb07bc8d75d5f250b757b343c11
2022-08-24 10:12:41 -07:00
Alexander Zielenski
049ba69f2f expose FieldsToSet and SetToFields
Kubernetes-commit: a338fff435c35a4da2556a8f4c4ab059c98e909c
2022-08-24 10:03:16 -07:00
Monis Khan
6a008ec216 exec auth: support TLS config caching
This change updates the transport.Config .Dial and .TLS.GetCert fields
to use a struct wrapper.  This indirection via a pointer allows the
functions to be compared and thus makes them valid to use as map keys.
This change is then leveraged by the existing global exec auth and TLS
config caches to return the same authenticator and TLS config even when
distinct but identical rest configs were used to create distinct
clientsets.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 831d95b6a021c2767effe85e461309cb6a0fdcec
2022-08-24 16:04:19 +00:00
Alexander Zielenski
aa892ab1ac remove unused code
Kubernetes-commit: f495d7656ca79e2d5cae03b37977e75369352645
2022-08-23 16:17:27 -07:00
Alexander Zielenski
90ef078c30 dont expose internal methods in implementatoin
Kubernetes-commit: fe2b5d00f2c1f16636638acd10b8d640e6de22c9
2022-08-23 16:12:47 -07:00
Alexander Zielenski
ac7f6579ff fix spelling
Kubernetes-commit: 7685b393c2ee8f8548d62f9dd8485df764a0c8c3
2022-08-22 17:34:02 -07:00
Alexander Zielenski
c364b639fb add function to upgrade managedfields CSA to SSA
Kubernetes-commit: 27cd307e23df3a2d508d52ff10ac8f46bf3bcea3
2022-08-22 16:42:18 -07:00
Alexander Zielenski
0f4a6cf319 reset listenersStarted
for correctness. technically shouldnt be an issue since restarting a stopped processor is not supported

Kubernetes-commit: 3a81341cfa6f7e2ca1b9bfc195c567dcdfaa4dea
2022-08-08 14:19:37 -07:00
Alexander Zielenski
449817f7b5 add multithreaded test to shared informer
Kubernetes-commit: 8af0a31a15079725e5910d538a6ace03df2e382a
2022-08-08 13:39:18 -07:00
Alexander Zielenski
de0b7671e3 remove duplicate test
became a duplicate while refactoring original PR

Kubernetes-commit: df9a7afa63164035f1e94c3278d470b347b697b9
2022-08-08 11:46:05 -07:00
Alexander Zielenski
0565962dd0 address review comments
asd

Kubernetes-commit: 5f372e1867305679d8f9d8a013c5500763e5c875
2022-08-08 11:44:37 -07:00
cndoit18
bcd2e6c7da style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>

Kubernetes-commit: ec43037d0f57fdfc2fdc4960fdb8a7e31ac79fae
2022-07-29 18:25:05 +08:00
Kubernetes Publisher
d5e58631fd Merge pull request #111752 from aanm/revert-final-url-template
Revert "client-go: remove no longer used finalURLTemplate"

Kubernetes-commit: dfd10d3133669d7c30b28edcf1024bafda1df766
2022-08-24 02:35:32 +00:00
Kubernetes Publisher
5feaced742 Merge pull request #67782 from dims/yank-in-tree-openstack-cloud-provider
Remove in-tree openstack cloud provider

Kubernetes-commit: 07bca2d7919c192435949c53f81acff58d6f39eb
2022-08-24 02:35:30 +00:00
Kubernetes Publisher
0fdc4f348a Merge pull request #111684 from 0xff-dev/master1
use constant NamespaceDefault instead of variable namespace

Kubernetes-commit: e7297321321a7cde918734402a8a999990045179
2022-08-24 02:35:29 +00:00
Kubernetes Publisher
4faffa8644 Merge pull request #111564 from inosato/remove-ioutil-from-cli-client-go
Remove ioutil from client-go

Kubernetes-commit: eb713b11867557c0bf829fc5cf919791db2a022b
2022-08-24 02:35:26 +00:00
Kubernetes Publisher
2e404084ad Merge pull request #111918 from liggitt/in-tree-auth
Restore in-tree credential plugins for 1.25

Kubernetes-commit: d581cc90adba6c84919738841fe3e07302d53e33
2022-08-18 22:38:37 +00:00
Jordan Liggitt
c2f61ae20a Update removal warnings to 1.26
Kubernetes-commit: 68758fc5c5099c83104a637e6d6ad3f4534f0d08
2022-08-18 14:17:56 -04:00
Jordan Liggitt
54e42ab6f2 update-gofmt
Kubernetes-commit: 79c09f0b310b8b66f8f14ad254f268788c42e076
2022-08-18 14:17:31 -04:00
Jordan Liggitt
ef26118838 Revert "Remove gcp and azure auth plugins"
This reverts commit 916cf16cf14928702f3f90b655ddddab2c85fcec.

Kubernetes-commit: 651b4f5b647a205d12fad4d0edc489d97109cccc
2022-08-18 14:16:23 -04:00
André Martins
e9d4627252 client-go/rest: check if url is nil to prevent nil pointer dereference
Signed-off-by: André Martins <aanm90@gmail.com>

Kubernetes-commit: 94e7b2b8fdb4028b8b9d10ce57b9b33df146beb7
2022-08-09 14:19:01 +02:00
André Martins
c501ee0eba Revert "client-go: remove no longer used finalURLTemplate"
The functionality provided by the finalURLTemplate is still used by
certain external projects to track the request latency for requests
performed to kube-apiserver.

Using a template of the URL, instead of the URL itself, prevents the
explosion of label cardinality in exposed metrics since it aggregates
the URLs in a way that common URLs requests are reported as being the
same.

This reverts commit bebf5a608f68523fc430a44f6db26b16022dc862.

Signed-off-by: André Martins <aanm90@gmail.com>

Kubernetes-commit: f8f190cdd2fa76296f8b1b019ac77128b5d40b79
2022-08-08 23:27:45 +02:00
Davanum Srinivas
98e81a7784 Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9bbf01bae93600d3314bce0acbff1f3a0a42e74b
2022-08-08 16:01:59 -04:00
Kubernetes Publisher
a890e7bc14 Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs

Kubernetes-commit: 759785ea147bc13945d521eaba4a6592cbc0675f
2022-08-07 23:56:12 +00:00
Kubernetes Publisher
f10f16e029 Merge pull request #111113 from mimowo/retriable-pod-failures-job-controller
Support handling of pod failures with respect to the configured rules

Kubernetes-commit: eefcf6aa801c5db48b564d0464470d623b8bfb79
2022-08-05 00:25:03 +00:00
Kubernetes Publisher
3300752b61 Merge pull request #111696 from liggitt/go119mod
Update go.mod to go1.19

Kubernetes-commit: 897cdea783916023f269e32003a9a3cdb98e4b46
2022-08-04 20:16:34 +00:00
Kubernetes Publisher
ce9ac379ec Merge pull request #108692 from jsafrane/selinux
Speed up SELinux volume relabeling using mounts MVP

Kubernetes-commit: b6d0f6ab613e4f3d3d1f4b6a48c24c561c65a4f1
2022-08-04 20:16:31 +00:00
Jordan Liggitt
4100519c43 Update go.mod to go1.19
Kubernetes-commit: 00db9f02293a6e0325330b575bffb9e466406dfe
2022-08-04 10:03:05 -04:00
Michal Wozniak
c439b2507d Support handling of pod failures with respect to the specified rules
Kubernetes-commit: bf9ce70de34c93b545f95e1d81c122c81a8a0aa5
2022-08-04 08:21:32 +02:00
0xff-dev
c94a539bfb use constant NamespaceDefault instead of variable namespace
Kubernetes-commit: 4bdca5689f65597f28a99f3610dd4e43fbc9cd7c
2022-08-04 14:18:47 +08:00
Sarvesh Rangnekar
76884cd2d8 Auto generate code for ClusterCIDR API
Kubernetes-commit: 299724d099f87d66b7a196d5acb545eb4dd78b9a
2022-08-02 02:09:07 +00:00
inosato
27de641f75 Remove ioutil from client-go
Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 88dfa51b6003c90e8f0a0508939a1d79950a40df
2022-07-30 20:54:41 +09:00
Abirdcfly
9b300defa3 make TestListPager_EachListItem rework
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Kubernetes-commit: 5e84f6b6d7cd39b785eaca404c3f7e460f80f71b
2022-07-19 15:34:23 +08:00
Alexander Zielenski
5a25eb0de8 switch listeners to use a map, adapt tests
Kubernetes-commit: 063ef090e7fb5823ca18a10a83e8847eedac9599
2022-06-16 10:54:03 -07:00
Jan Safranek
a00e9abf6c Regenerate files
Kubernetes-commit: f2fd9c1c16c7ba99856d96f69c3b9bde1b811367
2022-06-06 20:08:29 +02:00
Kubernetes Publisher
55b6f70f83 Merge pull request #111677 from dims/stop-panic-in-govet-levee
Stop panic in govet levee under golang 1.19

Kubernetes-commit: ef7fc1046059b7cbf93a7a7f5481ed200783ff21
2022-08-04 08:16:30 +00:00
Davanum Srinivas
606e4a8099 run lint-dependencies and follow directions
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 34742f2d2eebfc3ced8442f8579581705dcba38d
2022-08-03 21:56:02 -04:00
Davanum Srinivas
fe9020e749 Stop panic in govet-levee CI job
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 30e2fcd041cdf00d91fb7876f28165f532950213
2022-08-03 21:47:28 -04:00
Kubernetes Publisher
e803ec6bfc Merge pull request #110495 from alexzielenski/atomic-objectreference
make ObjectReference field ownership granular

Kubernetes-commit: a0e702763e01d246ce13a5d7608407204094748a
2022-08-04 00:23:48 +00:00
Kubernetes Publisher
07171f82e7 Merge pull request #111090 from kinvolk/rata/userns-support-2022
Add support for user namespaces phase 1 (KEP 127)

Kubernetes-commit: 4b6134b6dc497f48916d4b1667d4c9a461aaa36a
2022-08-03 20:20:12 +00:00
Alexander Zielenski
b5feb253b6 mark persistentvolume's claimRef as granular
Kubernetes-commit: 84f795d04aa04b29f587d34a8852818ba5803e35
2022-08-03 09:48:30 -07:00
Alexander Zielenski
c5a511a525 update kube-openapi
Kubernetes-commit: 133c26553020409b26de0c1487c804250b528e71
2022-08-03 09:46:39 -07:00
Natasha Sarkar
bebf21907c Update kubectl kustomize to kyaml/v0.13.9, cmd/config/v0.10.9, api/v0.12.1, kustomize/v4.5.7 (#111606)
Kubernetes-commit: 83c3c37a879c6d14cce2465161f88d3c6881de8b
2022-08-03 04:15:46 +00:00
Kubernetes Publisher
68639ba114 Merge pull request #111557 from alexzielenski/update-smd-422
update smd to 4.2.3

Kubernetes-commit: 22eab136f6c85f83e56ff71ec6346ffd7cc5e977
2022-08-02 20:16:39 +00:00
Kubernetes Publisher
b0d4101b8e Merge pull request #111475 from alculquicondor/clear_pod_disruption
Add worker to clean up stale DisruptionTarget condition

Kubernetes-commit: bc4c4930ff18dce320bd33f645ff4f3accc72018
2022-08-02 20:16:37 +00:00
Alexander Zielenski
1631be4c27 update smd to 4.2.3
Kubernetes-commit: e77ed0bc2e3a807f4aca9360ec20933a03869716
2022-08-02 10:07:50 -07:00
Rodrigo Campos
912b04a8ad Update autogenerated files
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>

Kubernetes-commit: 8dc98c9b8ecded941b2664f64d24b3ee98c0f500
2022-07-27 12:54:15 +02:00
Aldo Culquicondor
3dfaef50d7 Add clock interface to disruption controller
To be able to write more precise unit tests in the future

Change-Id: I8f45947dfacca501acd856849bd978fad0f735cd

Kubernetes-commit: dad8454ebb87ba7af897537db6d34033127bbfef
2022-07-26 15:11:53 -04:00
Kubernetes Publisher
3e9c4b4f17 Merge pull request #111587 from ialidzhikov/k8s-utils@ee6ede2d64
Update `k8s.io/utils` to `ee6ede2d64ed`

Kubernetes-commit: 9af9947230633823ffa94e1fd11c58d7af986d8b
2022-08-01 04:15:43 +00:00
ialidzhikov
2037cc6a9a Update k8s.io/utils to ee6ede2d64ed
Kubernetes-commit: 6aa5efb1bdc2d0dcccca67c6a9cc20820380a366
2022-07-31 16:33:14 +03:00
Kubernetes Publisher
07735eaa93 Merge pull request #111441 from denkensk/respect-topology
Respect PodTopologySpread after rolling upgrades

Kubernetes-commit: 3902a534197b3e4b7ca7a026f5027cfe0a3cc3aa
2022-07-30 12:15:36 +00:00
Alex Wang
2190b2f23b code generated by script for MatchLabelKeys in TopologySpreadConstraint
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>

Kubernetes-commit: 86a2a85e7dd0a650020bf407a6eb85b956653539
2022-07-30 13:24:55 +08:00
Kubernetes Publisher
95367f2044 Merge pull request #110851 from negz/more-like-mac-slow-s
Use checksums instead of fsyncs to avoid slow discovery caching on MacOS

Kubernetes-commit: 8cecf183a659784b240d430e22b828b8e32c1c37
2022-07-30 04:15:31 +00:00
Kubernetes Publisher
ec0f33729d Merge pull request #111387 from marseel/feature/retry_internal_errors
Add option to retry internal api error in reflector.

Kubernetes-commit: 79a62d62350fb600f97d1f6309c3274515b3587a
2022-07-28 16:16:03 +00:00
Kubernetes Publisher
c2d2c47718 Merge pull request #111228 from Abirdcfly/220716
clean unreachable code

Kubernetes-commit: 4e5711829c1c8bfadbb7632b28def5ba08325132
2022-07-27 20:05:57 +00:00
Kubernetes Publisher
fe12e65afd Merge pull request #111442 from ialidzhikov/k8s-utils@56c0de1e6f
Update `k8s.io/utils` to `9bab9ef40391`

Kubernetes-commit: e092b6d27bff004171b71fffa45f111fdcd6e81b
2022-07-27 20:05:55 +00:00
Nic Cope
761f55c9e0 Use SHA256 sums to verify discovery cache integrity
This is a little more computationally expensive but reduces the
likelihood of a potentially malicious cache collision.

Signed-off-by: Nic Cope <nicc@rk0n.org>

Kubernetes-commit: c5957c284e1d23bdadc98fbbe2bb481fc1f345d4
2022-07-26 23:51:01 -07:00
ialidzhikov
7a55c3b96b Update k8s.io/utils to 9bab9ef40391
Kubernetes-commit: 168fef6845f50f0460e7bdc0280da480cc92b787
2022-07-26 18:43:20 +03:00
Kubernetes Publisher
cc879cd5b6 Merge pull request #111254 from dims/update-to-golang-1.19-rc2
[golang] Update to 1.19rc2 (from 1.18.3)

Kubernetes-commit: 3ffdfbe286ebcea5d75617da6accaf67f815e0cf
2022-07-27 00:05:46 +00:00
Kubernetes Publisher
b5c7588f8a Merge pull request #109141 from ulucinar/bump-discovery-burst
Bump default burst limit for discovery client to 300

Kubernetes-commit: 5ac563c507cd75c9382a2a23a3c8e3452138a021
2022-07-26 20:05:51 +00:00
Marcel Zięba
ff6bf679aa Add option to retry internal api error in reflector.
Kubernetes-commit: 0b2b6489de8f75d5299f54180617601126bb8878
2022-07-25 08:02:54 +00:00
Kubernetes Publisher
b2097e607c Merge pull request #110666 from ldsdsy/modify
Fix some syntax errors under the staging/src/k8s.io/client-go/rest/ folder

Kubernetes-commit: 6db9d882387eb2a0b5d78deffac88a121ceac9f3
2022-07-22 16:22:34 +00:00
Kubernetes Publisher
4db4856058 Merge pull request #111242 from wojtek-t/fix_leaking_goroutines_11
Fix leaking goroutines in multiple integration tests

Kubernetes-commit: 0cde1b744652306e921116883e2465a005b79811
2022-07-22 16:22:31 +00:00
Kubernetes Publisher
95a40e254c Merge pull request #110178 from kevindelgado/validation-beta-1-25
Graduate server side validation to beta

Kubernetes-commit: eeb12bb3af3361c9ac652be071c3b9cf49aa5e58
2022-07-22 16:22:30 +00:00
Kubernetes Publisher
267b6570f5 Merge pull request #111235 from Abirdcfly/220719
fix a possible panic because of taking the address of nil

Kubernetes-commit: e234917e0a3e4bb384ef14c198742643a7e170fd
2022-07-22 16:22:27 +00:00
Kubernetes Publisher
0cfc9635b9 Merge pull request #110649 from harshanarayana/fix/GIT-110335-fix-fake-event-expansion
client-go: Modify FakeEvents to Work Event Sink started with `""` namespace

Kubernetes-commit: 0e7bb163e38cde20712ce29e918e10ec5c82f3eb
2022-07-22 16:22:26 +00:00
Davanum Srinivas
2a6c116e40 Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

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

Kubernetes-commit: a9593d634c6a053848413e600dadbf974627515f
2022-07-19 20:54:13 -04:00
Abirdcfly
ca60e0ea14 fix a possible panic because of taking the address of nil
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Kubernetes-commit: c8c2819a4d7327f33a143f65c6af2bff5ef49735
2022-07-19 10:39:08 +08:00
Wojciech Tyczyński
9dde02d660 Clean shutdown of client integration tests
Kubernetes-commit: f673c262bdc2f3f0f060a2ed4349b723a088f36a
2022-07-18 21:13:33 +02:00
Abirdcfly
65b1e7d3c0 clean Unreachable code
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Kubernetes-commit: f71718d6448418d0289b9649905a16bfb1962b68
2022-07-19 00:58:17 +08:00
Kubernetes Publisher
c6bd30b9ec Merge pull request #111176 from p0lyn0mial/upstream-cacher-refactor-for-streaming
refactor the reflector to pave the way for streaming

Kubernetes-commit: d96891255f0a15c5c992ba38ab3cf782eda66fdf
2022-07-15 21:11:11 +00:00
Lukasz Szaszkiewicz
441e2c8c97 reflector: simplify reading the resourceVersion
Kubernetes-commit: 63b125d4061d267ad8998ea30e054bb1445b1a5a
2022-07-15 10:14:26 +02:00
Nic Cope
735524f850 Use sha256 to sanitize discovery HTTP cache keys
This helps avoid (potentially malicious) collisions when reading and
writing cache data.

Signed-off-by: Nic Cope <nicc@rk0n.org>

Kubernetes-commit: 288a17fd337c65cb5aea44e44ecb74e9cb8088f5
2022-07-14 14:11:33 -07:00
Alper Rifat Ulucinar
4aac6a7c9c Bump discovery burst of default ConfigFlags to 300
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>

Kubernetes-commit: 45f653e3db6a120d7cafaf2a9262fb3c8a2e22a2
2022-07-14 09:58:55 +03:00
Kevin Delgado
b4c3510afd update kjson
Kubernetes-commit: c210483cf02768c3f2eaf42e13844c5d821831ba
2022-07-13 16:05:45 +00:00
Giuseppe Scrivano
828c3cb11b pkg/apis, staging: add HostUsers to pod spec
It is used to request that a pod runs in a unique user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Co-authored-by: Rodrigo Campos <rodrigoca@microsoft.com>

Kubernetes-commit: 9e9b23fd3ca6c0c58ee401b18a65422c0564bec0
2022-07-07 21:43:51 +02:00
Nic Cope
1ea239faa5 Use checksums instead of fsyncs to manage discovery cache corruption
Part of the API discovery cache uses an HTTP RoundTripper that
transparently caches responses to disk. The upstream implementation of
the disk cache is hard coded to call Sync() on every file it writes.
This has noticably poor performance on modern Macs, which ask their disk
controllers to flush all the way to persistant storage because Go uses
the `F_FULLFSYNC` fnctl. Apple recommends minimizing this behaviour in
order to avoid degrading performance and increasing disk wear.

The content of the discovery cache is not critical; it is indeed just a
cache and can be recreated by hitting the API servers' discovery
endpoints. This commit replaces upstream httpcache's diskcache
implementation with a similar implementation that can use CRC-32
checksums to detect corrupted cache entries at read-time. When such an
entry is detected (e.g. because it was only partially flushed to
permanent storage before the host lost power) the cache will report a
miss. This causes httpcache to fall back to its underlying HTTP
transport (i.e. the real API server) and re-cache the resulting value.

Apart from adding CRC-32 checksums and avoiding calling fsync this
implementation differs from upstream httpcache's diskcache package in
that it uses FNV-32a hashes rather than MD5 hashes of cache keys in
order to generate filenames.

Signed-off-by: Nic Cope <nicc@rk0n.org>

Kubernetes-commit: 7a2c6a432f9e8db8b84abe5607843429f8bff417
2022-06-28 19:15:49 -07:00
Nic Cope
76fccca0ea Add a benchmark for the discovery cache RoundTripper
This benchmark is intended to demonstrate a performance improvement
gained by removing fsyncs. Refer to the below issue for more detail.

https://github.com/kubernetes/kubernetes/issues/110753

Signed-off-by: Nic Cope <nicc@rk0n.org>

Kubernetes-commit: eace46906512b99c23ad9635edc2ea055363a602
2022-06-28 19:40:58 -07:00
Lukasz Szaszkiewicz
04f67d5d4f reflector: move LIST to its own method
Kubernetes-commit: 6fc09008def0b63fdd31bd26a14f7fcd3ed63c7e
2022-06-24 16:25:08 +02:00
Lukasz Szaszkiewicz
4e28921c86 reflector: refactor watchHandler
Kubernetes-commit: e9e26068b746315b616a26b91ff2613f98e934bc
2022-06-24 13:44:32 +02:00
Kubernetes Publisher
163ee0b6d7 Merge pull request #111080 from zhoumingcheng/master-v3
Correct wrong syntax

Kubernetes-commit: 3b4d2a9b315be29f600c4eae704d62107fd5ff98
2022-07-15 21:11:09 +00:00
Kubernetes Publisher
743e29dc1f Merge pull request #111008 from cici37/bumpCEL
Bump cel-go to v0.12.3

Kubernetes-commit: 19a22f763770d1208dca2b8d50513ac805f7fe14
2022-07-14 13:11:01 +00:00
Kubernetes Publisher
79a582f2eb Merge pull request #111097 from saltbo/fix-thethe-typo
fix: update the typo code comment

Kubernetes-commit: f3654386abbb838c42286250ef52a73c52ab1812
2022-07-14 01:23:24 +00:00
Kubernetes Publisher
eabd4289b0 Merge pull request #111002 from HecarimV/fix-220707
fix static-check for staging/src/k8s.io/client-go/

Kubernetes-commit: 09e8339ae4e575ec40e8ed0fc2829fcb678c0f19
2022-07-13 09:22:58 +00:00
saltbo
7c3fa18b11 fix: update the typo code comment
Kubernetes-commit: d2bab218ddef3fc3f444038420dd500c0e8bc068
2022-07-13 10:16:51 +08:00
Kubernetes Publisher
59fda2e669 Merge pull request #111087 from HecarimV/fix-22071205
Fix: import the same package multiple times

Kubernetes-commit: d46399f788fbb8de586cd71c19d1e49bfae8659f
2022-07-12 17:29:46 +00:00
HaoJie Liu
2f582c2a40 Fix:import the same package multiple times
Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>

Kubernetes-commit: 4f0a0ec81c649727cfc62cf8c0a2ad7eabf12516
2022-07-12 17:41:37 +08:00
zhoumingcheng
84e1219642 Correct some wrong syntax
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com>

Kubernetes-commit: e590ab77dcb68486a154b755aae658509b9290ea
2022-07-12 10:46:56 +08:00
Kubernetes Publisher
3b969f9680 Merge pull request #111001 from pohly/klog-update
build: update to klog v2.70.1

Kubernetes-commit: 8e62fd24b073296c4cfd8f8d966d5922b6d9022c
2022-07-08 01:23:16 +00:00
Cici Huang
7f7dbbc80a Bump cel-go to v0.12.0
Kubernetes-commit: 772a252b06da86955d30d7b935dc4dba84fdc328
2022-07-07 17:13:57 +00:00
HaoJie Liu
f295032991 fix static-check for staging/src/k8s.io/client-go/
Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>

Kubernetes-commit: 6022b69dfd1c6e9454d4aa79012803c749706f6d
2022-07-07 18:58:25 +08:00
Patrick Ohly
26b506437f build: update to klog v2.70.1
This makes ktesting more resilient against logging from leaked goroutines,
which is a problem that came up in kubelet node shutdown
tests (https://github.com/kubernetes/kubernetes/issues/110854).

Kubernetes-commit: 3581e308835c69b11b2c9437db44073129e0e2bf
2022-07-07 12:54:08 +02:00
Kubernetes Publisher
506ef8944c Merge pull request #110990 from thockin/svc-typenames-IPFamilyPolicyType
Rename IPFamilyPolicyType => IPFamilyPolicy

Kubernetes-commit: e8eb7a5e1906ec07f5e666a2d2f32f3a0e74dcec
2022-07-07 05:29:22 +00:00
ldsdsy
123d4e7e38 Fix a typo
Kubernetes-commit: bfe61fa574321474c4b278afb39af95464efad43
2022-06-20 21:52:50 +08:00
Harsha Narayana
e2ef40870b GIT-110335: address namespace defaulting for events
Kubernetes-commit: 85e74aa3122114ac7e82c3044f387d03661063e4
2022-06-18 21:52:50 +05:30
Wojciech Tyczyński
b69a16cf38 Refactor store index into its structure
Kubernetes-commit: 7c94ce3076a96acab4c7e88489cd596f1aad40e0
2022-05-05 17:30:24 +02:00
Alper Rifat Ulucinar
ed7d154cc2 Bump default burst limit for discovery client to 300
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>

Kubernetes-commit: 534427f5d3134189f49e6811a7642b86cf92c55a
2022-03-30 11:19:41 +03:00
astraw99
f549acf3ce Fix duplicate code block of ListAll function
Kubernetes-commit: d8db1e9ba3c110012def6faa5579ad3abb71a6a6
2022-03-24 14:47:20 +08:00
Harsimran Singh Maan
fbd8e9aa52 fix failing test assertions
Kubernetes-commit: c8714ebd118760f8d68e9b536d0350129af12d9b
2022-02-22 16:05:40 -08:00
Harsimran Singh Maan
1f10368e31 Preserve metadata for fake dynamic client unstructured lists
Signed-off-by: Harsimran Singh Maan <maan.harry@gmail.com>

Kubernetes-commit: ac904454c24bebd9501ea4701d38f55f25ec9c33
2021-12-31 15:15:18 -08:00
Tim Hockin
61a7d9d6e1 Rename IPFamilyPolicyType => IPFamilyPolicy
Kubernetes-commit: 55232e2ef773423ed9b3321b38fc438f85cd690c
2021-11-09 23:09:35 -08:00
Kubernetes Publisher
a16e76eb69 Merge pull request #110831 from chendave/openapi
Bump `kube-openapi` to the latest

Kubernetes-commit: 8a7eda4f610f7003bf096d870531c7583751674e
2022-06-30 19:56:35 +00:00
Dave Chen
6a58c3a5c7 Bump kube-openapi to the latest
This will help us to get rid of `Ginkgo` v1 dep.

Signed-off-by: Dave Chen <dave.chen@arm.com>

Kubernetes-commit: 597071af17377f5ab4de03804b0d8b41f73fe7ce
2022-06-28 15:59:50 +08:00
Kubernetes Publisher
f5b6af4563 Merge pull request #110788 from 21kyu/change_reflect_ptr
Change reflect.Ptr to reflect.Pointer

Kubernetes-commit: 10810ab42bc8acde6732feae545aa34a09ecd299
2022-06-27 19:52:45 +00:00
21kyu
1b23c1577a Change reflect.Ptr to reflect.Pointer
Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98
2022-06-26 01:23:43 +09:00
Kubernetes Publisher
8dfe88aeff Merge pull request #110724 from pohly/klog-update
build: update to klog v2.70.0

Kubernetes-commit: ddfbb5bdbef1febda92fdc4ee4666f5339d1f729
2022-06-23 03:53:28 +00:00
Kubernetes Publisher
899bcd7409 Merge pull request #110425 from LY-today/fake-evict-list-err
fix: list pod err after an pod evicted

Kubernetes-commit: 1d811065345bfe9f3be7f6757a9938c1760180c7
2022-06-22 23:52:40 +00:00
Kubernetes Publisher
0647d43372 Merge pull request #109632 from weilaaa/recorrect_byindex_input_param
correct input params of ByIndex

Kubernetes-commit: e2fe430da77da01aa5b4c9bd787d46062f1500a0
2022-06-22 19:53:10 +00:00
LY-today
9ac8bfecbb fix: list pod err after an pod evicted
Signed-off-by: LY-today <724102053@qq.com>

Kubernetes-commit: f299494e7977a935511208eb91001508b4b629ce
2022-06-22 23:30:40 +08:00
Patrick Ohly
cb4a10df41 build: update to klog v2.70.0
The main practical advantage is that klog.Fatal no longer dumps the backtrace
of all goroutines.

Kubernetes-commit: f05e327ca611c23469ef41310d1d59b384cedc27
2022-06-22 16:29:51 +02:00
weilaaa
64585cf823 correct input params and add godoc
Kubernetes-commit: 9847b2eeb43e3fd13581dfdb4eeb288139ea7f3b
2022-06-22 11:26:07 +08:00
Kubernetes Publisher
acab036eff Merge pull request #110436 from nicks/nicks/issue-1108
client-go: fix panic in ConfirmUsable validation

Kubernetes-commit: 349efaabf89cf894d3f7ef16f3936318ae96728e
2022-06-15 23:58:19 +00:00
Kubernetes Publisher
830d4c4624 Merge pull request #110378 from lucacome/bump-grpc
Bump grpc to v1.47.0

Kubernetes-commit: de5982637aebe17b0fa4a814ec1e6675c0132ddd
2022-06-14 19:52:33 +00:00
Luca Comellini
e0fa50410b Bump grpc to v1.47.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>

Kubernetes-commit: 51fafd7de3e0d71d98a1f9e10d3801f157472ae3
2022-06-13 22:08:47 -07:00
Kubernetes Publisher
2a9f955190 Merge pull request #110518 from dims/switch-to-released-version-of-v3.8.0-github.com/emicklei/go-restful/v3
Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3

Kubernetes-commit: 0fe0dbf3fb8cf501c24c87f4113a3819cb86a550
2022-06-13 19:52:10 +00:00
Kubernetes Publisher
d4fc9af2df Merge pull request #110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1
Update gopkg.in/yaml.v3 to v3.0.1

Kubernetes-commit: 3375f5773b4371bc4975879521002b16ed8f0f56
2022-06-13 07:51:49 +00:00
Davanum Srinivas
08b4bbc4f6 Update gopkg.in/yaml.v3 to v3.0.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 68b414764bfa32c3232df7c7455b77e8e8c8ecd7
2022-06-11 20:39:40 -04:00
Davanum Srinivas
7e1edab3f7 Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 6f2889718fb0bab46558fcd4a11b6858d5fc2149
2022-06-11 11:27:08 -04:00
Kubernetes Publisher
87a5b7b3b7 Merge pull request #110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful
Switch to v3 of github.com/emicklei/go-restful by updating kube-openapi

Kubernetes-commit: 7e66aa3cfb6cdac3508c04017fa3b7cdcdf9238f
2022-06-10 23:51:49 +00:00
Nick Santos
5ce7078061 client-go: fix panic in ConfirmUsable validation
Fixes https://github.com/kubernetes/client-go/issues/1108

Kubernetes-commit: 7d2c6096c212d9c31e7cd0bccb6dc2dec9a4ef6a
2022-06-07 15:53:16 -04:00
Davanum Srinivas
cf0ba13096 Switch to v3 of github.com/emicklei/go-restful
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: ab690750df1d27409d31fd270d77b4390bac4431
2022-06-02 10:03:29 -04:00
Kubernetes Publisher
f88de91ae5 Merge pull request #96771 from soltysh/shortcut_expander
restmapper: re-try shortcut expander after not-found error

Kubernetes-commit: 7e3c98fd303359cb9f79dfc691da733a6ca2a6e3
2022-05-30 12:48:08 +00:00
Tim Hockin
3f162fe9e9 Copy LoadBalancerStatus from core to networking
This type should never have been shared between Service and Ingress.
The `ports` field is unfortunate, but it is needed to stay compatible.

Kubernetes-commit: 0153bfad16102e42d0b0dbb56742d0a6626e4180
2021-11-08 17:06:59 -08:00
Uwe Krueger
90c6a46b32 active remove/add tests for event handlers
Kubernetes-commit: e9cd17170b1646672796e713dee6c4fb0e6693bb
2021-10-06 12:40:46 +02:00
Uwe Krueger
de4dd3aaf3 tests for invalid registration removals
Kubernetes-commit: 152b6e11af4c8c50b768630bf7724e0bb3414e9c
2021-08-22 13:27:36 +02:00
Uwe Krueger
33eff64a05 apply desired changes for handler registration
Kubernetes-commit: 92f04baac98186673c684bba419087d6285807b1
2021-08-22 13:03:18 +02:00
Uwe Krueger
d73e40f207 rename handle to registration
Kubernetes-commit: 7054ac16d43a4a55d6e7b69943eb209f6495c4ce
2021-08-04 21:54:32 +02:00
Alexander Zielenski
b3a61c6731 remove informational informer methods again
Kubernetes-commit: f52f4a8e3045fd3eeba0315a347ed653012cd5c5
2022-06-16 00:09:20 -07:00
Alexander Zielenski
ecdc8bf729 support removal of event handlers from SharedIndexInformers
To be able to implement controllers that are dynamically deciding
on which resources to watch, it is required to get rid of
dedicated watches and event handlers again. This requires the
possibility to remove event handlers from SharedIndexInformers again.
Stopping an informer is not sufficient, because there might
be multiple controllers in a controller manager that independently
decide which resources to watch.

Unfortunately the ResourceEventHandler interface encourages to use
value objects for handlers (like the ResourceEventHandlerFuncs
struct, that uses value receivers to implement the interface).
Go does not support comparison of function pointers and therefore
the comparison of such structs is not possible, also. To be able
to remove all kinds of handlers and to solve the problem of
multi-registrations of handlers a registration handle is introduced.
It is returned when adding a handler and can later be used to remove
the registration again. This handle directly stores the created
listener to simplify the deletion.

Kubernetes-commit: 7436af3302088c979b431856c432b95dd230f847
2022-06-16 00:07:54 -07:00
Maciej Szulik
e2598a43a3 restmapper: re-try shortcut expander after not-found error
Kubernetes-commit: f7d1eb7726fa511b6439b7f8162138742ac639ab
2020-11-21 00:10:47 +01:00
Kubernetes Publisher
cf13620092 Merge pull request #84145 from bells17/fix-typo
Fix typo: type -> eventtype

Kubernetes-commit: f9f9e7177a328ae47bac6b823d57a99dfbfd310b
2022-05-26 12:48:14 +00:00
Kubernetes Publisher
33115b49ac Merge pull request #110100 from tkashem/client-go-backoff-fix
client-go: fix backoff delay

Kubernetes-commit: 9997897f44976f8969fcc79678cddc291987fab4
2022-05-23 08:47:41 +00:00
Abu Kashem
71b8c174e4 client-go: fix backoff delay
Kubernetes-commit: 60e74a9ff73b206e5dd439b5df51ac9826635579
2022-05-17 17:19:26 -04:00
Kubernetes Publisher
0bc005e72f Merge pull request #110076 from karlkfi/patch-1
fix: reflector to return wrapped list errors

Kubernetes-commit: f0c47dc91628978ff21d417630037e839102621e
2022-05-17 20:09:18 +00:00
Karl Isenberg
876406445a fix: reflector to return wrapped list errors
This fix allows Reflector/Informer callers to detect API errors using the standard Go errors.As unwrapping methods used by the apimachinery helper methods. Combined with a custom WatchErrorHandler, this can be used to stop an informer that encounters specific errors, like resource not found or forbidden.

Kubernetes-commit: 9ace604b63045ebbb066cab5e8508b51d0900a05
2022-05-16 16:33:30 -07:00
Kubernetes Publisher
ef63e495ba Merge pull request #110013 from enj/enj/i/remove_azure_gcp_auth_plugins
Remove gcp and azure auth plugins

Kubernetes-commit: 2d08104ee3beb5c13db088d40cc22ec053512cea
2022-05-12 23:35:52 +00:00
Monis Khan
1f7dc8805f Remove gcp and azure auth plugins
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 916cf16cf14928702f3f90b655ddddab2c85fcec
2022-05-12 09:48:04 -04:00
Kubernetes Publisher
77f63643f9 Merge pull request #108080 from astoycos/issue-132
Fix Panic Condition

Kubernetes-commit: efb62b3538f34f304ea9c68966a053822bc23d1a
2022-05-11 12:58:10 +00:00
Kubernetes Publisher
b4b8e5e1e5 Merge pull request #108492 from kerthcet/feature/add-NodeInclustionPolicies
Add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec

Kubernetes-commit: cc6619857027c634918a6d2cca9bab072c46f71f
2022-05-11 04:06:00 +00:00
kerthcet
5bb1a76702 feat: add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec
Signed-off-by: kerthcet <kerthcet@gmail.com>

Kubernetes-commit: 02f0a3ee91e43d39da80df926f552b8934a4646d
2022-05-10 12:54:49 +08:00
Kubernetes Publisher
24209264f7 Merge pull request #109891 from pohly/log-dependency-update
dependencies: logr and zapr v1.2.3

Kubernetes-commit: bf52c1fd46a6773b9d653ef97d94502c6e0564e5
2022-05-09 18:30:31 +00:00
Kubernetes Publisher
7c5b74295f Merge pull request #109602 from lavalamp/remove-clustername
Finish clustername removal

Kubernetes-commit: 7af5a7bfc51d0455d8b2322ae9e72ed66fb1b8f9
2022-05-07 18:33:25 +00:00
Daniel Smith
5a9c3acf9d generated files
Kubernetes-commit: 1dabd7be5c08d70dc1b54670de64cae2bf7c6a04
2022-04-21 18:39:21 +00:00
Kubernetes Publisher
c0ab12afa7 Merge pull request #109804 from cici37/celUpdate
Bump cel-go to v0.11.2

Kubernetes-commit: b7c4d243de12a30bba02e23777c8ff1627263f89
2022-05-05 10:33:16 +00:00
Kubernetes Publisher
bb66d8065b Merge pull request #109607 from liggitt/drop-unused-third-party
Drop unused golang/template package and funcs

Kubernetes-commit: a685faa79822e365fd6a3efea955b82cb3b20599
2022-05-05 10:33:13 +00:00
Kubernetes Publisher
f4c553f30d Merge pull request #109440 from liggitt/gomod-1.18
update go.mod files to go 1.18

Kubernetes-commit: cb7beb591216de93bef22525a6c5f0e435e21789
2022-05-05 02:33:08 +00:00
cici37
631da0c65f Update go-control-plane, cncf/xds/go, cncf/udpa/go and remove unused versions
Kubernetes-commit: a3587c12da7f8c87e6676f472dba39f1acbae28f
2022-05-04 18:45:22 -07:00
cici37
28feddd66c Update GRPC
Kubernetes-commit: 334d8fb7a2e85d58513c2d3fae113995c8165a4b
2022-05-04 18:41:20 -07:00
cici37
a8fbc496ab Update genproto and antlr.
Kubernetes-commit: e8f6184d8682bd4510d4e18c7c04b5799367ac51
2022-05-04 18:37:30 -07:00
cici37
ac3e4baf0f Bump cel-go to v0.11.2
Kubernetes-commit: a86dd2915771f280ff095409fc2ee917cee3c2e3
2022-05-04 18:32:06 -07:00
Jordan Liggitt
ccff9638f3 Regenerate vendor
Kubernetes-commit: 9e1064a26bfdc18b3272c3d9031d729793725392
2022-05-04 10:27:41 -04:00
Kubernetes Publisher
671a40c59f Merge pull request #109520 from cncal/lcn_cleanup_duplicate_code_snippet
Remove the duplicate code snippet in client-go delaying_queue tests

Kubernetes-commit: 78dbcb4233799bf219d4983fc2b242dd7ae1be6d
2022-05-04 10:32:57 +00:00
Kubernetes Publisher
211d8a7adf Merge pull request #109443 from kevindelgado/dynamic-apply
Add Apply and ApplyStatus methods to dynamic ResourceInterface

Kubernetes-commit: e8ef77514b5e2fe6a7c602f9663c2ef179387ea4
2022-05-04 10:32:55 +00:00
Kubernetes Publisher
2cf1a8ffd6 Merge pull request #105963 from zhucan/bugfix-95367
csi: add nodeExpandSecret support for CSI client & add unit test

Kubernetes-commit: 1aec0c81b1b283827480f9c40c5a7107b9986aa8
2022-05-04 02:33:08 +00:00
Jordan Liggitt
748150502e Remove package variables
Kubernetes-commit: 87494389ac7987ed9586190dc9566669b33a9f7c
2022-04-21 21:24:49 -04:00
Jordan Liggitt
28c4a4d40f Drop unused golang/template funcs
Kubernetes-commit: 7a261d9fa0edc0a8e615bd6bf81e8e3a5276f4fb
2022-04-21 21:21:16 -04:00
cncal
152e68ff13 Remove the duplicate code snippet in client-go delaying_queue tests
Kubernetes-commit: af438abbf332e26e2f3f729627bf9764c9b1feef
2022-04-17 15:55:33 +08:00
Kubernetes Publisher
28ccde769f Merge pull request #109436 from JamesLaverack/revert-108290
Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"

Kubernetes-commit: 4cdeab4696e86c9738d99e2650d2cdfdfb0f8d32
2022-04-13 16:44:20 +00:00
Kevin Delgado
4eab6be14c Add Apply and ApplyStatus methods to dynamic ResourceInterface
Kubernetes-commit: 581ac7f4465ed97ddc5c62f04376ac427e121601
2022-04-12 20:24:15 +00:00
James Laverack
f9fdccdfc3 Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"
This reverts commit b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac.

Kubernetes-commit: 7d57d5c70d04f652b431d2b86b8af40e119cd66a
2022-04-12 16:00:35 +01:00
Kubernetes Publisher
af4295f501 Merge pull request #109114 from tkashem/client-go-retry-thread-safe
client-go: make retry in Request thread safe

Kubernetes-commit: 0424c7c74d926b4fe3193059e003e9056b429d28
2022-04-04 16:49:36 -07:00
zhucan
1f8debfcd2 generated code and doc
Signed-off-by: zhucan <zhucan.k8s@gmail.com>

Kubernetes-commit: 1c1faf97ee8d3b147dbad067c5e65fab81cb92db
2022-04-02 00:17:25 +08:00
Patrick Ohly
c301d448ce dependencies: logr and zapr v1.2.3
The updated zapr is more resilient against MarshalLog crashing. Not a known
problem in Kubernetes, though.

Kubernetes-commit: 3e6974e0ba67a8f598e7bc4ccedfdab928935551
2022-03-31 11:26:57 +02:00
Abu Kashem
d8531f5ff0 client-go: make retry in Request thread safe
Kubernetes-commit: 6618b8ef7c0b552839555d4578b64427d20524ef
2022-03-29 13:09:26 -04:00
Kubernetes Publisher
33011f1487 Merge pull request #109050 from MadhavJivrajani/client-go-retry
rest: Ensure response body is fully read and closed before retry

Kubernetes-commit: 97bf2986cdeae0e7da70659d70375e0770b14a5e
2022-04-04 21:13:37 +00:00
Kubernetes Publisher
8a672f0fd2 Merge pull request #109151 from Argh4k/r-101566
Revert "Field `status.hostIPs` added for Pod (#101566)"

Kubernetes-commit: 691d4c3989f18e0be22c4499d22eff95d516d32b
2022-03-31 17:13:25 +00:00
Maciej Wyrzuc
f699049d30 Revert "Field status.hostIPs added for Pod (#101566)"
This reverts commit 61b3c028ba618a939559c39befb546ae5e5fd0b9.

Kubernetes-commit: 1108bed7631f545d43530aa697175d243b99610b
2022-03-30 12:50:48 +00:00
Sarvesh Rangnekar
092a109b2b Introduce APIs to support multiple ClusterCIDRs (#108290)
* Introduce networking/v1alpha1 api, ClusterCIDRConfig type

Introduce networking/v1alpha1 api group.

Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.

* Change ClusterCIDRConfig.NodeSelector type in api

* Fix review comments for API

* Update ClusterCIDRConfig API Spec

Introduce PerNodeHostBits field, remove PerNodeMaskSize

Kubernetes-commit: b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac
2022-03-31 05:16:43 +00:00
Kubernetes Publisher
488e9bb051 Merge pull request #109137 from wojtek-t/fix_multiple_values_indexer
Fix issues in indexer caused by object changing the number of index values

Kubernetes-commit: 2e55595d3baeedcab09745355824f38a60cf6d08
2022-03-30 13:13:25 +00:00
Michael Bolot
e540ebe994 Addresses the issue which caused #109115
Kubernetes-commit: cbbb5f70a47644f9830073d9d0329bf247a328a1
2022-03-29 12:35:13 -05:00
Wojciech Tyczyński
1cab68940f Add test for indexer with multiple values
Kubernetes-commit: 56159f258ca380600b0bc08b2e99cbc745db3560
2022-03-30 08:52:10 +02:00
Kubernetes Publisher
b1e85f6f00 Merge pull request #109031 from Jefftree/openapiv3beta
OpenAPI V3 Enable Beta

Kubernetes-commit: 904c30562a9a34d26ff3e76db29d00daea2e0f60
2022-03-30 05:13:30 +00:00
Abu Kashem
01ab7fb211 client-go: reset request body after response is read and closed
This commit refactors the retry logic to include resetting the
request body. The reset logic will be called iff it is not the
first attempt. This refactor is nescessary mainly because now
as per the retry logic, we always ensure that the request body
is reset *after* the response body is *fully* read and closed
in order to reuse the same TCP connection.

Previously, the reset of the request body and the call to read
and close the response body were not in the right order, which
leads to race conditions.

This commit also adds a test that verifies the order in which
the function calls are made to ensure that we seek only after
the response body is closed.

Co-authored-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 68c8c458ee8f6629eef806c48c1a776dedad3ec4
2022-03-28 20:40:49 -04:00
Jefftree
4fdf361910 generated: Update kube-openapi and vendor
Kubernetes-commit: 550d6383b5219ac43b8c86cf57807c47b82919aa
2022-03-28 13:20:46 -07:00
Kubernetes Publisher
9cfda74c80 Merge pull request #108032 from deejross/kep3140-cronjob-timezone
KEP 3140: TimeZone support for CronJob

Kubernetes-commit: 0f2300575c805bb70ba181957684361bcd25f86a
2022-03-30 01:13:24 +00:00
Shiming Zhang
0c14d0c485 Field status.hostIPs added for Pod (#101566)
* Add FeatureGate PodHostIPs

* Add HostIPs field and update PodIPs field

* Types conversion

* Add dropDisabledStatusFields

* Add HostIPs for kubelet

* Add fuzzer for PodStatus

* Add status.hostIPs in ConvertDownwardAPIFieldLabel

* Add status.hostIPs in validEnvDownwardAPIFieldPathExpressions

* Downward API support for status.hostIPs

* Add DownwardAPI validation for status.hostIPs

* Add e2e to check that hostIPs works

* Add e2e to check that Downward API works

* Regenerate

Kubernetes-commit: 61b3c028ba618a939559c39befb546ae5e5fd0b9
2022-03-29 21:13:35 +00:00
Ricardo Katz
94a1081faf Implementation on Network Policy Status (#107963)
* Implement status subresource in NetworkPolicy

* add NetworkPolicyStatus generated files

* Fix comments in netpol status review

Kubernetes-commit: 42a12010829962c6e87cee8e4bc217d39d7a8043
2022-03-29 09:13:14 +00:00
Kubernetes Publisher
11ca265357 Merge pull request #108992 from alexzielenski/cache-busting-client-go
client-go: OpenAPI v3 support

Kubernetes-commit: 656dc213ce43f1ecfa7f54eb1f01864468f8f0e2
2022-03-29 05:12:59 +00:00
Alexander Zielenski
fa08fc21f5 adjust comments
Kubernetes-commit: e9fc6c28a202ded0228e8505f5e14f5ec2049a3d
2022-03-28 18:40:34 -07:00
Kubernetes Publisher
92adc4de69 Merge pull request #82162 from krmayankk/maxun
API: maxUnavailable for StatefulSet

Kubernetes-commit: f85ff4b5743d501381c76b94a5bc6197b7766190
2022-03-29 01:13:02 +00:00
Ross Peoples
400b1becd3 make update after timeZone support for CronJob
Kubernetes-commit: d26e6cca7255c2c96ba28e8e5550bbc87a7577b9
2022-03-28 14:59:03 -05:00
Alexander Zielenski
27f72fc0bc update vendor
client-go depends on more of kube-openapi v3 now

Kubernetes-commit: bb799d97066bbae4eaacd2ecc2a57f7fd42fa142
2022-03-28 10:07:56 -07:00
Alexander Zielenski
018cf8ace6 add fetching into discovery client for OpenAPI v3
reflect latest struct changes

use correct discovery openapi test data layout

make the OpenAPIv3 interface less blue

field grouping

add copyrights

implement cached discovery client

add cached discovery tests

address review feedback

Kubernetes-commit: 075866b3e3ea029c243d82d8d6eb99e96d9c49d3
2022-03-22 10:40:56 -07:00
Andrew Stoycos
f19a514ff5 Fix Panic Condition
Currenlty an event recorder can send an event to a
broadcaster that is already stopped, resulting
in a panic.  This ensures the broadcaster holds
a lock while it is shutting down and then forces
any senders to drop queued events following
broadcaster shutdown.

It also updates the Action, ActionOrDrop,  Watch,
and WatchWithPrefix functions to return an error
in the case where data is sent on the closed bradcaster
channel rather than panicing.

Lastly it updates unit tests to ensure the fix works correctly

fixes: https://github.com/kubernetes/kubernetes/issues/108518

Signed-off-by: Andrew Stoycos <astoycos@redhat.com>

Kubernetes-commit: 6aa779f4ed3d3acdad2f2bf17fb27e11e23aabe4
2022-02-11 14:50:19 -05:00
bells17
21f4308ca2 Fix typo: type -> eventtype
Kubernetes-commit: 53083ea6aa9817f130b15efaf8ccc2d0c59c4be3
2019-10-21 17:15:44 +09:00
Mayank Kumar
1a9591bb97 API: maxUnavailable for StatefulSet
Kubernetes-commit: 357203d992bb9b0cf9685f878d8635cf3277bef9
2019-08-30 00:05:18 -07:00
Kubernetes Publisher
402aa66c5c Merge pull request #108996 from cici37/errUpdate
Bump kube-openapi and update err handling

Kubernetes-commit: 898443f40583cd0fd864e9b11c8156faf64b680a
2022-03-27 01:12:39 +00:00
cici37
ef44f112db Bump kube-openapi
Kubernetes-commit: 383eb99bebdd5746732b7f6789907ea3598ee98e
2022-03-24 15:11:08 -07:00
Kubernetes Publisher
1933a66cdc Merge pull request #108505 from rikatz/kubectl-debug-not-showing-response
Reintroduce response status and header on kubectl verbose debug

Kubernetes-commit: bb3800f0225dcc025b9bb01f8525f99e5c36d5ce
2022-03-26 21:12:52 +00:00
Kubernetes Publisher
e0aaa37e5a Merge pull request #107180 from ardaguclu/remove-deprecated-serverresource
Remove deprecated discovery/ServerResources function

Kubernetes-commit: 0b79a791eda116199c40b13b21121274c56df374
2022-03-26 09:12:46 +00:00
Kubernetes Publisher
23ab4aec8e Merge pull request #108698 from tkashem/last-error
client-go: wrap previous error to provide more context to caller

Kubernetes-commit: 5af9afe201000ecc30251c3d9683016353b12e82
2022-03-26 01:12:38 +00:00
Kubernetes Publisher
ed2838156a Merge pull request #108531 from tallclair/redirects
Don't follow redirects with spdy

Kubernetes-commit: ea006f5246dded2db606dac7c642041cfbe1ccb1
2022-03-26 01:12:37 +00:00
Kubernetes Publisher
b307538aa1 Merge pull request #108159 from pohly/logcheck
logcheck update and golangci-lint integration

Kubernetes-commit: d60df5ba044fdb1cf20e4fc6d2ba45337d322052
2022-03-25 05:12:38 +00:00
Alex Zielenski
af0252eed9 Update kube-openapi (#108895)
* upgrade k8s.io/kube-openapi

* fix open-api v3 blank aggregator output

* use keys as API group

in ./hack/update-openapi-spec.sh

* fix import grouping

* update openapiv3 integration tests

Kubernetes-commit: 11b3a18cca745485e1033be8d62a1d0cde5a1d1d
2022-03-24 21:12:21 +00:00
Kubernetes Publisher
f4f092dbe0 Merge pull request #108981 from liggitt/skip-race
Temporarily disable TestCheckRetryClosesBody

Kubernetes-commit: 221b60fb82fc0a6de3034e342de99223a04585bb
2022-03-24 17:12:29 +00:00
Kubernetes Publisher
97bcbe7548 sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel Gopkg.toml */.gitattributes 2022-03-24 17:12:27 +00:00
Jordan Liggitt
83029168cc Temporarily disable TestCheckRetryClosesBody
Kubernetes-commit: 9c13a27d182c36296b7f2e381970b82c69d5c405
2022-03-24 10:11:06 -04:00
Kubernetes Publisher
cf06297a89 Merge pull request #108725 from pohly/klog-flush-and-exit
klog v2.60.1

Kubernetes-commit: 56f45c5c811ba23934915b1a1330d87c58bddf07
2022-03-24 09:12:44 +00:00
Kubernetes Publisher
d82e1fd884 Merge pull request #108717 from lavalamp/remove-clustername
Remove ClusterName

Kubernetes-commit: bb67b5e9e830fba239c1e7957e5dcbefdce92a37
2022-03-24 09:12:41 +00:00
Kubernetes Publisher
c012194d06 Merge pull request #108342 from tkashem/rate-limit-error
client-go: chain the error returned by rate limiter

Kubernetes-commit: 7dde0b4bb56d04240f75eff01034a2c5a7abab77
2022-03-24 01:21:59 +00:00
Kubernetes Publisher
a1a133ba90 Merge pull request #108445 from pohly/storage-capacity-ga
storage capacity GA

Kubernetes-commit: 24a71990e02edbfd0a05f4abfdedcab991525874
2022-03-23 17:07:24 +00:00
Kubernetes Publisher
c55e66b5a8 Merge pull request #108680 from kidlj/fix_cache_index_comments
make comments of `(c *threadSafeMap) updateIndices` optimization code more accurate

Kubernetes-commit: 29528a266a42bb34768db6944367946df5b0dcf6
2022-03-22 05:07:43 +00:00
Kubernetes Publisher
dedf7ce61c Merge pull request #108852 from mikedanese/auth-plugin-doc
add better link for gcp auth plugin doc

Kubernetes-commit: afb0136d6235201a89a426f071b8957a5a1b79ef
2022-03-21 14:20:44 -07:00
Mike Danese
f624f8e770 add better link for gcp auth plugin doc
Kubernetes-commit: 6a8579d1cd3ddeea6c012a4c0fdb7e32687a83f1
2022-03-21 09:48:27 -07:00
Kubernetes Publisher
3ac142e26b Merge pull request #108616 from margocrawf/delete-execcredential-v1alpha1
Remove v1alpha1 of the execcredential

Kubernetes-commit: b9817c801bcbf9efbea8da1a5b68c83b3ee4ace6
2022-03-19 17:14:34 +00:00
Kubernetes Publisher
c47b802895 Merge pull request #108772 from aojea/user_agent
client-go: default user agent if empty

Kubernetes-commit: b0c435c8c48587edaeade94937525e03ccff9167
2022-03-19 17:14:33 +00:00
Margo Crawford
70889063d2 Generated code for deleting exec credential v1alpha1 api
Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 38cbe6d7fe0f2536883485a1c36f345a4eafcc79
2022-03-18 10:16:58 -07:00
Margo Crawford
28b9e26d5f Remove v1alpha1 of the execcredential
Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 5b690b44d08807c6434a421b0041ef685482d337
2022-03-18 10:16:11 -07:00
Daniel Smith
a34beeba71 generated files
Kubernetes-commit: fad4ba2a34525c4831f89483e696509a88c45ce6
2022-03-17 18:27:49 +00:00
Daniel Smith
14e253c7f8 remove unneeded references
Kubernetes-commit: 2831f9a343ec405efce60d09da482a654971018e
2022-03-17 18:35:00 +00:00
Antonio Ojea
0f3c7919bf client-go: update generated
Kubernetes-commit: 1d5ad2264cbebe2ce33e288451c2757fa16a1956
2022-03-17 16:03:10 +01:00
Antonio Ojea
7390aacfeb default kubernetes agent for generated clients
Set default kubernetes agent if empty

Kubernetes-commit: c732bb8348b6ef4acc3ac7d006d56e6956141dd5
2022-03-17 13:19:43 +01:00
Kubernetes Publisher
6889a6b513 Merge pull request #108644 from Jefftree/googleapis-gnostic
googleapis/gnostic -> google/gnostic and update kube-openapi

Kubernetes-commit: b195a64d45e1880878a22d178055f1b4220dcb43
2022-03-17 02:24:26 +00:00
Patrick Ohly
2bba973d33 klog v2.60.1
The new release supports FlushAndExit and contextual logging.

Kubernetes-commit: 09aa1071cdde5ebc2c931c994fbb1e974c2a1515
2022-03-16 09:03:45 +01:00
Jefftree
186c332c7b googleapis/gnostic -> google/gnostic
Kubernetes-commit: 8a1d5947ad34ba275192341baa4e5fef8e6c7f24
2022-03-15 20:36:21 -07:00
Abu Kashem
7c9347d386 client-go: wrap error from previous attempt to provide more context
Kubernetes-commit: 868b5a31d382b325f49e1b831e6b094282d50cc7
2022-03-14 18:57:56 -04:00
Kubernetes Publisher
ab732f5dd6 Merge pull request #107674 from sanposhiho/api-min-domains
Add MinDomains API to TopologySpreadConstraints field

Kubernetes-commit: 5b52c4d12772c65ff5896f9268b4a4ca58a66995
2022-03-14 18:12:18 +00:00
Jian Li
6b59aa0b4a make comments of updateIndices optimization code more accurate
Kubernetes-commit: 0eae1f3addbd044793dac89f9e097e5f4c6fb2aa
2022-03-14 13:56:17 +08:00
Tim Allclair
8c38cf359a Don't follow redirects with spdy
Kubernetes-commit: e1069c64956a43f628d8ae2fcd9107959747c1c6
2022-03-04 16:08:58 -08:00
Ricardo Katz
9c049623c2 Reintroduce response status and header on kubectl verbose debug
Kubernetes-commit: 04b240ac0d16f0d5c8cc0c06ebd8ff1433ca8469
2022-03-04 11:39:53 -03:00
Patrick Ohly
6ece0de2d5 storage capacity: generated files
Kubernetes-commit: b1aefb9b90094ec4625ef2eefab7185fe4db9368
2022-03-02 07:43:19 +01:00
Abu Kashem
147848c452 client-go: chain the error returned by rate limiter
Kubernetes-commit: 6acbe7e6452a44057768c61909da2d5b7c878159
2022-02-24 17:28:01 -05:00
sanposhiho
b32b6a7d22 Add MinDomains API to TopologySpreadConstraints field
Kubernetes-commit: 3b13e9445a3bf86c94781c898f224e6690399178
2022-02-23 21:11:59 +09:00
Kubernetes Publisher
2f52a105e6 Merge pull request #107410 from margocrawf/master
Ensure static certs in kubeconfig override exec plugin

Kubernetes-commit: 19935de5a9a4196f23f9a90cd9b7acb79091e3c2
2022-03-08 22:11:44 +00:00
Kubernetes Publisher
0a04e978b0 Merge pull request #108426 from deads2k/e2e-check
add resource enablement check for e2e tests of beta APIs

Kubernetes-commit: f93be6584ea57d1d01a0ca1d2c5e96782713d311
2022-03-07 22:11:59 +00:00
Kubernetes Publisher
eb103e0abf Merge pull request #108347 from tkashem/refactor
client-go: refactor retry logic for backoff, rate limiter and metric to be reused by Watch, Stream, and Do

Kubernetes-commit: 52cd4d53ac8ac33cacd3d2c618cf22f1e3fd6a7e
2022-03-03 04:25:47 -08:00
David Eads
7d7fd497a0 add resource enablement check for e2e tests of beta APIs
Kubernetes-commit: 8ab8d05cc40c391f8ac650f50f23500666bfc943
2022-03-01 11:51:16 -05:00
Abu Kashem
34f3aff43e client-go: refactor retry logic for backoff, rate limiter and metric
Kubernetes-commit: cecc563d3b9a9438cd3e6ae1576baa0a36f2d843
2022-02-17 16:57:45 -05:00
Kubernetes Publisher
8e46da3fd1 Merge pull request #108296 from aojea/client_go_size_metrics
client-go: add request and response size metrics

Kubernetes-commit: 5ee80dee042d9b83a20031469606af0d2fb8d815
2022-03-01 02:06:30 +00:00
Patrick Ohly
9175c47d17 enhance and fix log calls
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:

- Logging a message only above a certain verbosity threshold without
  recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
  this matters when using a logging backend which records the verbosity
  level.

- Passing a format string with parameters to a logging function that
  doesn't do string formatting.

All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.

In some cases it reports false positives, but those can be suppressed with
source code comments.

Kubernetes-commit: edffc700a43e610f641907290a5152ca593bad79
2022-02-16 12:17:47 +01:00
Arda Güçlü
7e062f8fa4 Remove deprecated discovery/ServerResources function
ServerResources function was deprecated and instead ServerGroupsAndResources
function is suggested.

This PR removes ServerResources function and move every place to use ServerGroupsAndResources.

Kubernetes-commit: ef39a8914291ba200bd5486c88a7575ffd4b7d1d
2021-12-22 11:14:09 +03:00
Antonio Ojea
e2c62ff0c0 client-go: add request and response size metrics
Get metrics for the request and response  size, so we can correlate latency
and size on a request, otherwise we could get confused because we don't know if the
network is slow or just the request size huge.

Kubernetes-commit: 64d9d0585f6dbc9266f31b6d0f795d6c0421495e
2021-12-09 12:11:01 +01:00
Kubernetes Publisher
cc43a708a0 Merge pull request #108262 from tkashem/retry-unit-test
client-go: add unit test to verify order of calls with retry

Kubernetes-commit: 08d32851fec349175f1e7bb84e5690cad39ec5e1
2022-02-23 22:09:19 +00:00
Kubernetes Publisher
5463dac0a9 Merge pull request #106911 from aojea/client_go_metrics
Update client-go latency metrics bucket

Kubernetes-commit: 25ccc48c606f99d4d142093a84764fda9588ce1e
2022-02-23 22:09:18 +00:00
Abu Kashem
e4ecde2cf0 client-go: add unit test to verify order of calls
Kubernetes-commit: f6a66bbe051d2c7d537cf9033cc800babbb1a74b
2022-02-21 13:53:23 -05:00
Antonio Ojea
83bb1e3ff2 client-go: remove no longer used finalURLTemplate
The restclient metrics were updated to track only the host field of the
url, the finalURLTemplate is not longer needed, its only goal was to
replace name and namespace in the path to avoid cardinality.

Kubernetes-commit: bebf5a608f68523fc430a44f6db26b16022dc862
2022-02-17 16:51:55 +01:00
Kubernetes Publisher
41e0447e77 Merge pull request #107105 from justaugustus/go118
golang: Update to go1.18rc1

Kubernetes-commit: bda996e6a7cd115d76ebf1e0c127bee68e06269a
2022-02-21 18:05:47 +00:00
Stephen Augustus
dade88bed7 generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh
Also runs:
hack/pin-dependency.sh golang.org/x/mod \
  v0.6.0-dev.0.20220106191415-9b9b3d81d5e3

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 4b1bd548bbe4d71609c65b050b69f63af1ca81d1
2021-12-18 15:55:39 -05:00
Stephen Augustus
50aa9bbadb [go1.18] Bump golang.org/x/... dependencies
hack/pin-dependency.sh golang.org/x/crypto master
hack/pin-dependency.sh golang.org/x/net master
hack/pin-dependency.sh golang.org/x/oauth2 master
hack/pin-dependency.sh golang.org/x/sync master
hack/pin-dependency.sh golang.org/x/sys master
hack/pin-dependency.sh golang.org/x/term master
hack/pin-dependency.sh golang.org/x/time master
hack/pin-dependency.sh golang.org/x/tools master

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: e6e7a42480f235949a11e0f14a3b8a60ba43bcb0
2021-12-18 15:41:57 -05:00
Kubernetes Publisher
a7d2e01180 Merge pull request #107527 from wojtek-t/remove_selflink_ga
Graduate RemoveSelfLink to Stable

Kubernetes-commit: e42e2e877f01d28d886ebe5b855ff0f16ffca680
2022-02-15 06:05:21 +00:00
Wojciech Tyczyński
dd71ff2e39 Autogenerated
Kubernetes-commit: d63b79ec47171a1b83fea162e26f7ba521e3c20e
2022-01-19 17:55:39 +01:00
Kubernetes Publisher
b74c541cff Merge pull request #108059 from RaghavRoy145/k8s-utils-update
Vendor in k8s.io/utils Changes

Kubernetes-commit: 8bae9bea45de30cc8eb3a3da604abd01376ffbd8
2022-02-11 18:05:21 +00:00
Raghav Roy
6f7b0ae69e Updated k8s.io/utils dependency
Signed-off-by: Raghav Roy <raghavroy145@gmail.com>

Kubernetes-commit: e167d44a173991422b748afe1b9ed9a82bf6efa4
2022-02-11 13:03:54 +05:30
Kubernetes Publisher
6964e37acf Merge pull request #107834 from SataQiu/fix-applyconfiguration
code-generator: fix the bug that ApplyConfiguration constructor missing WithKind/WithAPIVersion methods

Kubernetes-commit: 20a2a4c1af861be8581d63284a68d2dd9454b484
2022-02-08 21:56:16 +00:00
Kubernetes Publisher
4c892f8a5d Merge pull request #107812 from diyi0926/add-field-path-back-to-event-logs
add fieldPath back to event logs

Kubernetes-commit: 834349ed1979073b4f6ed3e16393d31c19008701
2022-02-08 17:54:48 +00:00
Kubernetes Publisher
8f44946f6c Merge pull request #107876 from jlsong01/fix-concurrent-scheme-usage
Fix concurrent usage issue of the same scheme

Kubernetes-commit: cf9b5ab95a21e5b32b6aff72492a18ede37b785b
2022-02-02 09:20:21 -08:00
jlsong01
470c93d04c allocate a unique scheme for each test to fix concurrent usage issue
Kubernetes-commit: d66b3edd65efba0760eb0a5668aac733f294903b
2022-01-31 15:23:42 +08:00
Kubernetes Publisher
af150e1667 Merge pull request #107904 from sabbey37/update_azure_auth
Update azure auth plugin deprecation to warning

Kubernetes-commit: a4f559bfe10532bee534fefcaf4e6cc21c1e466c
2022-02-03 06:02:30 +00:00
sabbey37
f4bf7599b4 Update azure auth plugin deprecation to warning
Kubernetes-commit: c94b4bb2acd11bc0677eb867e6eff5b36bd205b4
2022-02-01 15:31:10 -05:00
SataQiu
1f90b31573 code-generator: fix the bug that ApplyConfiguration constructor missing WithKind/WithAPIVersion methods
Kubernetes-commit: ce50eed94122b780c8e438c3cb30a76fd2012464
2022-01-28 17:01:32 +08:00
Di Yi
5b56e4a504 resolve casing issue
Kubernetes-commit: 9996c154cba000346db940c90e234265d67dd8a9
2022-01-28 15:50:43 +08:00
Di Yi
93a63158d4 add fieldPath back to event logs
Kubernetes-commit: 94245af8f4a144e0aceb5a4be0d3ae4993e19be7
2022-01-27 14:28:26 +08:00
Kubernetes Publisher
7f04550960 Merge pull request #107507 from alexzielenski/client-preprocess-handler
Add configuration point to SharedInformer to transform objects before storing

Kubernetes-commit: f4046f9e6d0bb2fc4fa2d84af64cc9c6db44270a
2022-01-25 01:21:53 +00:00
Kubernetes Publisher
3255cdcd9c Merge pull request #105632 from xens/fix/kubectl-socks5-proxy2
Add SOCKS5 proxy support for kubectl exec

Kubernetes-commit: d10161b45b751df45701e343599476e27d533d58
2022-01-22 01:21:55 +00:00
Alexander Zielenski
54928eef9f modify SharedIndexInformer to use newInformer constructor which supports transformers
avoids code duplication, allows transformer to be used with SharedIndexInformer

Kubernetes-commit: 754bf3b3d02c66d1dd030460b03dddd3d6c7196d
2022-01-19 11:40:42 -08:00
Romain Aviolat
f157a09b37 feat: add missing SOCKS5 features
Goal of this commit is to add some missing features when the
Kubernetes API is accessed through a SOCKS5 proxy. That's for
example the case when port-forwarding is used (`kubectl port-forward`)
or when exec'ing inside a container (`kubectl exec`), with this
commit it'll now be possible to use both.

Signed-off-by: Romain Aviolat <romain.aviolat@kudelskisecurity.com>
Signed-off-by: Romain Jufer <romain.jufer@kudelskisecurity.com>

Kubernetes-commit: 0a98875e9572d998fbdf3bcdaef4961715b8bc06
2022-01-17 15:28:44 +01:00
Kubernetes Publisher
b70ee0aa9a Merge pull request #105142 from pacoxu/cespare-2.1.2
upgrade github.com/cespare/xxhash/v2 to v2.1.2

Kubernetes-commit: 8d0d428ddd1cdc5f7ec9ead400921fb697aced95
2022-01-21 01:22:16 +00:00
Kubernetes Publisher
909a4591e8 Merge pull request #107559 from liggitt/invalid-selectors
Handle invalid selectors properly

Kubernetes-commit: 184daed0dbb6b9adac82b7b8b58f5cee0935d152
2022-01-20 01:21:48 +00:00
-e
ae5b2b8fbf upgrade prometheus/client_golang to v1.12.0(common to v0.32.1)
Kubernetes-commit: 8a4e66049edd6ade4e9107b4ea092580b626545a
2022-01-19 22:30:33 +08:00
Ismayil Mirzali
664b1a6c8c client-go: refactor: Fix styling issues (#107248)
* client-go: Remove unreachable return

Due to the way the switch statement is done,
the return at the end of the function will neverbe reached.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>

* client-go: Refactor for clarity

Fixed one instance where the error message should be lowercase.
Made the fields in the struct literal more explicit

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>

Kubernetes-commit: 75c0987de3cb9a0380873745f68dea2f0835a7a2
2022-01-18 12:03:08 +02:00
Kubernetes Publisher
3618ec55f4 Merge pull request #107551 from wojtek-t/remove_unused_selflink_test_references
Remove unused selflink references in different testing-related files

Kubernetes-commit: a4931cc411002f2e992caadb8e128e807dc2d672
2022-01-15 01:21:43 +00:00
Kubernetes Publisher
092b54e6e5 Merge pull request #107565 from jiahuif-forks/deps/structured-merged-diff
upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.1

Kubernetes-commit: cf18d80d035780739575b8cc889e8f26bf36779f
2022-01-14 21:25:08 +00:00
Jiahui Feng
61ce20e08d generated: ./hack/update-vendor.sh
Kubernetes-commit: 31205dc7d9b271ede68ef90d09f416588ea3afdd
2022-01-14 10:31:44 -08:00
Jiahui Feng
3c9082ae5b upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.1
Kubernetes-commit: 821912a75198f0d516fc2744bed335afac8034e9
2022-01-14 10:30:23 -08:00
Jordan Liggitt
aab0bb899e Handle invalid selectors properly
Kubernetes-commit: c0af728f43025bb47b209ebbb45604f9c0424354
2022-01-14 11:41:07 -05:00
Kubernetes Publisher
07be351f6b Merge pull request #105387 from howardjohn/metadata-client/tracker
Make metadata fake client implement testing.FakeClient

Kubernetes-commit: 35c8975710e9cc50a0fc14383d1004dde86c854e
2022-01-14 05:25:34 +00:00
Kubernetes Publisher
23e2d9e87e Merge pull request #107293 from dims/jan-1-owners-cleanup
Cleanup OWNERS files - Jan 2021 Week 1

Kubernetes-commit: 3bd422dc76559c1e03e8aea894c6143d32ebd644
2022-01-13 21:21:38 +00:00
Wojciech Tyczyński
a806c6e4fd Remove selflink references in different testing-related files
Kubernetes-commit: 551790729f1d26d75c1d3fa1411e341eb367f9f3
2022-01-13 11:33:26 +01:00
Davanum Srinivas
3bf0eac274 OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9682b7248fb69733c2a0ee53618856e87b067f16
2022-01-03 10:59:47 -05:00
Kubernetes Publisher
b025abaeaa Merge pull request #107420 from 21kyu/fix-typos
fix typos in comment

Kubernetes-commit: ba82add41a06d1fceeaf01fc71d3d5da910c41d9
2022-01-10 09:20:52 +00:00
wq
3480737c9e fix typos in comment
Kubernetes-commit: 3e2932179084fa322ba1bc53997d44e1d383db00
2022-01-08 23:39:23 +09:00
Kubernetes Publisher
255c796513 Merge pull request #93709 from ash2k/ash2k/interruptible-sleep
Make RetryWatcher sleep interruptible

Kubernetes-commit: 04f2beea8abfb8ece2fb4fdd4e3ecc694caf2494
2022-01-05 17:20:55 +00:00
Kubernetes Publisher
6524542499 Merge pull request #106547 from astraw99/fix-log-typo
Fix log blank typo to avoid en/decode issues

Kubernetes-commit: 6d6ebfbe2473e405e6cf2607f38b1b72a38024cc
2022-01-05 09:20:46 +00:00
Kubernetes Publisher
8344b1c856 Merge pull request #107311 from fasaxc/fix-resource-ver-match
client-go: Clear the ResourceVersionMatch on paged list calls

Kubernetes-commit: b0f0aad2cedc1168bc44387e5a3d6d7745ae580b
2022-01-04 21:21:10 +00:00
Shaun Crampton
5754d8fddf client-go: Clear the ResourceVersionMatch on paged list calls
API server rejects continuations with ResourceVersionMatch set.

Kubernetes-commit: 8ac5e9b065cd9aef1543080cce1cf99cc8bb4ce9
2022-01-04 16:05:32 +00:00
Kubernetes Publisher
782ff783b6 Merge pull request #107103 from pohly/log-klog-update
dependencies: update klog to v2.40.1

Kubernetes-commit: 38ec822b46853acfb3c3dc7e386a8d4636c67e03
2021-12-22 01:20:41 +00:00
Arda Güçlü
a6257fdee4 Enable setting proxyurl in kubeconfig via kubectl config (#105566)
* Enable setting proxyurl in kubeconfig via kubectl config

This PR enables setting `proxy-url` in kubeconfig via kubectl config.

* Add godoc for proxy-url unit tests

Kubernetes-commit: afdde383210294c3da573decc44b5ce55cffcb94
2021-12-20 21:21:02 +00:00
Patrick Ohly
416ac20107 dependencies: update klog to v2.40.1
The new release adds support for multi-line string output (required for
contextual logging) and Verbose.InfoSDepth (required to properly attach
verbosity to some log messages in helper code).

Kubernetes-commit: cb17b76d4d0a1c8021b427cd15b5d504bb468ee6
2021-12-17 14:23:59 +01:00
Kubernetes Publisher
d7ed9408c8 Merge pull request #106436 from dims/cleanup-owners-files-no-activity-in-a-year
Cleanup OWNERS files (No Activity in the last year)

Kubernetes-commit: 1426587e0874cbbddee4dc6a13bb5213b0a7609b
2021-12-15 21:27:35 +00:00
Kubernetes Publisher
6096096391 Merge pull request #106934 from spencer-p/spencer-master
Document when workqueue metrics are dropped

Kubernetes-commit: a88462e901710ab5df1fa6e99a046aa921dcdd55
2021-12-15 01:20:40 +00:00
Kubernetes Publisher
056a9de353 Merge pull request #106568 from liggitt/json-fieldpath
include field paths in unknown/duplicate errors

Kubernetes-commit: 66ca4b0a70a3d43c45603ba441b2a368dcb38722
2021-12-13 17:19:58 +00:00
Jordan Liggitt
df7985199b bump sigs.k8s.io/json
Kubernetes-commit: 0c5ed62c792826a547dd5a55639de150080c355b
2021-12-13 09:38:11 -05:00
Davanum Srinivas
73f2731e23 Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 497e9c1971c9e7d0193bc6d11503ec4ad527f1d5
2021-12-10 15:18:50 -05:00
Kubernetes Publisher
80a3c86bdd Merge pull request #106949 from cpanato/update-golang-xnet
dependencies: Update golang.org/x/net to v0.0.0-20211209124913-491a49abca63

Kubernetes-commit: b0eb3e1ec2d4268604d9a2c3403f0580a3bda2ec
2021-12-10 17:24:25 +00:00
Kubernetes Publisher
6919fc571d Merge pull request #106458 from dims/lint-yaml-in-owners-files
Lint/Beautify yaml in OWNERS files

Kubernetes-commit: 1d66302c42eb2ecf53b29cafb0c9f751bfbd1cd3
2021-12-10 17:24:22 +00:00
Carlos Panato
b63089930a dependencies: Update golang.org/x/net to v0.0.0-20211209124913-491a49abca63
Signed-off-by: Carlos Panato <ctadeu@gmail.com>

Kubernetes-commit: 37dda91186924fc29acc16c1c0743ed747cf6d6c
2021-12-10 12:54:55 +01:00
Kubernetes Publisher
b945f6e77e Merge pull request #106921 from dims/update-x/tools-to-v0.1.8
Update golang.org/x/tools to a specific tag (v0.1.8) and avoid SHA

Kubernetes-commit: cc6f12583f2b611e9469a6b2e0247f028aae246b
2021-12-10 09:31:31 +00:00
Davanum Srinivas
70f09c4943 Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9405e9b55ebcd461f161859a698b949ea3bde31d
2021-12-09 21:31:26 -05:00
Spencer Peterson
5a537879c2 Document when workqueue metrics are dropped
Two simple choices for workqueues do not document that they do not emit
metrics. Using their named variants fixes this, but was undocumented.

Change-Id: I100ad08a4859513987941ed35d12abb4cbb39873

Kubernetes-commit: f468bee672b0ccf9b97a85f17ec1f5645aced926
2021-12-09 16:59:54 -08:00
Kubernetes Publisher
096f1fdd87 Merge pull request #106852 from wojtek-t/remove_legacy_leader_election
Remove support for Endpoints and ConfigMaps lock from leader election

Kubernetes-commit: 12b4bef7bd7ccd6cecd01d3b0b5b8fd31dba9535
2021-12-09 21:10:38 +00:00
Davanum Srinivas
464c8e2c41 Update golang.org/x/tools to a specific tag and avoid SHA
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 627c50661e988ad8ac0708b1d94fdfc385e88449
2021-12-09 14:20:03 -05:00
Kubernetes Publisher
cbd965eeb4 Merge pull request #106850 from MadhavJivrajani/deprecate-clock-pkg
Deprecate types in k8s.io/apimachinery/util/clock

Kubernetes-commit: c16b2afc1d3c32462f068ea08cdc4791bd97b947
2021-12-09 17:09:23 +00:00
Madhav Jivrajani
110639035d Bump k8s.io/utils
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 4ca13e6f0ee3ee66d863203cb2d042842dc88cd7
2021-12-09 16:16:27 +05:30
Kubernetes Publisher
8bffd27f0a Merge pull request #106473 from Dingshujie/fix_inotify_memory_leak
update k/utils to v0.0.0-20211116205334-6203023598ed to fix inotify memory leak

Kubernetes-commit: a8e06cf2bfd2ecdde0f2f49af4df29f70e07f20e
2021-12-09 05:10:34 +00:00
Kubernetes Publisher
c713f38723 Merge pull request #106153 from hyschumi/refactor_thread_safe_store
refactor: remove dup code

Kubernetes-commit: e9fc46750f6da84d9434a8066d7d2ba1531c5d67
2021-12-08 05:04:35 +00:00
Margo Crawford
2b59dabd4c Check whether static cert is already configured in UpdateTransportConfig
- Also update test-cmd.sh to pass a signing ca to the kube controller
  manager, so CSRs work properly in integration tests.

Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: f015fd66ce95d02cd66efc263eb9e5441b42a17d
2021-12-07 15:58:46 -08:00
Wojciech Tyczyński
276ea3ed97 Remove support for Endpoints and ConfigMaps lock from leader election
Kubernetes-commit: 29d9683cd0fb3cc81810a8b39715e5eb4c68b00e
2021-12-07 16:38:32 +01:00
Kubernetes Publisher
d85d0d914a Merge pull request #106774 from SergeyKanzhelev/grpcFieldRename
Grpc field rename

Kubernetes-commit: 0fe049cb93683e488b9829316ac889bc4c2e42fc
2021-12-03 09:07:26 +00:00
Sergey Kanzhelev
2f5ae78650 generated files for the grpc field rename
Kubernetes-commit: 4c9d77d724069ec56140b686d3e8e280f5ab0274
2021-12-01 18:25:37 +00:00
Kubernetes Publisher
91177d7e4d Merge pull request #106716 from aojea/http1_flake_timeout
bump TestHTTP1DoNotReuseRequestAfterTimeout timeout

Kubernetes-commit: c1153d3353bd4f4b68d85245d53d2745586be474
2021-11-29 13:23:22 -08:00
Antonio Ojea
115ee0e475 bump TestHTTP1DoNotReuseRequestAfterTimeout timeout
the test TestHTTP1DoNotReuseRequestAfterTimeout has to wait for
request to time out to assert that subsequent requests does not
reuse the TCP connection.

It seems that current value of 100ms causes issues on some CI
environments and bumping the timeout seems to solve this flakiness,

We can bump the timeout value because is really low compared to real
scenarios and the bump still keeps it in the millisecond order.

Kubernetes-commit: 85797eba7075d83b116b5c91ff3b17c2d5118d01
2021-11-29 15:37:31 +01:00
Kubernetes Publisher
1218545a5b Merge pull request #106660 from liggitt/smd-merge
Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2

Kubernetes-commit: aff056d8a197f6a404ad5e02210ca662d16c3dbe
2021-12-03 09:07:23 +00:00
DingShujie
c8a8ad54a6 update k/utils to v0.0.0-20211116205334-6203023598ed
Kubernetes-commit: 25cf49770c8a91a837aa7e791eb2b177305d9610
2021-11-25 09:29:03 +08:00
Jordan Liggitt
38ad836227 Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2
Kubernetes-commit: ed68909177eca588731bc153d2f69dd235e8fe10
2021-11-24 10:32:24 -05:00
Kubernetes Publisher
0e6a989bc4 Merge pull request #99728 from mattcary/control
StatefulSet PVC auto-delete implementation

Kubernetes-commit: b8af116327cd5d8e5411cbac04e7d4d11d22485d
2021-12-03 09:07:22 +00:00
astraw99
a8ff96d887 fix log typo
Kubernetes-commit: abce7ab534d0c667dd1438ff24bb3130d17d3f6e
2021-11-19 11:06:14 +08:00
hyschumi
547d6c809a refactor: remove dup code
Signed-off-by: hyschumi<msliudongsheng@gmail.com>

Kubernetes-commit: da5d0a72d9d2a0948e21b746a8c6951dc40c0ce9
2021-11-04 21:11:53 +08:00
John Howard
f582d43dbd Make metadata fake client implement testing.FakeClient
This mirrors most (maybe all?) other fake clients. Example of a real
world use case this would have been useful:
https://github.com/istio/istio/pull/35434

Kubernetes-commit: 86c9fef160b37ce834b680e49cf237917d2e5c6c
2021-09-30 16:32:23 -07:00
Mikhail Mazurskiy
7a08020ed2 Make sleep interruptible
Kubernetes-commit: b705a521d8814b38faabea218097cac65d6ab5c5
2021-08-21 12:20:30 +10:00
Matthew Cary
b4c5f2944a tests for statefulset PersistentVolumeClaimDeletePolicy api change
Kubernetes-commit: f1d5d4df5a786a3387e1f39f59941f2c6fb4299d
2021-03-01 16:10:16 -08:00
Sergey Kanzhelev
f1d7f5c8cd Merge pull request #106463 from SergeyKanzhelev/grpcProbe
Implement grpc probe action

Kubernetes-commit: e4952f32b79b69bfa9333ff9da26a2da13859148
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-02 20:41:52 -05:00
Kubernetes Publisher
ad95a77727 Merge pull request #106660 from liggitt/smd-merge
Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2

Kubernetes-commit: aff056d8a197f6a404ad5e02210ca662d16c3dbe
2021-11-24 23:25:22 +00:00
Jordan Liggitt
a1540622fe Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2
Kubernetes-commit: ed68909177eca588731bc153d2f69dd235e8fe10
2021-11-24 10:32:24 -05:00
Kubernetes Publisher
10e087ca39 Merge pull request #99728 from mattcary/control
StatefulSet PVC auto-delete implementation

Kubernetes-commit: b8af116327cd5d8e5411cbac04e7d4d11d22485d
2021-11-18 15:25:16 +00:00
Matthew Cary
475f2c775f tests for statefulset PersistentVolumeClaimDeletePolicy api change
Kubernetes-commit: f1d5d4df5a786a3387e1f39f59941f2c6fb4299d
2021-03-01 16:10:16 -08:00
Kubernetes Publisher
2a70348ebb sync: update go.mod 2021-11-17 23:36:44 +00:00
Kubernetes Publisher
51a4fd4aee Merge pull request #106448 from aojea/hlee/issue-103721/staticcheck
use golangci-lint

Kubernetes-commit: 1367cca8fd67b09606b01c0a9e46cef59aef3424
2021-11-17 19:25:29 +00:00
Kubernetes Publisher
cc8a98c5db Merge pull request #103526 from brianpursley/kubectl-686
Close connection and stop listening when port forwarding errors occur so that kubectl can exit

Kubernetes-commit: cd6ffff85d257ff9067d59339f2ffdbcc66dc164
2021-11-17 19:25:27 +00:00
Kubernetes Publisher
3f38fd30fc Merge pull request #105623 from ash2k/ash2k/resettable-rest-mapper
ResettableRESTMapper to make it possible to reset wrapped mappers

Kubernetes-commit: 165b581759794157b4f4b8d7dfe2501d0e965ff4
2021-11-17 03:24:57 +00:00
Kubernetes Publisher
e2c9d634d6 Merge pull request #105057 from jiahuif-forks/feature/enum-types-feature-enablement
Add Support for OpenAPIEnum in OpenAPI v2

Kubernetes-commit: e14bdbaa1c4ed2b31dbce1b03160402483d26889
2021-11-17 03:24:55 +00:00
brianpursley
f5d063cf7a close streamConn and stop listening when an error occurs while port forwarding
Kubernetes-commit: 4a35e6c5641ee36291548c9c24b5b85663d5cd07
2021-11-16 21:05:43 -05:00
Kubernetes Publisher
d9ceca5871 Merge pull request #106154 from gnufied/recover-expansion-failure-123
Recover expansion failure

Kubernetes-commit: f151a40d8d8ac92b0b49fbdf3a9d3a1f8b3282bb
2021-11-16 23:25:31 +00:00
Antonio Ojea
34c99305b5 remove unused fakeUpgradeConnection
Kubernetes-commit: bf9ce7fd76068903e909358d2b25b05da7e4a431
2021-11-16 22:54:18 +01:00
Kubernetes Publisher
28b1932f62 Merge pull request #104844 from aojea/clientgo_close_idle
CloseIdleConnections of wrapped Transport RoundTrippers

Kubernetes-commit: 45f77ca4bab08da88bdda267be2157dc10bc64ac
2021-11-16 19:25:14 +00:00
Antonio Ojea
d62dc4e20e no lint unused variables
Kubernetes-commit: 0019f986130fdd8ca17c6e5511b15168d9181b1e
2021-11-16 19:00:31 +01:00
Antonio Ojea
2e69bf9be0 fix unassigned error on client-go test
Kubernetes-commit: 01a0fba3620c433f49120d82f908069281482a17
2021-11-16 16:58:52 +01:00
Antonio Ojea
5b8ad0da8e migrate nolint coments to golangci-lint
Kubernetes-commit: d126b1483840b5ea7c0891d3e7a693bd50fae7f8
2021-11-16 16:57:58 +01:00
Jiahui (Jared) Feng
0ed96f33a9 generated: ./hack/update-vendor.sh
Kubernetes-commit: 73ffb492032896c1c87edfa1d85de5fc74bb526c
2021-11-15 15:54:59 -08:00
Kubernetes Publisher
2f764f976b Merge pull request #106399 from justinsb/populate_event_typemetad
leaderelection: populate the apiVersion/kind when reporting events

Kubernetes-commit: ed3d9f7b48290d26ea617b2af40188e397987ac6
2021-11-15 09:05:00 -08:00
Justin SB
ecfd45a4d9 leaderelection: populate the apiVersion/kind when reporting events
This avoids the assumption that the kinds are populated in the schema,
and is arguably a little more efficient also.

Kubernetes-commit: 3bf06ff3a15a2f1fefeb7a70373a92cb4b94818f
2021-11-13 11:14:02 -05:00
Hemant Kumar
c643e47235 Implement API changes necessary for recovery from resize failure
Kubernetes-commit: 63fffd37b1f39a661d00b5ed11097c616850a80d
2021-11-12 11:00:57 -05:00
Kubernetes Publisher
e627be7959 Merge pull request #106234 from jpbetz/cel-libs
Add wired off code for Validation rules for Custom Resource Definitions using the CEL expression language

Kubernetes-commit: 6b41d75794381487ef7204b016faa75e350a32b7
2021-11-11 07:32:27 +00:00
Joe Betz
8d0429e649 Pin new dependency: github.com/google/cel-go v0.9.0
Kubernetes-commit: d73403dc12ad1d9576d65b5c65e30a87d17ad314
2021-11-01 14:08:09 -04:00
Kubernetes Publisher
843baa6c33 Merge pull request #106240 from tkashem/client-retry
client-go: add jitter to flowcontrol.Backoff

Kubernetes-commit: 5a81905f772c28dc4c8f5d2cb2e5bfc48c422f41
2021-11-10 15:27:04 +00:00
Kubernetes Publisher
0f292167c6 Merge pull request #106181 from ulucinar/aru/consume-kube-openapi
Bump k8s.io/kube-openapi to commit ee342a809c29

Kubernetes-commit: f59b0a56c6ebc1a1891435ba5b094b9afe8c1c3c
2021-11-10 11:26:29 +00:00
Kubernetes Publisher
5d42009b66 Merge pull request #102534 from wangyysde/create-hpav2stable
Create HPA v2 Stable API

Kubernetes-commit: 8e02b788737aec63629e9c9329b064ab96826016
2021-11-09 20:48:05 +00:00
Abu Kashem
4b3bec4f5d client-go: add jitter to flowcontrol.Backoff
Kubernetes-commit: ec93e854ca0924b7f984641b0bbdefc12b269f2b
2021-11-08 19:30:03 -05:00
Alper Rifat Ulucinar
50900ef0b5 Bump k8s.io/kube-openapi to commit ee342a809c29
Updates to consume the aggregated OpenAPI spec lazy-marshaling behaviour
introduced with: https://github.com/kubernetes/kube-openapi/pull/251

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>

Kubernetes-commit: 38f888bdd14b8eddb86ec8ca8461267fe7f8ded1
2021-11-05 14:10:09 +03:00
Mikhail Mazurskiy
c5a1393028 ResettableRESTMapper to make it possible to reset wrapped mappers
Kubernetes-commit: de4598d0db5e2babe89dd334407b2ba8024ec9a1
2021-10-13 16:15:24 +11:00
Antonio Ojea
f34af1a39f CloseIdleConnections for wrapped Transport
It iterates over the wrapped transports until it finds one
that implements the CloseIdleConnections method and executes it.

add test for closeidle http1 connections

add test for http1.1 reconnect with inflight request

add test to reuse connection request

add test for request connect after timeout

add test for client-go request concurrency

Kubernetes-commit: b9d865a8185b62d83e9ff81b0e3499a26ac6960d
2021-09-10 15:27:23 +02:00
wangyysde
607f5b2679 rename v2beta2 to v2
Signed-off-by: wangyysde <net_use@bzhy.com>

Generation swagger.json.

Use v2 path for hpa_cpu_field.

run update-codegen.sh

Signed-off-by: wangyysde <net_use@bzhy.com>

Kubernetes-commit: d2abddd9096e30a6c47c72e3e43a033e99c1c149
2021-07-06 16:02:42 +08:00
Kubernetes Publisher
6d69eb8ad6 Merge pull request #105794 from margocrawf/master
--as-uid flag in kubectl and kubeconfigs.

Kubernetes-commit: c9baa14d708415225ed030e520970b3e1b6e4349
2021-11-08 16:39:18 +00:00
Kubernetes Publisher
9b0b23a8ad Merge pull request #106177 from aojea/RoundTripperWrapper
client-go token source transport implement RoundTripperWrapper interface

Kubernetes-commit: d2aa5fc100cc7499a5d80badd1366afb8d0ad63b
2021-11-05 16:42:25 +00:00
Antonio Ojea
06eaec4d00 assert RoundTripperWrapper interface
Kubernetes-commit: 938cc5445dc6e8b723542036e97e1d2023bb3002
2021-11-05 14:53:22 +01:00
Antonio Ojea
26d331c399 client-go token source transport implement RoundTripperWrapper interface
Kubernetes-commit: ef190f860a90df36b415e16f0de16bfeedc17d21
2021-11-05 12:22:23 +01:00
Kubernetes Publisher
6d49694c44 Merge pull request #105983 from jiahuif-forks/dep/bump-smd
Upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.0

Kubernetes-commit: 8e2d7a3d64976eb23e1a4fdc8c068f5210014da6
2021-11-04 00:38:36 +00:00
Kubernetes Publisher
980663e185 Merge pull request #105819 from tosi3k/client-go-traces
Add more info to the ListAndWatch trace

Kubernetes-commit: 63c4a22ae9ebb616c564ee5b9e314c5f30e3cfe2
2021-11-03 20:38:47 +00:00
Kubernetes Publisher
e57f40404f Merge pull request #102945 from chenchun/fake
Pass DeleteOptions down to the Reactor

Kubernetes-commit: 9be67806cdecc18a07750eacd796f7885644def1
2021-11-02 16:39:07 +00:00
Jiahui Feng
871103e613 generated: ./hack/update-vendor.sh
Kubernetes-commit: a4f6152743af5201fdbb48bda6730797d3c8f572
2021-11-01 10:00:00 -07:00
Kubernetes Publisher
2f5d8b0c52 Merge pull request #106014 from enj/enj/i/unwrap_exec
client-go exec: make sure round tripper can be unwrapped

Kubernetes-commit: 934f96d07d908f9964d672b17e9740f9d90c46cc
2021-10-29 21:56:15 -07:00
Monis Khan
d92ef13286 client-go exec: make sure round tripper can be unwrapped
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 249aefebe340ce4de4a67446c8b6b43c2121044e
2021-10-29 17:59:52 -04:00
Tim Hockin
fd0a0345b3 De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts

Kubernetes-commit: 11a25bfeb6fd6e8e5c42e316b17cea15a702041c
2021-10-29 20:37:55 +00:00
Kubernetes Publisher
5be956ba48 Merge pull request #104693 from ravisantoshgudimetla/add-podOS-field
Add pod os field

Kubernetes-commit: bb24c265ce725c90f0e82b01e7c1ccbffb695d14
2021-10-29 08:39:53 +00:00
Chun Chen
dd4008cc8e Auto generated
Kubernetes-commit: 888c049df636712baadd46ead20194c437d3b6e6
2021-10-28 20:10:49 +08:00
Antoni Zawodny
9af7db3c25 Add more info to the ListAndWatch trace
Kubernetes-commit: 093aa210be67f45efb1005f273d8d68444156473
2021-10-21 14:33:57 +02:00
Margo Crawford
5fca705b7d --as-uid flag in kubectl and kubeconfigs.
This corresponds to previous work to allow impersonating UIDs:
* Introduce Impersonate-UID header: #99961
* Add UID to client-go impersonation config #104483

Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 7e079f5144474cae05802771f604df2b748d781f
2021-10-19 16:12:31 -07:00
ravisantoshgudimetla
c64db8cfcf generated: Add os field to Pod Spec
Kubernetes-commit: 41f8f95fc5dee7613673dc6edd98a85c2c1d4c18
2021-10-14 23:45:20 -04:00
Kubernetes Publisher
c151c2c688 Merge pull request #104915 from alculquicondor/job-ready
Track ready pods in Job status

Kubernetes-commit: 6edcb60d9f854903d341dc5155a78ff8221ad64e
2021-10-28 16:38:48 +00:00
Kubernetes Publisher
651ddcb5a2 Merge pull request #105896 from zqzten/upgrade-json-patch
upgrade json-patch to v4.12.0

Kubernetes-commit: 18cb34ebb2b64a7607057c7dea80427e2af387f3
2021-10-27 00:38:26 +00:00
Zach Zhu
1e6b5d960d upgrade github.com/evanphx/json-patch to v4.12.0
Fix partial negative indice support in json patch

Kubernetes-commit: 20cc72344e653ab90c1a851816bb206b715fd231
2021-10-26 11:20:45 +08:00
Kubernetes Publisher
56656ba0e0 Merge pull request #104877 from pohly/json-kobj
component-base: test and fix JSON output for KObj

Kubernetes-commit: a5cd438b9fbf49e013453f4d6c9b2e935a78071c
2021-10-22 20:38:33 +00:00
Patrick Ohly
816febed68 klog 2.30.0, logr 1.2.0, zapr 1.2.0
The new releases fix logging of KObj in JSON output: klog implements the new
logr.Marshaler interface and zapr uses it instead of Stringer when logging the
ObjectRef created by KObj.

Kubernetes-commit: 169e8b65a00b45ef8bbc7a14cd985df1c835953b
2021-10-22 15:13:47 +02:00
Kubernetes Publisher
d8ccb0e454 Merge pull request #105030 from liggitt/json-stdlib
switch from json-iterator to forked stdlib json decoder

Kubernetes-commit: cc25656b00baa33168b7a9bc574101a06788efea
2021-10-22 04:36:23 +00:00
Kubernetes Publisher
4154d814be Merge pull request #105490 from aojea/restclient-shared-transport
client-go: share the same transport for generated clientsets

Kubernetes-commit: 881980a5c67b7636fd983c481b2648bc4e00c242
2021-10-20 20:37:03 +00:00
Kubernetes Publisher
88713b741f Merge pull request #105405 from verb/1.23-ec-beta
Promote EphemeralContainers to beta

Kubernetes-commit: 18104ecf1f57362ae6b33f01ce6413d7fec4f715
2021-10-20 16:37:34 +00:00
Antonio Ojea
4d53a8ddbb updated generated
Kubernetes-commit: 032d0d6ea944d0e1845cbdbd9b72ded017deaaed
2021-10-20 06:30:30 +02:00
Antonio Ojea
30025c3fbc expose NewForConfigAndClient for the metadata client
Kubernetes-commit: 909a1738fdf7b33513a1409860289a3d38d77267
2021-10-19 16:00:53 +02:00
Antonio Ojea
12956a0d53 expose NewForConfigAndClient for the dynamic client
Kubernetes-commit: b584195e5cc0a1094318ba886a9aecd2f675d59c
2021-10-19 15:58:58 +02:00
Antonio Ojea
bb294ffaf0 NewDiscoveryClientForConfigAndClient constructor
Kubernetes-commit: f519ab25ab0e7dd8eb4fd72da53daecb9e48211e
2021-10-09 00:21:38 +02:00
Antonio Ojea
fd09dceb88 RESTClient contructors for config and http client
Add two new constructors for versioned and unversioned RESTClients.

These new constructors allow to pass an http.Client to the RESTClient,
taking precence over the transport Config parameters.

Add a new helper function to generate an http.Client from the RESTClient
Config object.

Co-authored-by: Jordan Liggitt <liggitt@google.com>

Kubernetes-commit: 80fbc817263de1c46e1493819aca35b1ef8e3d09
2021-10-09 00:17:04 +02:00
Lee Verberne
7159ac8cf1 Generated code for EphemeralContainers beta
Kubernetes-commit: b34e710972969a388e4691bb67be0a2e4d34676f
2021-10-01 17:48:21 +02:00
Kubernetes Publisher
fa4ee2502f Merge pull request #104327 from sxllwx/fix/dynamic-client
set the content-type Header when the dynamic client sends the request

Kubernetes-commit: a78e3133a0d0401fa592ae1c4a1daf4e30e2efdf
2021-10-18 12:36:48 +00:00
Kubernetes Publisher
7697067af7 Merge pull request #105603 from shawnhanx/eventstructuredlogging
Support SetStructuredLogging with the new events library

Kubernetes-commit: 668c666fce30e648b08f3607d299e36ca8ecb94e
2021-10-11 16:38:15 +00:00
shawnhanx
93595145a2 Support SetStructuredLogging with the new events library
Kubernetes-commit: 230cb00ddd989ae2359696f6aa09a71253936a49
2021-10-11 16:16:46 +08:00
Kubernetes Publisher
3511ef41b1 Merge pull request #105156 from aojea/clientgo_trace
Enhance client-go url timing logging with http statistics

Kubernetes-commit: b7da9ef49f82ac8b54d28931a5b3e1de30accfd3
2021-10-05 16:37:11 +00:00
Kubernetes Publisher
1cbb8e6f55 Merge pull request #105312 from Karthik-K-N/fix-reatelimite-testfail
Fix for TestWithMaxWaitRateLimiter test case failure

Kubernetes-commit: 9fdcc4b1999c273d7e156880df646ac905b8adf0
2021-10-05 00:36:54 +00:00
Kubernetes Publisher
f71d2554c3 Merge pull request #104653 from astraw99/fix-word-comment
Fix word most `comment` to `common` and typo

Kubernetes-commit: ca08978c2d809d77ad746401bad9710052252fe7
2021-10-01 16:36:50 +00:00
Kubernetes Publisher
dbfa30b9d9 Merge pull request #105372 from MadhavJivrajani/vendor-clock-utils
Vendor in k8s.io/utils

Kubernetes-commit: eebeff9f7e0fccf1d220ce809eaea7f7f9248ce0
2021-10-01 00:37:00 +00:00
Madhav Jivrajani
235fd365ab run hack/{pind-dependency.sh, update-vendor.sh}
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: a43fca76ea7ff6fb08153c9081f7858cd4d06dd8
2021-09-30 19:15:35 +05:30
Kubernetes Publisher
b3f71e47c4 Merge pull request #105330 from liggitt/importboss-doc
Make package paths referenced by import boss valid

Kubernetes-commit: d551560a78292e1d4cac1de2ae684c803ddea183
2021-09-30 00:36:35 +00:00
Kubernetes Publisher
fe0e5b13da Merge pull request #103900 from ash2k/ash2k/cache-mapper-and-client
Cache rest mapper and discovery client

Kubernetes-commit: fafbe3aa51473a70980e04ae19f7db2d32d7365b
2021-09-29 12:36:03 +00:00
Kubernetes Publisher
6d070ad4a8 Merge pull request #105315 from wzshiming/test/events-expansion
Add unit test coverage for events expansion

Kubernetes-commit: c9b9c401092209767bde7d831fe8a3a771ea6a29
2021-09-29 08:36:29 +00:00
Kubernetes Publisher
9bea344c4a Merge pull request #104300 from wojtek-t/converting_informer
Create TransformingInformer

Kubernetes-commit: 66e1d27a59208f3f90016e0790a13e2602fecdeb
2021-09-29 00:36:47 +00:00
Kubernetes Publisher
f1b4ce1ec0 Merge pull request #105234 from wojtek-t/optimize_indexer
Optimize indexer

Kubernetes-commit: 3b2b23cee707f3407b997db412547f692db59870
2021-09-28 20:36:18 +00:00
Jordan Liggitt
93c09c3155 Make package paths referenced by import boss valid
Kubernetes-commit: f6b831aeaca2ff1481074e05c6771050f2b40516
2021-09-28 13:06:39 -04:00
Shiming Zhang
a0628957da Add unit test coverage for events expansion
Kubernetes-commit: 13fe94f136a15dd45b75262517a36b14d1e094a9
2021-09-28 18:07:34 +08:00
Shiming Zhang
439294e1c4 Update comments
Kubernetes-commit: f63c135e1fe5c443eae47f6b7f1d04cb0ba2a71a
2021-09-28 16:23:52 +08:00
Karthik K N
881e30ae78 Changes to fix the flake test case in ratelimiter
Kubernetes-commit: 7134657304a6d5b3a62c51cad82af6ca703d40c4
2021-09-28 12:23:27 +05:30
Kubernetes Publisher
b7ec70cb33 Merge pull request #104507 from wzshiming/fix/match
Check namespaces match in UpdateWithEventNamespace

Kubernetes-commit: 04f3d19bea10072b6d01e0c1306735f1e30f3ea0
2021-09-27 19:43:20 +00:00
Kubernetes Publisher
372575c38a Merge pull request #104483 from margocrawf/master
Add UID to client-go impersonation config

Kubernetes-commit: 48d844ec64bd83a378418d420ba455fa28043cbc
2021-09-27 15:43:34 +00:00
wojtekt
e61d0d5d52 Optimize index updating
Kubernetes-commit: 75273a0689250f4861ea41405e6402c6191563a8
2021-09-24 15:24:01 +02:00
wojtekt
463b3d12bb Optimize indexer
Kubernetes-commit: 27c94a49c80202790e195dde3a258cc62110c1e5
2021-09-24 14:46:56 +02:00
wojtekt
c702a411d1 Create TransformingIndexerInformer
Kubernetes-commit: 56ffb4e2b056622210bbf5ce845cf63ca18e85ce
2021-09-23 09:09:59 +02:00
Kubernetes Publisher
7cbd2d5c7a Merge pull request #105162 from MadhavJivrajani/migrate-clock-pkg
migrate k8s.io/apimachinery/util/clock -> k8s.io/utils/clock

Kubernetes-commit: bf77f8ff4354bea48bb41d7724428df84734d97b
2021-09-21 08:44:24 -07:00
Madhav Jivrajani
721036c908 migrate k8s.io/apimachinery/util/clock -> k8s.io/utils/clock
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: fed2ec99c652550ed4a8c00b7cfc6c93abbc4ade
2021-09-21 15:53:43 +05:30
Antonio Ojea
3a10028e85 client-go httpstats
enhance client-go DebugURLTiming roundtripper using golang httptrace
to provide timing statistics for:
- dns lookup
- tcp dialing
- tls handshake
- time to get a connection from the pool
- time to process a request

Kubernetes-commit: 72c35be086fed5f70fd11dc96ca34298573bff05
2021-09-21 10:38:43 +02:00
Kubernetes Publisher
79916c54e1 Merge pull request #104578 from MadhavJivrajani/refactor-rate-limiters
Move client-go/tools/record tests away from `IntervalClock` to `SimpleIntervalClock`

Kubernetes-commit: 775c9314adb82419aaffea39f671d8dcee133a3f
2021-09-21 07:43:04 +00:00
Kubernetes Publisher
191e5dc23b Merge pull request #105095 from wojtek-t/migrate_clock_3
Unify towards k8s.io/utils/clock - part 3

Kubernetes-commit: 353f0a5eabe4bd8d31bb67275ee4beeb4655be3f
2021-09-21 07:43:02 +00:00
Kubernetes Publisher
4fc3881b7f Merge pull request #104655 from luyou86/client-go-bucket-rate-limiter-add-maxDelay
client-go bucket rate limiter add maxDelay

Kubernetes-commit: 232bc67b221e8af2bb3494c36e59b006881f6b1d
2021-09-20 15:49:04 +00:00
Kubernetes Publisher
cc7616029c Merge pull request #105031 from howardjohn/q/memory-leak
workqueue: fix leak in queue preventing objects from being GCed

Kubernetes-commit: a73f45dd96d01bbb2e8b2071a3aafdcdaeed0582
2021-09-18 07:42:55 +00:00
Kubernetes Publisher
98470c83bc Merge pull request #105080 from smira/client-error-wrapping
fix: wrap errors correct when validating kubeconfig

Kubernetes-commit: 35ae8c9fe4589bbe99e174929f78f8228c2da528
2021-09-17 23:51:32 +00:00
Kubernetes Publisher
efdf0580f0 Merge pull request #105026 from wojtek-t/migrate_clock_2
Unify towards k8s.io/utils/clock - part 2

Kubernetes-commit: 9918aa1e035a00bc7c0f16a05e1b222650b3eabc
2021-09-17 11:55:44 +00:00
Kubernetes Publisher
0866d96687 Merge pull request #104949 from Karthik-K-N/json-iterator-version-update
Updated json-iterator version to 1.1.12 from 1.1.11

Kubernetes-commit: 6a49ed41eab79d745c53723ce7f134222279545e
2021-09-17 11:55:42 +00:00
wojtekt
01243dd50e Migrate to k8s.io/utils/clock in client-go
Kubernetes-commit: bb7dac443a2039f97c822f610e78d4b65482c56d
2021-09-17 11:36:09 +02:00
Andrey Smirnov
8f8a83c908 fix: wrap errors correct when validating kubeconfig
This allows to check for specific errors using `errors.Is`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>

Kubernetes-commit: a5647fa417de6d17ba200f1b4bcd2bb28cceb22c
2021-09-16 22:56:08 +03:00
wojtekt
608b5216df Migrate to k8s.io/utils/clock in client-go - part 1
Kubernetes-commit: 950f655bdd19c5af275846cf1940d767a5ec0115
2021-09-15 10:58:56 +02:00
Kubernetes Publisher
7e5e2e0743 Merge pull request #104991 from hzxuzhonghu/mem-leak
Fix workqueue memory leak

Kubernetes-commit: 4c014e5ca41fe9efbbb568609f1f8d1a6a51263b
2021-09-15 07:44:16 +00:00
John Howard
eb364c77d8 workqueue: fix leak in queue preventing objects from being GCed
See https://github.com/grpc/grpc-go/issues/4758 for a real world example
of this leaking 2gb+ of data.

Basically, when we do `q.queue[1:]` we are just repositioning the slice.
The underlying array is still active, which contains the object formerly
known as `q.queue[0]`. Because its referencing this object, it will not
be GCed. The only thing that will trigger it to free is eventually when
we add enough to the queue that we allocate a whole new array.

Instead, we should explicitly clear out the old space when we remove it
from the queue. This ensures the object can be GCed, assuming the users'
application doesn't reference it anymore.

Kubernetes-commit: 2a34801168dc1c70ba25b1d4200b534bf515cbc2
2021-09-14 15:51:09 -07:00
Jordan Liggitt
dfce9f4527 vendor sigs.k8s.io/json
Kubernetes-commit: 434ce4336ab06b3c34208822d558c0432ada3ad3
2021-09-14 18:20:36 -04:00
Kubernetes Publisher
2ed3e42c43 Merge pull request #104874 from wojtek-t/migrate_clock_1
Unify towards k8s.io/utils/clock - part 1

Kubernetes-commit: 047a6b9f861b2cc9dd2eea77da752ac398e7546f
2021-09-14 03:35:12 +00:00
Kubernetes Publisher
a5f006eba4 Merge pull request #104969 from liggitt/crd-error-validation
Fix conversion of literal null JSON values

Kubernetes-commit: 9c147baa70c31afc966329df73302e9b52d8e432
2021-09-14 03:35:10 +00:00
Kubernetes Publisher
bf0611c8ec Merge pull request #104399 from tkashem/apf-v1beta2
apf: introduce v1beta2

Kubernetes-commit: cdcf2a239e211c66c84efaedea1a4eb5eb4c409d
2021-09-14 03:35:08 +00:00
xuzhonghu
2f21912570 Fix workqueue memory leak
Kubernetes-commit: 25060beef0c536e80b53507ec445695a7305db00
2021-09-14 09:53:53 +08:00
Kubernetes Publisher
29730ab4f5 Merge pull request #104045 from ravisantoshgudimetla/promote-minReadySec-sts-beta
Promote min ready sec sts beta

Kubernetes-commit: 62a6df9e0b8ed3fe9fad96c8a9a0bde4a3224f35
2021-09-13 23:35:38 +00:00
Jordan Liggitt
5960e3c05a Propagate conversion errors
Kubernetes-commit: ba1ca0d4591f06f796ea2d93463a4c5caaa33cc7
2021-09-13 11:49:17 -04:00
Kubernetes Publisher
45fb834fed Merge pull request #104853 from kitianFresh/feature/avoid-sharedIndexInformer-run-more-than-once
avoid sharedIndexInformer run more than once, avoid more cache and me…

Kubernetes-commit: dcfe8f5d5c9531e3196eb5036a86643c728eafe7
2021-09-13 15:34:27 +00:00
Kubernetes Publisher
b36b60b678 Merge pull request #104725 from NoicFank/master
Improve DeltaFIFO function 'ListKeys'

Kubernetes-commit: 170f64d58bdf08be5dfd7711c505f36f2503b1c2
2021-09-13 15:34:25 +00:00
Karthik K N
e4babf5864 Updated vendor files and pinned versions
Kubernetes-commit: c5b4e05834d8edceac94ab1a91c3153581534393
2021-09-13 15:42:42 +05:30
Kubernetes Publisher
9b97591456 Merge pull request #101928 from alexanderConstantinescu/drain-workqueue
client-go/workqueue: Drain work queue on shutdown

Kubernetes-commit: 8ac95264750ad1d93ec92b58b9956cd8f6a0a738
2021-09-11 03:33:57 +00:00
Kubernetes Publisher
9026029b9a Merge pull request #104841 from h4ghhh/deltafifo_rv
client-go: para 'resourceVersion' in DeltaFIFO.Replace is not used, so remove it

Kubernetes-commit: 34003c5aeee45e244a81f499472759be0cda205c
2021-09-10 11:42:30 +00:00
wojtekt
8d49a0b940 Migrate to k8s.io/utils/clock in flowcontrol backoff
Kubernetes-commit: 4ce452989bef21ab6d15bc659f463d8c706ad33e
2021-09-10 09:37:30 +02:00
Kubernetes Publisher
92773dec00 Merge pull request #104103 from pohly/logr-1.0
klog 2.20.0, logr v1.1.0, zapr v1.1.0

Kubernetes-commit: 5b49d125b76b4d92d5f782630b75b911fee75aaa
2021-09-09 23:33:48 +00:00
wojtekt
14a51589c3 Migratet to k8s.io/utils/clock in workqueue
Kubernetes-commit: 392292ba81964e6ee7badec360a800b1f8645f2f
2021-09-09 16:38:59 +02:00
Kubernetes Publisher
dbb2afa6ab Merge pull request #104812 from astraw99/fix-sharedInformer-doc
Fix comment of `processorListener.requestedResyncPeriod`

Kubernetes-commit: c964fe6001376c8ad209656175bd3c4087ce5d71
2021-09-09 11:43:43 +00:00
kitianFresh
f0bcda0dce avoid sharedIndexInformer run more than once, avoid more cache and memory consume
Kubernetes-commit: 305c13faca48d1a6ea4d263e262ebc8df0387c84
2021-09-09 13:37:25 +08:00
Kubernetes Publisher
84f9a96f06 Merge pull request #103023 from tiloso/staticcheck-apiserver-clientgo
Fix staticcheck in k8s.io/{apiserver/pkg/storage,client-go/rest/watch}

Kubernetes-commit: 95390e6476fca15b0f55cde2c142ec18ca57aee0
2021-09-09 03:33:24 +00:00
Aldo Culquicondor
0659305cf9 Add ready field to Job status
to keep a count of the pods that have the ready condition.

Also:
- Add feature gate JobReadyPods.
- Add Ready to describe.

Change-Id: Ib934730a430a8e2a2f485671e345fe2330006939

Kubernetes-commit: 1bff5eb44d9897e12aff3ea10f5a856580158278
2021-09-08 14:31:59 -04:00
00255991
c209a2e2bc para 'resourceVersion' in DeltaFIFO.Replace is not used, so remove it
Kubernetes-commit: 2949045ec47163485118c25c40907eb43c090fac
2021-09-08 19:10:40 +08:00
astraw99
33e23edf09 fix sharedInformer doc
Kubernetes-commit: 9d84ffafd06e6ca455aa279bd513758696e8e875
2021-09-07 16:45:07 +08:00
Dingzhu Lurong
b86695770f Improve DeltaFIFO function 'ListKeys'
In function ListKeys, it better to use ‘queue’ instead of 'items' to get all the keys.

Kubernetes-commit: f0ce8755287b1cad087b61abfcccd79c9f151828
2021-09-02 14:02:54 +08:00
Kubernetes Publisher
a31b18a6ac Merge pull request #104573 from sxllwx/refine/clear-comments-for-metaclient
Explain the reason why metaclient special processing metav1.DeleteOptions encoding

Kubernetes-commit: 7a0638da76cb9843def65708b661d2c6aa58ed5a
2021-09-01 08:07:46 +00:00
Kubernetes Publisher
ce70fecbf8 Merge pull request #104172 from atiratree/revert-jsonpath-fix
revert "fix wrong output when using jsonpath"

Kubernetes-commit: db4f2014c8937754db2d21214465239c95ca39b9
2021-08-31 16:07:13 +00:00
astraw99
1816a40bbb fix word comment to common
Kubernetes-commit: 3e31933471e015a860e1967acfe730bb35422f17
2021-08-29 19:06:04 +08:00
luyou86
a6277bbabf client-go bucket rate limiter add maxDelay
Kubernetes-commit: 57ec8336195702dd0d5f6f19fd3907e2a6a615a8
2021-08-29 17:45:58 +08:00
Kubernetes Publisher
b350fc31ce Merge pull request #104231 from astraw99/fix_unified_workers
Unify controller worker num param `threadiness` to `workers`

Kubernetes-commit: fca3175df7a453c24eec3c11b632090c49472c9d
2021-08-27 20:06:52 +00:00
atiratree
e529a15dbc add a test for jsonpath template parsing to prevent regressions
This behaviour was broken by commit
39cfe232325d66bcdbc935af7aaf7022562e7010 and PR kubernetes#98057

Kubernetes-commit: b79859cb12b19222fffc17481e1fe006819de63c
2021-08-26 14:49:58 +02:00
Madhav Jivrajani
b9fa896d5d Refactor client-go/util/flowcontrol/throttle.go RateLimiter
- Introduce PassiveRateLimiter which implements all methods of previous RateLimiter except Accept() and Wait()
- Change RateLimiter interface to extend PassiveRateLimiter by additionally implementing Accept() and Wait()
- Make client-go/tools/record use PassiveRateLimiter

Refactor EventSourceObjectSpamFilter, EventAggregator, EventCorrelator

- EventSourceObjectSpamFilter, EventAggregator, EventCorrelator use clock.PassiveClock now.
	- This won't be a breaking change because even if a clock.Clock is passed, it still implements the clock.PassiveClock interface.
- Extend clock.PassiveClock through Clock.
- Replace pacakge local implementation of realClock with clock.RealClock
- In flowcontrol/throttle.go split tokenBucketRateLimiters to use Clock and clock.PassiveClock.
- Migrate client-go/tools/record tests from using IntervalClock to using SimpleIntervalClock (honest implementation of clock.PassiveClock)

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: ac5c55f0bd853fcf883d9b8e1f5ef728a2fb5309
2021-08-25 21:56:26 +05:30
scott
0c4682e956 explain the reason why metaclient special processing metav1.DeleteOptions encoding
metaclient explicitly specifies the Content-Type when executing Delete and DeleteCollection, and add test for that

Kubernetes-commit: 8976f6f6d9af22ad40df891565c19e4dfd67f591
2021-08-25 17:55:25 +08:00
Kubernetes Publisher
3dc80a3333 Merge pull request #103692 from justaugustus/go117
[go1.17] Update to go1.17

Kubernetes-commit: c1e69551be1a72f0f8db6778f20658199d3a686d
2021-08-25 04:07:38 +00:00
Shiming Zhang
6e9eb81c44 Check namespaces match in UpdateWithEventNamespace
Kubernetes-commit: 0f2e202ff4f3cca1c068792f6eb79b48cf3c9bf9
2021-08-23 10:36:29 +08:00
Abu Kashem
0c0d853c0f apf: regenerate for v1beta2
Kubernetes-commit: 2f19f8c2df640b6c6bf00c97752053b9b0a7f09b
2021-08-16 17:07:24 -04:00
Stephen Augustus
624e6827e6 generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 481cf6fbe753b9eb2a47ced179211206b0a99540
2021-08-12 17:13:11 -04:00
scott
61ae14a896 set the content-type Header when the dynamic client sends the request
Kubernetes-commit: 2ad09c6a87b9150598c6119d653acc983c5c7a11
2021-08-12 20:17:07 +08:00
Stephen Augustus
484a294726 generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 0be115722bf30f42c7a954d5cdd4b48efd70ae77
2021-08-11 18:03:39 -04:00
Stephen Augustus
e311efc923 [go1.17] Bump golang.org/x/... dependencies
hack/pin-dependency.sh golang.org/x/crypto master
hack/pin-dependency.sh golang.org/x/net master
hack/pin-dependency.sh golang.org/x/oauth2 master
hack/pin-dependency.sh golang.org/x/sync master
hack/pin-dependency.sh golang.org/x/sys master
hack/pin-dependency.sh golang.org/x/term master
hack/pin-dependency.sh golang.org/x/time master
hack/pin-dependency.sh golang.org/x/tools master

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 0e9881a9dc9d06aaf93723b4dfc7f4e1cb92e215
2021-08-11 18:02:07 -04:00
Kubernetes Publisher
b1403d113a Merge pull request #104504 from astraw99/fix_typo_CRED
Fix typo `CRED` to `CRUD`

Kubernetes-commit: 62828b24f35cb27e871755a2c201b91ce9ff7de0
2021-08-24 16:07:36 +00:00
astraw99
f100d86401 fix typo CRED to CRUD
Kubernetes-commit: f8b82e189cfdc3aca7b9d789cc6f3131897f0ebc
2021-08-22 21:19:30 +08:00
Kubernetes Publisher
590eaed90a Merge pull request #104373 from astraw99/fix_typo_rate_limiter
Fix typo of rate limiter

Kubernetes-commit: 40f05cec281bca57b898c3bf629dbc056eccf3da
2021-08-20 20:07:23 +00:00
Kubernetes Publisher
e88163c224 Merge pull request #104368 from aojea/ruleguard
golang 1.17 fails to parse IPs with leading zeros

Kubernetes-commit: b0bc8adbc2178e15872f9ef040355c51c45d04bb
2021-08-20 16:06:55 +00:00
Antonio Ojea
a6edfabde7 run hack/update-netparse-cve.sh
Kubernetes-commit: 0cd75e8fec62a2531637e80bb950ac9983cac1b0
2021-08-20 01:16:14 +02:00
Kubernetes Publisher
9c45b4b2bf Merge pull request #104466 from stbenjam/bump-utils
vendor: bump k8s.io/util to get fix for LRU cache

Kubernetes-commit: 7fcecc077dae36071901472d12fa26e5af99010c
2021-08-20 04:06:59 +00:00
Stephen Benjamin
284a0d5a73 vendor: bump k8s.io/util to get fix for LRU cache
This updates the k8s.io/util to pull in the fix for
https://github.com/kubernetes/kubernetes/issues/104452.

Commands run:

  ./hack/pin-dependency.sh k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
  ./hack/update-vendor.sh

Kubernetes-commit: c2532351525c2822daab61303eb4f94942a017e6
2021-08-19 17:11:35 -04:00
Kubernetes Publisher
2961e1de2c Merge pull request #104413 from liggitt/openapi-ipvalidation
Bump k8s.io/kube-openapi

Kubernetes-commit: cde45fb161c5a4bfa7cfe45dfd814f6cc95433f7
2021-08-17 20:07:04 +00:00
Jordan Liggitt
d2b8b64fb6 Regenerate applyconfigurations
Kubernetes-commit: 5e03a1f070ec0556fd6a809026efcdddb4026c8c
2021-08-17 11:41:47 -04:00
Jordan Liggitt
a3cb704425 Bump k8s.io/kube-openapi
Updates to preserve openapi ipv4 validation compatibility with pre-go1.17 behavior

Kubernetes-commit: b15c2130aad497add782820c415c59952b4e75a8
2021-08-17 10:13:40 -04:00
astraw99
9d15ff74ca fix typo of rate limiter
Kubernetes-commit: 7953cf0ce9f890b6cba7de3325a7ce68609832a0
2021-08-15 17:48:37 +08:00
Kubernetes Publisher
d6c83109f0 Merge pull request #103912 from Iceber/fix-event-recorder
client-go/events: avoid referencing a nil related object

Kubernetes-commit: e7efe219f8a5fcdff9647d45639696048c1f6147
2021-08-12 12:05:55 +00:00
Kubernetes Publisher
19db02e788 Merge pull request #103918 from olagacek/master
Allow customizing spam filtering in event client library

Kubernetes-commit: 582c6f6df71d8c59de5b8b5a2363d13ffcc42b14
2021-08-11 16:06:03 +00:00
Kubernetes Publisher
044192f4ee Merge pull request #104279 from liggitt/add-staging-golang-license
Copy golang license to staging copies

Kubernetes-commit: 5a732dcfe1d4ec0e8ee2871b106605b7f8a69b98
2021-08-11 04:05:56 +00:00
Kubernetes Publisher
81fcb4fde1 Merge pull request #104258 from coderanger/patch-3
Typo in a comment.

Kubernetes-commit: 01f83db11942d0dd8f30658a505c440404fa5d44
2021-08-11 04:05:55 +00:00
Jordan Liggitt
21ff407b62 Copy golang license to staging copies
Kubernetes-commit: c4ecdad5708262d5be1d6cce4cbad3a3b820924b
2021-08-10 17:37:28 -04:00
Noah Kantrowitz
e89f211c9a Typo in a comment.
Kubernetes-commit: 86c6e25016a3385394503efc9bb29f4dfe79163c
2021-08-09 21:21:45 -07:00
Kubernetes Publisher
150ce54105 Merge pull request #102913 from pacoxu/upgrade-promotheus-common
upgrade prometheus/common to v0.28.0

Kubernetes-commit: 4b4d12f8a68e224c78d00e8fd2bf3c87aff90a9a
2021-08-09 16:05:56 +00:00
astraw99
a9a86ad864 unify worker num to workers
Kubernetes-commit: e6df935fd30c56a8ece0da6152c60fc725d942b7
2021-08-09 10:48:53 +08:00
Kubernetes Publisher
b7569257b2 Merge pull request #102872 from barkbay/client/fix-discovery-error
Return StatusError 404 in fake client when resource is not found

Kubernetes-commit: f8023d60f2c30836154e7f7a294cfbe9eb8d3e8a
2021-08-06 20:17:05 +00:00
Kubernetes Publisher
0f5acb8c39 Merge pull request #103917 from aojea/slow_handlers
client-go: deltaFIFO trace slow handlers

Kubernetes-commit: ec663ada4be14d0afd45e0414b8711d4380ec289
2021-08-06 00:06:00 +00:00
atiratree
496c390182 revert "fix wrong output when using jsonpath"
This partially reverts commit 39cfe232325d66bcdbc935af7aaf7022562e7010and PR #98057

the original problem was caused by not using {end} at the end of the range

Kubernetes-commit: 5c3de9f1de913d1251ce2183991a845edc01d123
2021-08-05 18:39:43 +02:00
Kubernetes Publisher
fa98c04850 Merge pull request #103657 from dgrisonnet/fix-event-doc
Update Events version in the documentation of the events package

Kubernetes-commit: 7e99f3d7490d11438b9834a7bd6b0e8b7eb0bec1
2021-08-05 08:05:52 +00:00
Kubernetes Publisher
2d8e761048 Merge pull request #103564 from kevindelgado/unstr-extr-poc
ExtractItems for unstructured apply configurations

Kubernetes-commit: 0a704f9e1f6685f3ae39114435d23593a900e74c
2021-08-05 08:05:51 +00:00
Kubernetes Publisher
3c86d4a920 Merge pull request #100406 from tomkukral/retry-doc
fix typo in retry doc

Kubernetes-commit: bf22025950c0af15f3bbf92f3ff085dbe5b087a7
2021-08-05 04:05:53 +00:00
Patrick Ohly
90bee32800 klog 2.20.0, logr v1.1.0, zapr v1.1.0
This replaces the experimental logr v0.4 with the stable v1.1.0
release. This is a breaking API change for some users because:
- Comparing logr.Logger against nil is not possible anymore:
  it's now a struct instead of an interface. Code which
  allows a nil logger should switch to *logr.Logger as type.
- Logger implementations must be updated in lockstep.

Instead of updating the forked zapr code in json.go, directly using
the original go-logr/zapr is simpler and avoids duplication of effort.

The updated zapr supports logging of numeric verbosity. Error messages
don't have a verbosity (= always get logged), so "v" is not getting
added to them anymore.

Source code logging for panic messages got fixed so that it references
the code with the invalid log call, not the json.go implementation.

Finally, zapr includes additional information in its panic
messages ("zap field", "ignored key", "invalid key").

Kubernetes-commit: cb6a65377775110631bc865acc06c3f957592813
2021-08-03 17:31:39 +02:00
Margo Crawford
e0129e64d4 Introduces Impersonate-Uid to client-go.
* Updates ImpersonationConfig in rest/config.go to include UID
  attribute, and pass it through when copying the config
* Updates ImpersonationConfig in transport/config.go to include UID
  attribute
* In transport/round_tripper.go, Set the "Impersonate-Uid" header in
  requests based on the UID value in the config
* Update auth_test.go integration test to specify a UID through the new
  rest.ImpersonationConfig field rather than manually setting the
  Impersonate-Uid header

Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: d9ddfb26e10ee353fc4617b66d2c9274bf6d1c08
2021-07-30 15:50:51 -07:00
ravisantoshgudimetla
aade4d8106 api: Promote statefulset MinReadySeconds to beta
Kubernetes-commit: bcc288eeeeaa34083319f9a27a352b98d4e6b3d8
2021-07-30 12:38:14 -04:00
Tim Hockin
bcf88f084d Update golang.org/x/time/rate (#104014)
* Add failing test case

* Update golang.org/x/time/rate

* Call update-internal-modules from update-vendor

Kubernetes-commit: 09dc055984e9532f29f37acae7aea7a979ded764
2021-07-30 02:27:36 +00:00
Kevin Delgado
dfebd379cf fix boilerplate and staticcheck
Kubernetes-commit: 3628065b455f17cf3da5a5021c9603f89daf20bc
2021-07-27 22:31:38 +00:00
Kevin Delgado
ba2f26324b fix vendor
Kubernetes-commit: 85bc3c4f857090899e82eb2c7c3f6aebc9f4eeaf
2021-07-27 21:23:49 +00:00
Kevin Delgado
d4454993f4 remove apiserver impor from client-go
Kubernetes-commit: af11c4ac9be74115dfd35ce6f18cfa0440fc3458
2021-07-27 20:46:40 +00:00
Kevin Delgado
10ec231914 wrap extractor errors
Kubernetes-commit: 479e2ae307c0ca7e0a826e54df6bcc7676445e35
2021-07-27 01:25:03 +00:00
Aleksandra Gacek
23071d64f0 Allow customizing spam filtering in event client library
Kubernetes-commit: 00080d400fe27f11795b654ad1e124311831a0fc
2021-07-26 16:05:18 +02:00
Antonio Ojea
c63d830a92 client-go: deltaFIFO trace slow handlers
If the informers handlers are slow processing the objects, the deltaFIFO
blocks the queue and the streamWatchers can not add new elements to the
queue, creating contention and causing different problems, like high
memory usage.
The problem is not easy to identify from a user perspective, typically
you can use pprof to identify a high memory usage on the StreamWatchers
or some handler consuming most of the cpu time, but users should not
have to profile the golang binary in order to know that.

Metrics were disabled on the reflector because of memory leaks, also
monitoring the queue depth can't give a good signal, since it never goes high

However, we can trace slow handlers and inform users about the problem.

Kubernetes-commit: d38c2df2c4b945bcf1f81714fc6bfd01bbd0f538
2021-07-26 16:00:31 +02:00
Iceber Gu
3e35ef93c0 client-go/events: avoid referencing a nil related object
Kubernetes-commit: 822eb29b6f333317798e5b88fc43fb28b5f33b69
2021-07-26 18:15:22 +08:00
Mikhail Mazurskiy
0ae31f68fd Cache rest mapper and discovery client
They are both stateful so it is beneficial for performance to cache them.

Kubernetes-commit: 037ed11f649f356efc4363db32b9f85ef02ca106
2021-07-25 19:31:58 +10:00
Kevin Delgado
b5bb80748a Revert caching in favor of simple ttl
Kubernetes-commit: 1122091b065b5ce37a93b1048174acaff243bf74
2021-07-21 22:57:57 +00:00
Kevin Delgado
784e3fbb2f remove commented out code
Kubernetes-commit: 53582a0104fb88aacb5f9512e60136e59fc25f8c
2021-07-20 21:59:37 +00:00
Kevin Delgado
305b0bc3db Address PR feedback around gvk parser generation ergonomics
Kubernetes-commit: c9e97de46bb76cf868fcb172f286127b9894fbe9
2021-07-20 21:29:02 +00:00
Kubernetes Publisher
ac207faedf Merge pull request #103747 from mattcary/noapi
Revert #99378

Kubernetes-commit: 7303b2ce4e0de8d97e677eee880fa12b4d4939c1
2021-07-20 14:27:25 +00:00
Kevin Delgado
1b1afde6e1 Restructure caching logic
Kubernetes-commit: 9b9925f56db9f483e838606b632064b13c84a2bb
2021-07-19 22:06:43 +00:00
Kevin Delgado
6728ebaf13 comments
Kubernetes-commit: 7cb18e84f1396338ebea825677de772a862a2743
2021-07-19 20:50:50 +00:00
Kevin Delgado
f316b7b5f5 rename cache, add to integration test
Kubernetes-commit: 604db6eb2ada446e78152685943253455b5ec888
2021-07-19 20:04:27 +00:00
Kevin Delgado
4389b4f36a Add HasOpenAPISchemaChanged to DiscoveryInterface
Kubernetes-commit: 235a57a29e5d232f411a23148643533140e646d1
2021-07-16 22:53:39 +00:00
Matthew Cary
2406d2208b Revert "tests for statefulset PersistentVolumeClaimDeletePolicy api change"
This reverts commit b259686b367ffef89310a71875834a97befc5b4b.

Change-Id: I25cc8ae8a9aa77d0bc483147d3f8fb65616a2b2b

Kubernetes-commit: aeb82243fc863c44c3603f0d3bf4d8910774765e
2021-07-15 17:15:50 -07:00
Kubernetes Publisher
d3b97581d2 Merge pull request #103689 from enj/enj/t/exec_metrics
client-go exec: fix metrics related to plugin not found

Kubernetes-commit: 6609899398d35d22a7482f687ed05fb19093b762
2021-07-14 22:29:33 +00:00
Kevin Delgado
5d4570c9e0 basic caching working
Kubernetes-commit: 7b9757faa4924422bec746b689233ed1ea790b1b
2021-07-14 18:54:16 +00:00
Monis Khan
ef1d5d2691 client-go exec: fix metrics related to plugin not found
These were missed because our tests did not pass in the correct test
data input (the command to execute).

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: a6ac42082b4d7c0057b52900736bd7fbc2c44241
2021-07-14 12:34:56 -04:00
Damien Grisonnet
398a64c25b client-go/tools: update events version in doc
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: d02568aab52c1003f3625a00ff4e29fcb81bbda6
2021-07-13 08:50:40 +02:00
Kubernetes Publisher
7a90b08589 Merge pull request #102928 from dprotaso/dynamic-client-backwards-compatible
Simplify construction of the fake dynamic client

Kubernetes-commit: fc4e7c17f4aead0bc953be03178c4e3caee1015f
2021-07-08 21:48:10 +00:00
Kubernetes Publisher
f0bc45ffb4 Merge pull request #98817 from alculquicondor/job-completion-api
Add Job.status.uncountedTerminatedPods for Job tracking

Kubernetes-commit: b76549665070beb2cc1a0410a6c7f66d8007f76b
2021-07-08 21:48:09 +00:00
Kubernetes Publisher
69e00b04ba Merge pull request #103548 from dims/drop-hashicorp-lru
Drop hashicorp lru - switch to the lru impl in k8s.io/utils

Kubernetes-commit: 9c4905e7af0d070d139c06638ab9868fd3521883
2021-07-08 09:46:36 +00:00
Kevin Delgado
7525c0e37a Manually set GVK in extract, add commentary to extractor
Kubernetes-commit: dda31bbf2e7a94624e3679e3db56c95e66509ce0
2021-07-08 01:56:58 +00:00
Davanum Srinivas
266e43aa73 update to new k8s.io/utils
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 3a221b3332464d7947aacee91e661880208ef901
2021-07-07 13:39:19 -04:00
Kubernetes Publisher
8abac606c4 Merge pull request #103487 from novahe/fix/fixture-data-race
client-go: fix fixture data race

Kubernetes-commit: 075ce33452879fe90f0893e008e5b5111e6b55fa
2021-07-08 01:46:45 +00:00
Kubernetes Publisher
b267864032 Merge pull request #103276 from NetApp/data-source-ref
Add DataSourceRef field to PVC spec

Kubernetes-commit: eaba61b4de9db615c73f868468ae2f816a4fe1c4
2021-07-07 17:49:30 +00:00
Kubernetes Publisher
4339f1ba5f Merge pull request #102181 from enj/enj/i/deprecate_gcp_azure
Deprecate azure and gcp in-tree auth plugins

Kubernetes-commit: 60475ee5c2dffd48a30018745ad7a2bafdf97bac
2021-07-07 05:46:37 +00:00
Kubernetes Publisher
68cb2ddef9 Merge pull request #102890 from ankeesler/exec-plugin-v1
exec credential provider: add v1 struct

Kubernetes-commit: 3392f16908a84dd96a29d52d2edee159fcb6711f
2021-07-06 21:46:29 +00:00
novahe
b7e5fce706 client-go: copying object to fix data race (#103148)
Kubernetes-commit: ce257266aa7f3f104e656b722310be32e95a9cb5
2021-07-05 21:55:55 +08:00
Kevin Delgado
690f06e07a Initial UnstructuredExtract without caching
Kubernetes-commit: 6e481c5db19cda1ef1b7506c22c0046e440c7fe2
2021-07-03 00:05:11 +00:00
Kubernetes Publisher
ca3a47f0b4 Merge pull request #99494 from enj/enj/i/not_after_ttl_hint
csr: add expirationSeconds field to control cert lifetime

Kubernetes-commit: 659c7e709f3b7f5f2a25e456525cd8747f2e68cc
2021-07-02 09:46:07 +00:00
pacoxu
9a97b38632 upgrade google.golang.org/api to v0.45.0
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 2926b4572e687a761fe09a4dad2ee3579d330329
2021-07-02 11:34:32 +08:00
paco
e679b1fb37 upgrade github.com/prometheus/common to v0.28.0
Kubernetes-commit: 18d583653c67dbfafc9c5b09d9d6189705fdde85
2021-07-07 16:22:05 +08:00
Kubernetes Publisher
843bb800b1 Merge pull request #103176 from CaoDonghui123/updatemod
Update golang.org/x/net

Kubernetes-commit: c14017b270d21e6a7e79c0b8872a580f43a67220
2021-07-01 05:45:55 +00:00
Kubernetes Publisher
e9d2f61609 Merge pull request #103318 from jpbetz/fix-102749
Bump SMD to v4.1.2 to pick up #102749 fix

Kubernetes-commit: 0dad7d1c47c41f232b21cdd5c21be6683e545e9d
2021-06-30 21:46:05 +00:00
Kubernetes Publisher
45d107794c Merge pull request #99378 from mattcary/api
StatefulSet PersistentVolumeClaimDeletePolicy

Kubernetes-commit: 98d20f552bf93e268868c4211c9eed533a508415
2021-06-30 21:46:02 +00:00
Joe Betz
83ade40bcb Bump SMD to v4.1.2 to pick up #102749 fix
Kubernetes-commit: b790cf388ce1fce140c80bb0f7f9669288408b7a
2021-06-29 19:33:00 -07:00
Andrew Keesler
f00874ad93 exec credential provider: update tests+metadata for v1
Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 20e1c4d7548de0b39a2d70a748ca0b9aab28f631
2021-06-28 10:58:02 -04:00
Andrew Keesler
dba1c9aa68 promote client.authentication.k8s.io to v1
Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 30a6812aa13d11422b7d03b7d662b4857bddf24f
2021-06-28 10:56:57 -04:00
Kubernetes Publisher
e68c673b3c Merge pull request #103026 from sanposhiho/fix/typo-on-ExtractHoge
Fix typo on ExtractHoge documentation.

Kubernetes-commit: 49ac765b67cafcf881c01354195456a4a683b6ba
2021-06-28 11:45:32 +00:00
caodonghui
68518116c3 Update golang.org/x/net to v0.0.0-20210520170846-37e1c6afe023
Kubernetes-commit: c1d5a3a99e120281c618d6573d7b424138dfb5a9
2021-06-25 15:25:52 +08:00
Kubernetes Publisher
dae61bee3a Merge pull request #95472 from ahmedtd/lru-remove-mpl
Remove MPL-licensed dep from lruexpirecache

Kubernetes-commit: 89ebe77aebf2b5f0c9526f474b003358655dbac5
2021-06-24 23:45:54 +00:00
Kubernetes Publisher
f54e1433f8 Merge pull request #102540 from jpbetz/apply-client-docs
Add doc.go explaining client-go apply support

Kubernetes-commit: b27ad157792e9c306cbbc1a287d7905670d9836b
2021-06-24 23:45:52 +00:00
Monis Khan
e56c7dcd36 Generated
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 29b3fa782631ab65c7e1f48fecef58c5365577c8
2021-06-23 17:55:14 -04:00
Monis Khan
30cd4e9a49 csr: add expirationSeconds field to control cert lifetime
This change updates the CSR API to add a new, optional field called
expirationSeconds.  This field is a request to the signer for the
maximum duration the client wishes the cert to have.  The signer is
free to ignore this request based on its own internal policy.  The
signers built-in to KCM will honor this field if it is not set to a
value greater than --cluster-signing-duration.  The minimum allowed
value for this field is 600 seconds (ten minutes).

This change will help enforce safer durations for certificates in
the Kube ecosystem and will help related projects such as
cert-manager with their migration to the Kube CSR API.

Future enhancements may update the Kubelet to take advantage of this
field when it is configured in a way that can tolerate shorter
certificate lifespans with regular rotation.

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: cd91e59f7c351fce47c064a5162c2cb79075159c
2021-06-25 22:08:10 -04:00
Joe Betz
50ffc02e9b Split documentation according to both mechanisms available for migration
Kubernetes-commit: 7f893f6bd62357e52ee77ddc64dd163a4a5f1224
2021-06-23 10:30:58 -07:00
Joe Betz
acf46abf8c Apply suggestions from code review
Co-authored-by: Daniel Smith <dbsmith@google.com>

Kubernetes-commit: 5d461adb3b8f8192695b3a3cd76d903347d3285a
2021-06-23 10:18:17 -07:00
Kubernetes Prow Robot
5a30221e6a Merge pull request #990 from nikhita/revert-direct-pr
Revert "Merge pull request #982 from sprutner/patch-1"
2021-06-22 01:13:58 -07:00
Nikhita Raghunath
18b053fa9a Revert "Merge pull request #982 from sprutner/patch-1"
This reverts commit e7ebdbcfc7, reversing
changes made to 3fae6f05ac.
2021-06-22 13:41:22 +05:30
Kubernetes Prow Robot
e7ebdbcfc7 Merge pull request #982 from sprutner/patch-1
Update README.md
2021-06-22 00:33:58 -07:00
sanposhiho
c374b402a0 Fix: typo with hack/update-codegen.sh
Kubernetes-commit: a2a8080169a3a52d6c6d5d613da4d92d579eedc9
2021-06-21 00:52:43 +09:00
tiloso
04efcfc452 Fix staticcheck in apiserver and client-go pkgs
Kubernetes-commit: 830a137d2ea70663cd94403595313b95ac40ffe8
2021-06-19 22:03:46 +02:00
Kubernetes Publisher
3fae6f05ac Merge pull request #103010 from BenTheElder/ansi-386-overflow
update Azure/go-ansiterm to v0.0.0-20210617225240-d185dfc1b5a1

Kubernetes-commit: 2ff70c77c98fdd3230ade470b319309f34909215
2021-06-19 07:19:03 +00:00
Benjamin Elder
eadbc45beb update Azure/go-ansiterm to v0.0.0-20210617225240-d185dfc1b5a1
fixes constant overflow on windows/386

Kubernetes-commit: 35e9d97f3e02a8757e5cc698142037c5a95487d9
2021-06-18 15:11:48 -07:00
Kubernetes Publisher
ca46d47734 Merge pull request #103007 from smira/error-wrapping
fix: properly wrap errors when reading response body in the client

Kubernetes-commit: d283d92121e88d282d4158d7834a7eccdb8774dc
2021-06-18 14:48:05 -07:00
Andrey Smirnov
c8b4c1e4bd fix: properly wrap errors when reading response body in the client
As `%v` doesn't allow error unwrapping, checks like `errors.Is` are not
working properly.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>

Kubernetes-commit: 6c0463bd2b616d0f22f47905bb26d66fa3b04e37
2021-06-18 23:35:31 +03:00
Kubernetes Publisher
848310b833 Merge pull request #102783 from mcbenjemaa/update-dep-gnostic
Update gnostic to the latest version

Kubernetes-commit: e9c6ec639cc5ca93a3f6e01ff4215f6b68d6142d
2021-06-18 19:19:10 +00:00
Kubernetes Publisher
0634aae869 Merge pull request #102946 from ahmed-mez/patch-1
Fix ServerGroupsAndResources docs typo

Kubernetes-commit: 48b7492f92997ac8cbb8b6c559a0c68cba3021ab
2021-06-18 04:36:04 -07:00
Mohamed chiheb Ben jemaa
68eb0a2b5d update vendor
Kubernetes-commit: 9571b1f884480879de54d5ff993ca336d61874b2
2021-06-17 17:24:43 +01:00
Ahmed Mezghani
eecff020f2 Fix ServerGroupsAndResources docs typo
Rename ServerResources -> ServerGroupsAndResources in ServerGroupsAndResources's doc-string.

Kubernetes-commit: c673e166383abff887f63900d3aff8bb2b58fb55
2021-06-17 12:26:05 +02:00
Chun Chen
d478a5752d Pass DeleteOptions down to the Reactor
Co-authored-by: Mo Khan <theenjeru@gmail.com>

Kubernetes-commit: 621970476f8f06419716325d573580be7b3378d9
2021-06-17 18:06:47 +08:00
Kubernetes Publisher
0a7756a242 Merge pull request #102441 from feiskyer/update-vendor
Update Azure Go SDK to v55.0.0

Kubernetes-commit: 122d6352452f3f4a2d52bdb8b114b6e0ec49358e
2021-06-17 02:01:31 +00:00
dprotaso
c6c0ca0e1e Simplify use of the fake dynamic client
With the introduction of GVK to the fake dynamic client it made using
the fake much more cumbersome.

Specifically:
- requires manual registration of list types
- mismatch between scheme types and passed in fixtures would result in errors

The PR changes the constructor method NewSimpleDynamicClient to do the following:
- rewire the schemes to unstructured types
- typed fixtures are converted to unstructured types
- automatically register fixture gvks with the scheme

This should make the dynamic client 'flexible' with it's inputs like it was
before

Kubernetes-commit: 418fa71b6b1d1fba930daaba1f8ecf55070b4bdf
2021-06-16 14:51:00 -04:00
Michael Morello
728eec7196 Return StatusError 404 in fake client when resource is not found
Kubernetes-commit: a93ad421ee949ef0ba6e3cd1c701a91dfefa62f6
2021-06-16 08:27:15 +02:00
Mohamed chiheb Ben jemaa
77d744302e Update github.com/googleapis/gnostic to v0.5.5 and updating transitive dependencies go-cmp, protobuf,, to adapt the latest gnostic release which cosists of [Update protos for Go protoc plugin compatibility]
Kubernetes-commit: c691386fef727a5494e3ab02b99196d8f6418241
2021-06-13 17:25:55 +01:00
Seth Rutner
d5f964d7ae Update README.md
This won't work if the ImagePullPolicy is not set to never as it tries to pull it.
2021-06-09 12:43:39 -07:00
Kubernetes Publisher
25e061e062 sync: remove Godeps/ 2021-06-09 11:58:24 +00:00
Kubernetes Publisher
3ecbde32b7 Merge pull request #102454 from wzshiming/clean/remove-godeps
Remove Godeps

Kubernetes-commit: 09a9e612947bb2d940224245890048d3e60d4c5d
2021-06-08 23:48:38 +00:00
Kubernetes Publisher
27d803afea Merge pull request #102606 from tkashem/revert-102581
Bring back "client-go: add retry logic for Watch and Stream" and fix test flake

Kubernetes-commit: b429c4c9e1b3004953dfa42e46ac901bdc9e4460
2021-06-07 23:48:53 +00:00
Kubernetes Publisher
ded678f91e Merge pull request #102412 from andrewsykim/kill-service-topology
Remove deprecated alpha Service topologyKeys field

Kubernetes-commit: 7ed2ed1b454fe8f09adf729c6cb814611634fea1
2021-06-04 19:56:50 +00:00
Abu Kashem
fc210d907d client-go: fix flake in test TestRequestWatchWithRetry
Kubernetes-commit: e797a5a1989373275311b745faf0ff97f5d61000
2021-06-04 15:12:48 -04:00
Abu Kashem
bbd71da939 Revert "Merge pull request #102581 from liggitt/revert-watch-retry"
This reverts commit 5a59a43957c6743995dac67fdda42bf8e0a9ca77, reversing
changes made to 81b9789eaa7bc067f417b5e74d5695dd6dd88a46.

Kubernetes-commit: 892d4fabb845e2461e3655aa414beb6ac322fc99
2021-06-04 13:45:26 -04:00
Kubernetes Publisher
742abf77bc Merge pull request #100939 from wzshiming/feat/subresource-match
Feature support FakeClientset match subresource

Kubernetes-commit: 5c137f1af94e23a71e7a7a3dad037f1193147778
2021-06-04 11:48:38 +00:00
Kubernetes Publisher
7801ce34b4 Merge pull request #102581 from liggitt/revert-watch-retry
Revert "client-go: add retry logic for Watch and Stream"

Kubernetes-commit: 5a59a43957c6743995dac67fdda42bf8e0a9ca77
2021-06-04 11:48:37 +00:00
Kubernetes Publisher
71f81dc715 Merge pull request #102467 from pacoxu/json-patch-5.5.0
upgrade json-patch to v4.11.0

Kubernetes-commit: 81b9789eaa7bc067f417b5e74d5695dd6dd88a46
2021-06-04 11:48:35 +00:00
Kubernetes Publisher
2a923d5fc6 Merge pull request #102059 from jsafrane/fix-consistentread
Retry reading /proc/mounts when unable to get a consistent read

Kubernetes-commit: 38783bfeb70f5d25262d195a779fbcfb72c73633
2021-06-04 07:48:48 +00:00
pacoxu
8e66c0aa21 upgrade gopkg.in/evanphx/json-patch to v4.11.0
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 6e0650e3e132a5145a83b287fb90a30b5581bcac
2021-06-04 13:15:09 +08:00
Jordan Liggitt
5ba99a7f80 Revert "client-go: add retry logic for Watch and Stream"
This reverts commit 607d3819498e64d969407c3d7cbbb8f53d98f0d4.

Kubernetes-commit: e35af41a1236943b6510a25cfb8cb47855aaa16e
2021-06-04 01:11:25 -04:00
Kubernetes Publisher
fd12ff341f Merge pull request #102572 from JonZeolla/remove-insecure-curl-suggestion
Remove -k from toCurl output

Kubernetes-commit: be5874f959b6bc0122aa005e365943cb84f669a2
2021-06-03 15:53:02 -07:00
Jon Zeolla
a3215d72fd Remove -k from toCurl output
Kubernetes-commit: 5bf7bb52fe4c95e09b812e6c43eeed7abdd6d90f
2021-06-03 15:11:03 -04:00
Joe Betz
9ffcd1697f Add doc.go for client-go apply support
Kubernetes-commit: f94391789f14ec6bf534696afa2a61a357c817a2
2021-06-02 12:23:25 -07:00
Kubernetes Publisher
09dbda0b38 Merge pull request #102063 from tdihp/fix/azure-auth-refresh
Azure auth forwarding adal refresh error to azureTokenSource

Kubernetes-commit: eee6e54ecf364ee0529788eb5ad72d4ffaccf1b4
2021-06-02 03:48:13 +00:00
Kubernetes Publisher
caa2ddeb89 Merge pull request #102409 from dims/bump-golang.org/x/text-to-v0.3.6
Bump golang.org/x/text to v0.3.6

Kubernetes-commit: e0cb30170415cc122226360f722126930b451f88
2021-06-01 19:48:40 +00:00
Kubernetes Publisher
56494c9682 Merge pull request #102107 from tkashem/client-go-retry
client-go: add retry logic for Watch and Stream

Kubernetes-commit: 9c2684150c4d4aed99c6f950f4bc4c0754720897
2021-06-01 15:48:31 +00:00
Pengfei Ni
5e7391919a Update Azure Go SDK to v55.0.0
Kubernetes-commit: b98824c55d95b8b3a1cf79adac44154bd1702e46
2021-06-01 01:30:43 +00:00
Kubernetes Publisher
ef2d8844e4 Merge pull request #102897 from liggitt/etcd-ga
Update to etcd v3.5.0 client

Kubernetes-commit: f5cf74ddff818236b8435370afa41a51f23dd532
2021-06-16 06:01:16 +00:00
Jordan Liggitt
ead3c96c7d Update to etcd v3.5.0 client
Kubernetes-commit: 6448181d95c8d6486ba8e9a2a92b4a8172ca1f8f
2021-06-15 19:01:32 -04:00
Kubernetes Publisher
80617fc032 Merge pull request #100488 from liggitt/protobuf
update etcd, grpc, protobuf dependencies

Kubernetes-commit: 3a47ddccdfb09e73758cebb2690ad2a014f67e23
2021-06-15 22:01:06 +00:00
Kubernetes Publisher
d412730e5f Merge pull request #99310 from ankeesler/exec-plugin-interactive
exec credential provider: InteractiveMode support

Kubernetes-commit: 37da905c0c673c9cb07ca724384d37e725602a0c
2021-06-15 09:46:01 -07:00
Jordan Liggitt
0ba74ec6bf Update protobuf,grpc,etcd dependencies
1. Updated etcd/protobuf/grpc dependencies:

echo "
hack/pin-dependency.sh github.com/golang/protobuf latest
hack/pin-dependency.sh google.golang.org/protobuf latest
hack/pin-dependency.sh go.etcd.io/etcd/api/v3 v3.5.0-rc.0
hack/pin-dependency.sh go.etcd.io/etcd/client/v3 v3.5.0-rc.0
hack/pin-dependency.sh go.etcd.io/etcd/client/pkg/v3 v3.5.0-rc.0
hack/pin-dependency.sh go.etcd.io/etcd/pkg/v3 v3.5.0-rc.0
hack/pin-dependency.sh go.etcd.io/etcd/server/v3 v3.5.0-rc.0
hack/pin-dependency.sh go.etcd.io/etcd/tests/v3 v3.5.0-rc.0
hack/pin-dependency.sh google.golang.org/grpc latest
" | bash

2. Linted transitive dependencies until versions are clean:

hack/lint-dependencies.sh  | grep "  hack/pin-dependency.sh" | bash

3. Linted dependencies until dropped versions are clean:

hack/lint-dependencies.sh  | grep "dropreplace" | bash

4. Updated vendor and internal modules:

hack/update-vendor.sh
hack/update-internal-modules.sh

Repeated steps 2-4 until clean

Kubernetes-commit: 5cfc39ef5e90002080ff1f2bc4b7ade674c225f1
2021-06-15 10:06:09 -04:00
Andrew Keesler
37ed584bed exec credential provider: InteractiveMode support
The value here is that the exec plugin author can use the kubeconfig to assert
how standard input is treated with respect to the exec plugin, e.g.,
- an exec plugin author can ensure that kubectl fails if it cannot provide
  standard input to an exec plugin that needs it (Always)
- an exec plugin author can ensure that an client-go process will still call an
  exec plugin that prefers standard input even if standard input is not
  available (IfAvailable)

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: cd83d89ac94c5b61fdd38840098e7223e5af0d34
2021-06-14 17:15:36 -04:00
Kubernetes Publisher
1bccfc8c60 Merge pull request #102788 from pohly/reflector-log-level
client-go: reduce log level of reflector again

Kubernetes-commit: 60a4cbfdf617b94a28a76b302fd4cf04a704667c
2021-06-11 01:40:49 +00:00
Patrick Ohly
67de95ce2f client-go: reduce log level of reflector again
https://github.com/kubernetes/kubernetes/pull/87795 most likely
unintentionally increased the log level of "Starting reflector" and
"Stopping reflector", with the result that since Kubernetes 1.21
clients have printed that message by default. This is undesirable, we
should use the original level 3 again.

Kubernetes-commit: fd972934e4916879b04508686302659ce82cfa75
2021-06-10 20:36:02 +02:00
Shiming Zhang
b7739d8a13 Remove Godeps
Kubernetes-commit: 1431eab36d3e0468482aa234651ab878022a49e1
2021-05-31 17:44:41 +08:00
Andrew Sy Kim
cc4f429c89 apis: update generated code after removing Service topologyKeys
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

Kubernetes-commit: f119b8df5f2fb88f73fbbd1a20e7aa397fe3f5eb
2021-05-28 12:20:07 -04:00
Davanum Srinivas
f2bdce0a84 Bump golang.org/x/text to v0.3.6
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: f924906173740342253bbae16fab695709d711ee
2021-05-28 11:07:25 -04:00
Kubernetes Publisher
ccac415190 Merge pull request #100842 from ravisantoshgudimetla/add-minReadySeconds-ss
api: Add min ready seconds & availablereplicas for statefulsets

Kubernetes-commit: a98d3d0700f6bea05711260d67603accb23ad143
2021-05-26 22:56:11 +00:00
Ben Swartzlander
0cb2597950 Add DataSourceRef field to PVC spec
Modify the behavior of the AnyVolumeDataSource alpha feature gate to enable
a new field, DataSourceRef, rather than modifying the behavior of the
existing DataSource field. This allows addition Volume Populators in a way
that doesn't risk breaking backwards compatibility, although it will
result in eventually deprecating the DataSource field.

Kubernetes-commit: 00dba76918e8ce5b5cff6719bbd64c2cd38ad4e2
2021-05-26 15:10:26 -04:00
Kubernetes Prow Robot
507a20486c Merge pull request #974 from dims/drop-outdated-broken-widgets
Drop outdated/broken widgets in README
2021-05-26 11:39:38 -07:00
Davanum Srinivas
f5566ffc0e Drop outdated/broken widgets in README
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-26 14:31:24 -04:00
Kubernetes Publisher
fe090a55f1 Merge pull request #102332 from pacoxu/klog-2.9.0
Bump klog to 2.9.0, fixing byte array display

Kubernetes-commit: 3726309bf9d59bccf28b9e22e1573764a5dd3fb5
2021-05-26 15:01:37 +00:00
Kubernetes Publisher
07ab04df8d Merge pull request #98077 from jayunit100/jay-netpol-win
NetworkPolicy E2E enablement for Windows

Kubernetes-commit: 494dc731d73df8ee71888516821b3c7f229ba3bb
2021-05-26 15:01:34 +00:00
pacoxu
6b087d20f4 upgrade klog to v2.9.0
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 876174125bc0e0dda67fbe3d7ec7c4eb41ac5f69
2021-05-26 19:16:06 +08:00
jay vyas
7a25584131 Implement a windows Netpol NewModel
Kubernetes-commit: 8651fcb25a7a432c429d00ffa975555ad002010f
2021-05-25 10:03:21 -04:00
Kubernetes Publisher
39cb8cd8c1 Merge pull request #102217 from tkashem/client-go-refactor-retry
client-go: refactor retry logic so it can be reused

Kubernetes-commit: a8985871f9d8e069efdc6b82f41dbed8a39389ee
2021-05-24 18:56:28 +00:00
Kubernetes Publisher
228dada995 Merge pull request #102241 from lunhuijie/optimizationReturn
simplify returning boolean expression in staging/src/k8s.io/client-go/tools

Kubernetes-commit: d8e9f93358fe1e2e9603242dc5c0795e7e339812
2021-05-24 15:12:06 +00:00
Jan Safranek
50a473ddd5 Bump k8s.io/utils
To get io/ConsistentRead updates.

Kubernetes-commit: 1d16f934b9410496238b74b0664bd466f64277b3
2021-05-24 12:14:36 +02:00
刁浩 10284789
5b0c7191ef simplify returning boolean expression in staging/src/k8s.io/client-go/tools
Signed-off-by: 刁浩 10284789 <diao.hao@zte.com.cn>

Kubernetes-commit: 9173414da6d1c70436b256d6068e3737a7434f6a
2021-05-24 07:15:36 +00:00
Kubernetes Publisher
614c59d0d6 Merge pull request #102175 from ankeesler/exec-plugin-with-basic-auth
exec credential provider: don't run exec plugin with basic auth

Kubernetes-commit: 863e22cc9378942b2494aa9749626d1c90986ce9
2021-05-21 19:15:14 +00:00
Peri Thompson
dab51bb570 Add netpol tests for windows
Co-authored-by: Jay Vyas <jvyas@vmware.com>

Kubernetes-commit: 69019a03d3ac43823e7a739c01d3eeac86d699c0
2021-05-21 16:13:32 +01:00
Abu Kashem
239ec44d74 client-go: refactor retry logic so it can be reused
Kubernetes-commit: 5fdf196b4e9bbba036a43f4c3b5d9ed8af1672cc
2021-05-20 16:54:19 -04:00
Monis Khan
e2b531141a Deprecate azure and gcp in-tree auth plugins
With the client-go credential plugin functionality going GA in 1.22,
it is now time to deprecate these legacy integrations.

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 6bfaeaf91658835aeea267500299de1c4a35a248
2021-05-20 11:54:16 -04:00
Andrew Keesler
9edbd9bed3 exec credential provider: don't run exec plugin with basic auth
If a user specifies basic auth, then apply the same short circuit logic
that we do for bearer tokens (see comment).

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 9dee2b95c27a9d61c2bade8fe67f120b5853c4d6
2021-05-20 09:17:17 -04:00
Kubernetes Publisher
d1fa200aef Merge pull request #102147 from kolyshkin/update-runc-rc94-take-II
vendor: bump runc to rc95

Kubernetes-commit: 5de1a754c8f875cacfa49b9c5ed63c6c35b7e9e5
2021-05-21 07:12:12 +00:00
Kubernetes Publisher
dd8d430f4c Merge pull request #99576 from marosset/windows-host-process-work
Windows host process work

Kubernetes-commit: 6e4e32985a1eef3c5bcc6fff8e10e4bfef770d08
2021-05-20 23:12:04 +00:00
Kubernetes Publisher
13cd91989c Merge pull request #102090 from mengjiao-liu/fix-data-race-csi
Prevent data race condition  in csi unit tests

Kubernetes-commit: 150675b1642e4769f029b4c4054b458e8a6e3700
2021-05-20 03:11:37 +00:00
Kubernetes Publisher
b0c8a7cef1 Merge pull request #102111 from dims/update-testing-related-deps-for-1.22
Update testing related dependencies (ginkgo|gomega|testify)

Kubernetes-commit: bacab40a9f9380e968406e91483bdc81f1b41bb0
2021-05-19 19:11:42 +00:00
Kir Kolyshkin
c7a06444ea vendor: bump runc to rc95
runc rc95 contains a fix for CVE-2021-30465.

runc rc94 provides fixes and improvements.

One notable change is cgroup manager's Set now accept Resources rather
than Cgroup (see https://github.com/opencontainers/runc/pull/2906).
Modify the code accordingly.

Also update runc dependencies (as hinted by hack/lint-depdendencies.sh):

        github.com/cilium/ebpf v0.5.0
        github.com/containerd/console v1.0.2
        github.com/coreos/go-systemd/v22 v22.3.1
        github.com/godbus/dbus/v5 v5.0.4
        github.com/moby/sys/mountinfo v0.4.1
        golang.org/x/sys v0.0.0-20210426230700-d19ff857e887
        github.com/google/go-cmp v0.5.4
        github.com/kr/pretty v0.2.1
        github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kubernetes-commit: f3cdfc488e88714f2fe695e35ad0d3f8e45ddc25
2021-05-19 09:59:29 -07:00
Davanum Srinivas
36ff79f048 update testing related dependencies
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 0803ea49b95579195fc55b4a64a6e859932dba7f
2021-05-18 19:31:47 -04:00
Kubernetes Publisher
03f765c56a Merge pull request #102094 from liggitt/revert-runc
Revert "Merge pull request #101888 from kolyshkin/update-runc-rc94"

Kubernetes-commit: 1295b2c4b59b8bba58186294eb2d76a7ecb4987e
2021-05-18 19:22:54 +00:00
Abu Kashem
55854fadb1 client-go: add retry logic for Watch and Stream
Kubernetes-commit: 607d3819498e64d969407c3d7cbbb8f53d98f0d4
2021-05-18 15:15:28 -04:00
Jordan Liggitt
940ff81aa0 Revert "Merge pull request 101888 from kolyshkin/update-runc-rc94"
This reverts commit b1b06fe0a4d80ac0fd67fae56f29a3710934a256, reversing
changes made to 382a33986b043f78a42d3d865d0ca383687bf171.

Kubernetes-commit: 4b45d0d921051627c43d5fc014e383a6cb872ade
2021-05-18 09:12:04 -04:00
Kubernetes Publisher
da281643cf Merge pull request #101888 from kolyshkin/update-runc-rc94
vendor: bump runc to rc94

Kubernetes-commit: b1b06fe0a4d80ac0fd67fae56f29a3710934a256
2021-05-18 10:29:38 +00:00
Kubernetes Publisher
253f58be50 Merge pull request #101817 from cndoit18/add-events-expansion
Add fieldSelector builder function to events.

Kubernetes-commit: a8f68f9aba47261c22ef178b58b615e00b6726d0
2021-05-18 10:29:35 +00:00
Mengjiao Liu
8cb6ac7646 Prevent data race condition in csi unit tests
Kubernetes-commit: 92d0f8e6cc3b3d40194759afa4c7f2880dd5ada4
2021-05-18 18:00:03 +08:00
Ping He
88929e8a2b Azure auth forwarding adal refresh error to tokenSource, fixes error when token refresh fails.
Signed-off-by: Ping He <tdihp@hotmail.com>

Kubernetes-commit: e105611d3a732a5b7bf34cf48f60b5a785181e6f
2021-05-17 22:02:52 +08:00
ravisantoshgudimetla
906f6d916e generated: Changes for api introduced
Kubernetes-commit: 5464b649812f08c7edaa1f5c39c93ce1e96cfbb4
2021-05-17 08:23:22 -04:00
Alexander Constantinescu
22aa998def [queue] Implement ShutDownWithDrain allowing the queue to drain when shutting down
Signed-off-by: Alexander Constantinescu <aconstan@redhat.com>

Kubernetes-commit: 5b740f430e0a4892e9db3a1fea9f349a06267755
2021-05-12 02:26:22 +02:00
Kir Kolyshkin
56ee358fec vendor: bump runc to rc94
One notable change is cgroup manager's Set now accept Resources rather
than Cgroup (see https://github.com/opencontainers/runc/pull/2906).
Modify the code accordingly.

Also update runc dependencies (as hinted by hack/lint-depdendencies.sh):

	github.com/cilium/ebpf v0.5.0
	github.com/containerd/console v1.0.2
	github.com/coreos/go-systemd/v22 v22.3.1
	github.com/godbus/dbus/v5 v5.0.4
	github.com/moby/sys/mountinfo v0.4.1
	golang.org/x/sys v0.0.0-20210426230700-d19ff857e887
	github.com/google/go-cmp v0.5.4
	github.com/kr/pretty v0.2.1
	github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kubernetes-commit: b49744f177087173d43d7771588d83b9df5a3c0b
2021-05-10 18:12:04 -07:00
cndoit18
39e54e70d0 Add fieldSelector builder function to events.
Signed-off-by: cndoit18 <cndoit18@outlook.com>

Kubernetes-commit: 678e10f990ec187052a5a984e6ab180c13a7365e
2021-05-08 08:40:45 +08:00
Kubernetes Publisher
3cca9d72c1 Merge pull request #98057 from zerodayz/wrong-output-with-jsonpath
[jsonpath] fix wrong output when using jsonpath

Kubernetes-commit: 586ea8a482a2b5c01831b083ff6bd7b25d657f11
2021-05-18 10:29:31 +00:00
Kubernetes Publisher
9a82c6a51a Merge pull request #100940 from markusthoemmes/fake-client-interface
Implement a FakeClient interface

Kubernetes-commit: 8da9d2ff55ad98a685978dd690d66dfb4eb9c1fd
2021-05-18 10:29:28 +00:00
Kubernetes Publisher
2ed8b30810 Merge pull request #101707 from enj/enj/i/bad_cadata
client-go transport: assert that final CA data is valid

Kubernetes-commit: 9126048c9c47cc51f15f977da51c6023229a02b5
2021-05-18 10:29:24 +00:00
Monis Khan
776e602643 client-go transport: assert that final CA data is valid
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 440ea3ef49e0ac77353ceeaebc2aad6c995d5b35
2021-05-03 10:11:54 -04:00
Yusuke Tsutsumi
db078d2f1b client-go: NewSelfSignedCACert makes Go 1.15+ compatible cert (#100324)
* NewSelfSignedCACert makes Go 1.15+ compatible cert

As of Go 1.15, X.509 certificates without a SAN no longer
fall back to the CommonName of the certificate.

https://golang.org/doc/go1.15#commonname

Updating NewSelfSignedCACert to produce certificates that
work with this change.

* add missing license

Kubernetes-commit: a41a3ed4ae77a7902577bdb50b35fc5f42ed7c60
2021-05-18 10:29:21 +00:00
Kubernetes Publisher
341f59a1cb Merge pull request #101535 from adjika/feature/client-go_documentation
Fixes formatting and typos in client-go docs

Kubernetes-commit: a489c5a1f048d05cd234c52bbd7b78a06f4d79a6
2021-05-18 10:29:18 +00:00
kfu
6db26dd413 Fixes formatting and typos in client-go docs
Kubernetes-commit: d0de4483d51c5811202f1731a835c75d8fc8b30e
2021-04-27 21:28:23 +02:00
Kubernetes Publisher
c850435001 Merge pull request #101252 from smarterclayton/certificate_logging_upstream
Add type logging to certificate manager

Kubernetes-commit: 4f36038c0bc575cd33bc53017ed1e20184efae73
2021-05-18 10:29:15 +00:00
Kubernetes Publisher
e1f818cd3b Merge pull request #93412 from thinpark/fix.vardoc
[k8s.io/client-go/discovery/discovery_client]: CustomResourceDefinition

Kubernetes-commit: a8124860d2211943ba955d5953c01452b4bacfee
2021-05-18 10:29:13 +00:00
Kubernetes Publisher
b401b11652 Merge pull request #101002 from GreenApple10/feature/mod_timer
Change time.Now().Sub(x) to time.Since(x) for cleanup

Kubernetes-commit: 7cad93ac63126d68c0d12aa07a3aca2f6faf6287
2021-05-18 10:29:11 +00:00
Kubernetes Publisher
47b3cad4de Merge pull request #100496 from jpbetz/extract-subresources
Add subresource support to client-go apply extract

Kubernetes-commit: 10f7e189c2b07888211bc5a2b216b186a9e7e8a9
2021-05-18 10:29:09 +00:00
Kubernetes Publisher
d3fbdeba9a Merge pull request #101357 from feiskyer/update-vendor
Update Azure Go SDK version to v53.1.0

Kubernetes-commit: 253685779f15d2bf1ebf8354474761752edd8d6e
2021-05-18 10:29:06 +00:00
Kubernetes Publisher
9c26abce64 Merge pull request #97964 from sxllwx/avoid/alloc_array
modify the elements in the array directly without allocating a new array

Kubernetes-commit: c1336094a3ccaa497c8074c888f92d4093aa3360
2021-05-18 10:29:04 +00:00
Kubernetes Publisher
cfd0d8a109 Merge pull request #94120 from Dean-Coakley/fix-listWatchUntil-comment
Remove outdated comment on `wait.Until`

Kubernetes-commit: 74b290a77ca8799684f808b8446c24148849d161
2021-05-18 10:29:01 +00:00
Kubernetes Publisher
071918f6b2 Merge pull request #101034 from verb/1.22-ec-api
Switch alpha Pod ephemeralcontainers API to use Pod kind

Kubernetes-commit: 972ee2d425333d0b30f340328ef6c7dc40fd2715
2021-05-18 10:28:59 +00:00
Kubernetes Publisher
d696ff0aad Merge pull request #101162 from ihcsim/fix-malformed-request-logs
Fix Client-Side Request Throttling Malformed Logs

Kubernetes-commit: d3fbbfab5f928afe74ac9a6554b57008f3366d8f
2021-05-18 10:28:56 +00:00
Kubernetes Publisher
ae85206fc5 Merge pull request #101234 from gautierdelorme/rm-go-openapi-spec
eliminate dependency on go-openapi/spec

Kubernetes-commit: 565d5f456242fcc79b7540a4c4913c7577cbfc7d
2021-05-18 10:28:54 +00:00
Pengfei Ni
bee3e6b192 Update Azure Go SDK version to v53.1.0
Kubernetes-commit: bee44da7a258bbe3996ad3cc38d905ae9a28271e
2021-04-22 11:45:39 +08:00
Gautier Delorme
d60baad65c bump k8s.io/kube-openapi
Signed-off-by: Gautier Delorme <gautier.delorme@gmail.com>

Kubernetes-commit: bcdde6bf75c7e177b44e58c5313e405c22d8d46d
2021-04-20 17:43:59 +02:00
Kubernetes Publisher
4e3d560817 Merge pull request #101269 from 3Xpl0it3r/master
remove duplicatd description in comment

Kubernetes-commit: 425859b7d6cf805a177e77c3e14faf5f95935aed
2021-05-18 10:28:50 +00:00
Kubernetes Publisher
db0131be28 Merge pull request #101174 from lojies/cleanupcertificate_manager_test
code cleanup:remove repeated package import in client-go

Kubernetes-commit: 2c1b0573c479d213f64db0e83c7d93d7895b8b4b
2021-05-18 10:28:48 +00:00
Kubernetes Publisher
bfec2914ea Merge pull request #100490 from howardjohn/gnostic-v051
Update kube-openapi and gnostic dependencies

Kubernetes-commit: c555b23f1c84bcdd1d87a7ae831675281f5c0c94
2021-05-18 10:28:47 +00:00
Kubernetes Publisher
10997424fc Merge pull request #100737 from Iceber/fix-delta-fifo
client-go/cache: fix the AddIfNotPresent method of the DeltaFIFO

Kubernetes-commit: 1c9563d5d5e6345fc2f1a835b456a8ce916474bf
2021-05-18 10:28:43 +00:00
3Xpl0it3r
abc6b41ce3 remove duplicatd description in comment
Kubernetes-commit: 21c15d197348987a572d0048e469ab860f409fa1
2021-04-20 13:44:58 +08:00
Kubernetes Publisher
8c8fa70f7a Merge pull request #100970 from apelisse/add-subresource-managedfields
Add subresource managedfields

Kubernetes-commit: 0f1d105f8d3e114f0bf47307513fe519a71351a2
2021-04-17 15:57:31 +00:00
卢振兴10069964
b1c481c6d5 code cleanup:remove repeated package import in client-go
Kubernetes-commit: 243dab458753002dae5741042840b21f9b831fbc
2021-04-16 08:40:30 +08:00
Ivan Sim
c8704063ca Fix the missing format specifier error in log output
The message argument is mistakenly used as the format specifier, if it
contains the special '%' characters. This causes many '[%d|%s](MISSING)'
errors in the API server logs.

Signed-off-by: Ivan Sim <isim@redhat.com>

Kubernetes-commit: b1d0d401875b2076e73183f8468ecb95c3fe61aa
2021-04-15 15:26:57 -07:00
Clayton Coleman
3faf506116 Add type logging to certificate manager
Kubelet cert rotation involves two certificate manager instances
(one for client and one for server certs) and the log lines are
identical and confusing. Since certificate manager is a utility
library it is also inappropriate to simply assume klog output is
sufficient.

certificate.Manager now accepts a Name and Logf function on its
config struct to identify the purpose of the manager and to
provide a way to redirect where output should go. If Name is
absent, the name is defaulted from the SignerName, and if that
is not found then the name is set to "client auth" if that is
a provided key usage, or "certificate" otherwise. If Logf is
not provided it defaults to klog.V(2). as today. The name is printed
in "foo: bar" form on every line, but can be converted to structured
logging in the future. The log level is not customizable and it
is up to the caller to decide whether that is an issue.

Some log messages are slightly cleaned up to more clearly indicate
their intent. One log message is removed in a utility function that
was already at v(4) and less likely to be needed.

The default behavior of the certificate manager is as before and
the kubelet now identifies the server and client signerName as
separate entities:

I0414 19:07:33.590419    1539 certificate_manager.go:263] kubernetes.io/kube-apiserver-client-kubelet: Rotating certificates
E0414 19:07:33.594154    1539 certificate_manager.go:464] kubernetes.io/kube-apiserver-client-kubelet: Failed while requesting a signed certificate from the master: cannot create certificate signing request: Post "https://...

Kubernetes-commit: 64c669bd0ac8fda39ba97f48ef887ac1f77fb014
2021-04-14 13:30:46 -04:00
Lee Verberne
2d8ed52d60 Generated code for Pod-based ephemeralcontainers
Kubernetes-commit: d8ee5ab09e0a0f476e2fe07014a453f572fb53a3
2021-04-12 17:28:29 +02:00
c00522440
ca138c86e8 Change time.Now().Sub(x) to time.Since(x) for cleanup
Kubernetes-commit: 878548ceac9c109881c379911b8b0d8fce5ea68e
2021-04-12 10:27:54 +08:00
Lee Verberne
0e8029b277 Switch ephemeralcontainers SR to Pod Kind
This changes the `/ephemeralcontainers` subresource of `/pods` to use
the `Pod` kind rather than `EphemeralContainers`.

When designing this API initially it seemed preferable to create a new
kind containing only the pod's ephemeral containers, similar to how
binding and scaling work.

It later became clear that this made admission control more difficult
because the controller wouldn't be presented with the entire Pod, so we
updated this to operate on the entire Pod, similar to how `/status`
works.

Kubernetes-commit: d22dc5cb72a627341f4004b5d58d275f3d8773b3
2021-04-09 13:53:13 +02:00
Shiming Zhang
87154808e1 Support subresource match
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>

Kubernetes-commit: 58833d652d59229d49f001256f6ade4a46ae53ca
2021-04-09 12:55:57 +08:00
Shiming Zhang
ce9fcb2fe0 Add test
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>

Kubernetes-commit: 2c9f02c3290ce7e8bcdc94bea7d96edf92834cd7
2021-04-09 13:07:46 +08:00
Iceber Gu
8269e41416 client-go/cache: fix the AddIfNotPresent method of the DeltaFIFO
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: c75bd4a535123f5032f78ffb246ed62b79617b44
2021-04-01 13:44:16 +08:00
John Howard
4b5d87d34b Update kube-openapi and gnostic dependencies
Pulling in https://github.com/kubernetes/kube-openapi/pull/220

Kubernetes-commit: a849c8998c1ed71f25387a560f8359596aec8bd3
2021-03-23 08:33:15 -07:00
Joe Betz
0fd603dad0 Re-generate extract functions
Kubernetes-commit: a24e8acc32d7c0380a7b2c8a2f500b48891a9987
2021-03-19 15:28:20 -07:00
Tomáš Kukrál
5783ea1040 fix typo in retry doc
Kubernetes-commit: 1dc4a29a1aed89b598cb728986526d00390cdadc
2021-03-19 17:28:28 +01:00
Markus Thömmes
3579fb3012 Implement a FakeClient interface
Kubernetes-commit: cf26825e3d9b89526e13bb53f74354593477205c
2021-03-15 14:47:24 +01:00
Matthew Cary
dba85b7a7b tests for statefulset PersistentVolumeClaimDeletePolicy api change
Change-Id: I07c8e31a8c76a6a1022c08fb749af7e353b731de

Kubernetes-commit: b259686b367ffef89310a71875834a97befc5b4b
2021-03-01 16:10:16 -08:00
Andrea Nodari
6767d6d397 Generated code
Kubernetes-commit: 93dffdc1af7f9cef48864e7764ffda16e230cab9
2021-02-28 11:10:41 +01:00
Kubernetes Publisher
f19995f46d sync: update go.mod 2021-04-17 03:49:25 +00:00
Kubernetes Publisher
d974964d12 Merge pull request #100768 from Iceber/fix-nested-key-error
client-go/cache: support errors.Unwrap for KeyError

Kubernetes-commit: 9b9a67ad530daeb397b1b74c0104e65b14d3ca21
2021-04-16 19:49:32 +00:00
Kubernetes Publisher
4e267f6cae Merge pull request #100724 from liggitt/eviction-v1beta1
Add policy/v1 Eviction support

Kubernetes-commit: 27a625cf8921007eaf115425b6d61587eb253e92
2021-04-16 19:49:31 +00:00
Kubernetes Publisher
0c029ff945 Merge pull request #100503 from jpbetz/patch-3
Add jpbetz to client-go reviewers

Kubernetes-commit: 1fc5eb3bf2a42a70272d32ed270ff9ccebb61607
2021-04-15 23:50:04 +00:00
Kubernetes Publisher
f7d41dd5f9 Merge pull request #101086 from enj/enj/i/auth_owners_gen
Prune stale entries from OWNERS files

Kubernetes-commit: 24350a922ea2b1b2a8aeba58e150fa90370a282b
2021-04-15 15:49:53 +00:00
Monis Khan
7998e982ab Prune stale entries from OWNERS files
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 91241eac9b7a7e62cc31e663147294bf6dc8f875
2021-04-07 10:38:27 -04:00
Kubernetes Publisher
44bedf8611 Merge pull request #100885 from enj/enj/i/auth_owners
Update sig-auth OWNERS

Kubernetes-commit: d51f15ed0d47aa81c572076877c69e3107ad3bfc
2021-04-13 07:21:13 +00:00
Huang Huang
0cfeb7fda9 Fix staticcheck failures for vendor/k8s.io/client-go/transport (#100429)
* Fix staticcheck failures for vendor/k8s.io/client-go/transport

* avoid the possibility of a hang

Kubernetes-commit: 02d20442a5a5f5e1d3f1ef8e6fb14945462bc36c
2021-04-11 11:29:15 +08:00
Kubernetes Publisher
945ba71363 Merge pull request #100878 from wojtek-t/backoff_watches_on_429
Handle 429 errors from watch requests in reflector library.

Kubernetes-commit: 860dfe112eafa40cab93fbb66ee8622faff70887
2021-04-11 03:21:19 +00:00
Kubernetes Publisher
196e360f9b Merge pull request #100873 from Iceber/events-cache-typo
fix typo in comment for EventAggregatorByReasonFunc

Kubernetes-commit: d0017afe771ecaeac1b15f008885f1e2a66b3217
2021-04-11 03:21:18 +00:00
Kubernetes Publisher
0bb6464b13 Merge pull request #100784 from kevindelgado/smd-to-4-1-1
Update structured-merge-diff to v4.1.1

Kubernetes-commit: 442b3218b3d3eecdd9e55bffcb2c6b135f3084b7
2021-04-11 03:21:17 +00:00
Kubernetes Publisher
980164c05c Merge pull request #100684 from Jefftree/atomic
Tag structs as atomic

Kubernetes-commit: 081ac6b5a9004b7c6cfe6a8b8f83e60eca58a010
2021-04-09 15:24:20 +00:00
Kubernetes Publisher
ebfab03aeb Merge pull request #100570 from tiloso/staticcheck-clientgo-discovery
Fix staticcheck in k8s.io/client-go/discovery

Kubernetes-commit: 3fd31f12ee51ec02bdbd1aebf8b1f71da6207285
2021-04-09 15:24:17 +00:00
Kubernetes Publisher
eaeb6e789c Merge pull request #100458 from yliaog/master
added yliaog as approver

Kubernetes-commit: 9f6c5db697537711475c22eb925b0e28c8e3ad49
2021-04-09 07:33:05 +00:00
Kubernetes Publisher
2f4b7a2220 Merge pull request #100355 from onesafe/master
Replace deprecated NewDeltaFIFO with NewDeltaFIFOWithOptions

Kubernetes-commit: 84da9397527ff41bcb0b12b55e72f2e3b90b5f0d
2021-04-09 07:33:04 +00:00
Kubernetes Publisher
af56ae8bf9 Merge pull request #100217 from 0daryo/fix-example-workqueue-option-readme
Remove non-existent log option in workqueue example

Kubernetes-commit: 49092ff7906f29ec7e1c47dcaa2666fee00e37c3
2021-04-09 07:33:00 +00:00
Kubernetes Publisher
064bf3ddb9 Merge pull request #100085 from markusthoemmes/add-tracker-for-dynamic
Add Tracker() function to fake dynamic client

Kubernetes-commit: c6e826a79fb96b1c3cb88363a7d410cbe3c116f8
2021-04-09 03:21:05 +00:00
Kubernetes Publisher
4841142cdc Merge pull request #99849 from jpbetz/apply-subresources
Add subresource apply support to client-go

Kubernetes-commit: 7807bb03ba566effea20782f754e82c035fa54c4
2021-04-08 23:21:25 +00:00
Kubernetes Publisher
50af76e8cd Merge pull request #99839 from saschagrunert/portforward-stream-cleanup
Cleanup portforward streams after their usage

Kubernetes-commit: 4fae6ae5d211f1a45998c30d4ec765668a8361aa
2021-04-08 23:21:22 +00:00
Kubernetes Publisher
ea390324ae Merge pull request #97989 from Danil-Grigorev/atomic-label-selectors
Make selectors atomic

Kubernetes-commit: 1e05d25890afa9b4547c5585d0978ef56dcf07ca
2021-04-08 23:21:21 +00:00
Kubernetes Publisher
c71768cb91 Merge pull request #97419 from d-kuro/d-kuro/fix-data-race
Fix the data race in the leaderelection package

Kubernetes-commit: 93314d84b1ef1ea53c15e5bb86de47cf58f83178
2021-04-08 23:21:18 +00:00
Kubernetes Publisher
c36b96a74b Merge pull request #95897 from roycaihw/doc/fake-client-with-informer
Fake client example: document how to handle a race with informer

Kubernetes-commit: 6f8a058e2c29680dccffd9df07765c10e1f69b53
2021-04-08 23:21:17 +00:00
Monis Khan
4f026b62ab Update auth OWNERS files to only use aliases
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: bca4993004953041c91ad56e37ef195b32066c27
2021-04-07 10:42:00 -04:00
Iceber Gu
d39ae5d18d fix typo in comment for EventAggregatorByReasonFunc
Kubernetes-commit: 70d795ff65667eb3f26dc1e9c46bc2a56892350a
2021-04-07 15:06:14 +08:00
Kevin Delgado
54f0cda234 Update structured-merge-diff to v4.1.1
Kubernetes-commit: 5f1b146852124e6c5ebfc2b69aee7dfa4fe6d158
2021-04-02 17:42:54 +00:00
Iceber Gu
fc03592e80 client-go/cache: support errors.Unwrap for KeyError
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: 85fa121f84ee33bdc8d77e7a35d1f4d2c063c28f
2021-04-02 10:17:57 +08:00
Jordan Liggitt
4c82a566d3 Generated files
Change-Id: Ibd7ac0392fd52ae7ce2f6864aefb47bf1b74f8c3

Kubernetes-commit: e22cd7dbc4d6b2c2de844811d15ed630312d2201
2021-03-31 15:39:55 -04:00
Jordan Liggitt
36954f768c Register Eviction v1
Kubernetes-commit: 40f8fb222491de331bb578413684a3388608e708
2021-03-31 15:39:41 -04:00
Kubernetes Publisher
67a7335497 Merge pull request #100660 from dims/common-auth-plugins-should-always-be-available
Common auth plugins should always be available

Kubernetes-commit: 3d48f0d1dd14216860adebd741550a8c955ab40b
2021-03-30 07:11:57 -07:00
Davanum Srinivas
3da4c9cb25 Common auth plugins should always be available
Whether `providerless` is present or not, the OIDC plugin
should be available.

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

Kubernetes-commit: b1e9fc4935e60092b4823bd67e82c4d2bfb1a7fc
2021-03-30 06:09:56 -04:00
Kubernetes Publisher
c8af929f7f Merge pull request #100606 from dims/providerless-tag-for-client-go-auth-plugins
Providerless tag for client go auth plugins

Kubernetes-commit: 26fc02a9e237025c59144872fcd123f1d880be57
2021-03-29 15:26:28 +00:00
Davanum Srinivas
6c816ada5f providerless tag for client-go auth plugins
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 1ac2d6f7fa45616ec968c39e66fbc526809edab7
2021-03-28 20:05:32 -04:00
tiloso
4820b53777 Fix staticcheck in k8s.io/client-go/discovery
Kubernetes-commit: dc16cf42852e25a70e1062b51b23c990f7f40c8a
2021-03-25 22:29:37 +01:00
Joe Betz
0d358cdc27 Add jpbetz to client-go reviewers
Kubernetes-commit: 7fa9da2cd6c6d56e9822a8eeee73a7232fa5c779
2021-03-23 16:49:17 -04:00
Yu Liao
1e560af237 added yliaog as approver
Kubernetes-commit: 1dbd5875e234e36a139fbee64072932aad8a75f6
2021-03-22 09:52:03 -07:00
Wang Yiping
aa707b1f81 Replace deprecated NewDeltaFIFO with NewDeltaFIFOWithOptions
Kubernetes-commit: 8dc45c8e0ecdefa37df8c118f38fa0767c5c52b0
2021-03-18 08:30:29 +08:00
wojtekt
03ebb2739b Handle 429 errors from watch requests in reflector library.
Kubernetes-commit: a9daa46d470e87ed328688bebd9314cc5ac0fc4a
2021-03-13 12:29:44 +01:00
Kubernetes Publisher
f6ce18ae57 Merge pull request #100156 from ehashman/issue-100155
Upgrade klog to avoid panics crashing components

Kubernetes-commit: 998f218606a149048e7b564ef27478bacab0f90f
2021-03-13 03:04:03 +00:00
Kubernetes Publisher
5f0702fefa Merge pull request #99375 from ehashman/probe-kep-2238
Add Probe-level terminationGracePeriodSeconds

Kubernetes-commit: faa5c8ccd4cb34c95d67b24bb35354a205ceee15
2021-03-12 10:58:23 +00:00
Elana Hashman
e5c17fcdd1 Bump klog to 2.8.0, fixing nil panics in KObj
Kubernetes-commit: 6b70c8bd8db844a5c2c26d2814b3306d83204a7a
2021-03-11 16:56:56 -08:00
Elana Hashman
2407de6b73 Generated changes for probe terminationGracePeriodSeconds
Kubernetes-commit: 7df1259d091322f2817b2db243f76470f61a3a7e
2021-03-11 16:40:40 -08:00
Kubernetes Publisher
a5722b416f Merge pull request #99759 from jpbetz/apply-extract
Add Extract support to client-go apply builders

Kubernetes-commit: eb0c118a9d7a15801ec0389448a5e1bffdaa5e72
2021-03-11 10:44:46 +00:00
Joe Betz
9cd23e7ffc Generate openapi and proto files
Kubernetes-commit: 5d86cff7c0518cd225b52794c51d2eae0dc75d1f
2021-03-10 21:07:09 -08:00
Markus Thömmes
57471dea7c Add Tracker() function to fake dynamic client
Kubernetes-commit: 4c4c78fd398899b4349c486063be6f4935cd92ce
2021-03-10 14:16:51 +01:00
Joe Betz
476d5f996a Generated apply configurations
Kubernetes-commit: e5a98bba6144935279509ec4defbb120d387e3fb
2021-03-07 14:49:10 -08:00
0daryo
2de7d23dca Remove non-existent log option
Kubernetes-commit: 3fbd3cf1cd55f99970a984f106006a02cce2c97b
2021-03-06 16:23:06 +09:00
Joe Betz
c36776731d Generate ApplyScale client support
Kubernetes-commit: 7a37df6d1ab8926a95574f0aab3a9978d20d4e35
2021-03-05 09:04:10 -08:00
Joe Betz
dbebceadf4 Add apply subresource support to client-go's typed client
Kubernetes-commit: 29423501f068d98d3e9addb9d56dd8fcf6ce4075
2021-03-05 08:09:32 -08:00
Sascha Grunert
0f6528b1f9 Cleanup portforward streams after their usage
This implements a stream cleanup when using portforwardings. Before
applying this patch, the streams []httpstream.Stream within
`spdy/connection.go` would fill-up for each streaming request. This
could result in heavy memory usage. Now we use the stream identifier to
keep track of them and finally remove them again once they're no longer
needed.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Kubernetes-commit: 6459ed6717d1851f9ca28e3f245672a6a62aa0bf
2021-03-05 13:39:04 +01:00
Joe Betz
9e347785cf Add extract apply function generation
Kubernetes-commit: 987657a80f12df5724e0d9cfb2d25d6c2bddd910
2021-02-26 14:17:39 -08:00
Joe Betz
982571f05a Bump SMD to v4.1.0
Kubernetes-commit: 5bc72f37a44fdfbf23ef1b29f2ec3a3efda2b5cc
2021-03-02 14:21:12 -08:00
Kubernetes Publisher
d6fad70fcf Merge pull request #99643 from pohly/generic-ephemeral-volume-beta
generic ephemeral volume beta

Kubernetes-commit: 410d092d8a13cc78ee9044e0aad194abbba1952b
2021-03-10 02:44:51 +00:00
Kubernetes Publisher
6085ad09f2 Merge pull request #99290 from mortent/PromotePDBsToGA
Promote PodDisruptionBudget to policy/v1

Kubernetes-commit: 046ad61479df0bfde00a25dff9d49c8025fa4f06
2021-03-09 22:47:50 +00:00
Kubernetes Publisher
814c68cfbc Merge pull request #99522 from robscott/topology-hints
Adding support for Topology Aware Hints

Kubernetes-commit: 207c75c6f7f25b1661e2063b7db6fc1a10bb58aa
2021-03-09 18:39:40 +00:00
Kubernetes Publisher
67d8c554b3 Merge pull request #99495 from wojtek-t/cleanup_describe_8
Move ownership of core events test to sig-instrumentation

Kubernetes-commit: 16e9c682ff48c8954ac956013a1622b3acff0c37
2021-03-09 14:39:34 +00:00
Kubernetes Publisher
db49dde90f Merge pull request #98973 from YoyinZyc/add_context_outside_apiserver
Apply context to restclient and serviceaccount metrics

Kubernetes-commit: 9457a5c3d8dd3892bb1133faa58d20399e05e871
2021-03-09 10:54:49 +00:00
Kubernetes Publisher
57d5462f1c Merge pull request #98946 from monopole/upgradeKustomize
Upgrade kustomize-in-kubectl to v4.0.5

Kubernetes-commit: ff3ccc58cd926260731c5e6f4a9405d595916369
2021-03-09 10:54:48 +00:00
Morten Torkildsen
fa732dd427 generated
Kubernetes-commit: 621aed4d323ef3064a77277e6396c4a6dd0a0fc5
2021-03-08 21:54:58 -08:00
monopole
1ae4d6910a until stable: pin-dependency, update-vendor, update-bazel, lint-dep
Kubernetes-commit: ba39d22e3976540d66fde0a650a7a463d75d5b17
2021-03-08 13:28:13 -08:00
Kubernetes Publisher
c2779356a2 Merge pull request #98727 from adtac/suspend
batch API: add suspended job

Kubernetes-commit: a0341d7471c238acd03e1923161b4a2671a7fe2d
2021-03-09 10:54:44 +00:00
Kubernetes Publisher
aa6ddc8e87 Merge pull request #99641 from pohly/storage-capacity-beta
CSIStorageCapacity beta API

Kubernetes-commit: 14c25eed8d07acdfaf882674f58fd2aa4cc7afe6
2021-03-09 10:54:41 +00:00
Adhityaa Chandrasekar
5ca42dac08 batch: add suspended job
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>

Kubernetes-commit: a0844da8f799e6f360193ecfd02c84d61a62958b
2021-03-08 11:50:02 +00:00
Rob Scott
9c787714aa Adding Hints to EndpointSlice API
Kubernetes-commit: 11f0944dbc70089e005f55b43d6507503a0491c5
2021-03-05 12:05:05 -08:00
wojtekt
4c5ab17317 Add sig-instrumentation approvers to events libraries OWNERS
Kubernetes-commit: 569626109af6d2dd40271efc9da84ea69308fccb
2021-03-05 16:45:20 +01:00
Patrick Ohly
37e7f4ab73 generic ephemeral volume: generate code
This is the result of "make update" minus the testdata update which
will be committed separately.

Kubernetes-commit: 52b758c9b634fa56ab923c31dbf9e312b1a0c171
2021-03-03 18:09:55 +01:00
Patrick Ohly
9f9bfd997e CSIStorageCapacity: generated files for beta
Kubernetes-commit: 2b062a62812ab3f33df5bc8839f0201b9087aa93
2021-03-03 12:44:52 +01:00
Kubernetes Publisher
7fc57bbd48 Merge pull request #96600 from maplain/internal-traffic-policy
Service Internal Traffic Policy

Kubernetes-commit: 2783f2f76ec57b9831b91e6c4b35d35cee4345e7
2021-03-08 21:24:58 +00:00
marosset
5d46949a09 API support for Windows host process containers
Co-authored-by: James Sturtevant <jstur@microsoft.com>

Kubernetes-commit: 93da0fd45d98176dc7f0def1e26530f99f9d9f08
2021-02-26 12:26:01 -08:00
Morten Torkildsen
62b9b26f6e Promote PDBs to GA
Kubernetes-commit: 21fba79d453b0bab7153f46916126c754d10341e
2021-02-20 12:56:31 -08:00
yoyinzyc
6a42ca30ba add context to restclient metrics
Kubernetes-commit: 69d40a1de7bc765647d8ef392fe406429fded807
2021-02-04 18:23:26 -08:00
Aldo Culquicondor
3bb4101a36 Add Job.status.uncountedPodUIDs
For tracking Job Pods that have finished but are not yet counted as failed or succeeded

And feature gate JobTrackingWithFinalizers

Change-Id: I3e080f3ec090922640384b692e88eaf9a544d3b5

Kubernetes-commit: bb56a0bd04891ae0a4aebeaeb4d145b32d9ad2d9
2021-01-18 13:36:03 -05:00
Robin Černín
b6d16d4e18 [jsonpath] fix wrong output when using jsonpath
Fix range loop when using jsonpath

Without patch:

kubectl get -n openshift-oauth-apiserver po -o jsonpath='{range .items[?(.status.phase=="Running")]}{.metadata.name}{" is Running\n"}'
apiserver-7d9cc97649-79c2x is Running
apiserver-7d9cc97649-lgks6 is Running
apiserver-7d9cc97649-qgkxn is Running
 is Running

With patch:

kubectl get -n openshift-oauth-apiserver po -o jsonpath='{range .items[?(.status.phase=="Running")]}{.metadata.name}{" is Running\n"}'
apiserver-7d9cc97649-79c2x is Running
apiserver-7d9cc97649-lgks6 is Running
apiserver-7d9cc97649-qgkxn is Running

Kubernetes-commit: 39cfe232325d66bcdbc935af7aaf7022562e7010
2021-01-14 19:53:59 +10:00
Danil-Grigorev
11ceec1b24 Make selectors atomic
Ensure that all label selectors are treated as atomic values,
to exclude situations when selectors are being corrupted by
different actors attempting to apply their overlapping definition
for this field with server-side-apply.

Kubernetes-commit: d8a7764b6396b90313ae7bd50a845f4da4705d67
2021-01-12 18:29:56 +01:00
scott
c7901fa3e4 modify the elements in the array directly without allocating a new array
Kubernetes-commit: 238fce9357634502badbcc3704b0655cf8c378c3
2021-01-12 19:58:21 +08:00
d-kuro
b4027a90c4 Fix data race for leaderelection package
Kubernetes-commit: 8eda5521c041bbcd5ad19b3cfff49202e7eb5d22
2020-12-21 22:21:42 +09:00
Fangyuan Li
9baafcd261 Implements Service Internal Traffic Policy
1. Add API definitions;
2. Add feature gate and drops the field when feature gate is not on;
3. Set default values for the field;
4. Add API Validation
5. add kube-proxy iptables and ipvs implementations
6. add tests

Kubernetes-commit: 7ed2f1d94d694c6c4fdb4629638c38b1cbda7288
2020-11-15 23:59:58 -08:00
Kubernetes Publisher
fa8f4cc307 Merge pull request #99214 from jpbetz/apply-client-go-builders2-typedclient
Add Apply to client-go's typed client

Kubernetes-commit: e688f22da07465a88728210412470e14330f1563
2021-03-07 09:24:16 +00:00
Kubernetes Publisher
b4932b529f Merge pull request #99907 from liggitt/cache-test-timeout
Add test timeout to mutation detector test

Kubernetes-commit: dc493bb553c846719dff0075df174ecaa5d9f97b
2021-03-07 05:27:16 +00:00
Kubernetes Publisher
8df02b312c Merge pull request #99662 from swetharepakula/eps-ga-api-changes
Graduate EndpointSlice API to GA

Kubernetes-commit: 36244f31ef78dd3dd6bfbb74e1b15b4d01edcd6c
2021-03-07 05:27:15 +00:00
Kubernetes Publisher
d2a6442e7d Merge pull request #99275 from hbagdi/feat/ingress-class-namespaced-params
Add namespace scoped ParametersReference to IngressClass

Kubernetes-commit: 4bf85032f3c391ff710390c41996642cd4134c40
2021-03-07 05:27:12 +00:00
Jordan Liggitt
21ee617309 Add test timeout to mutation detector test
Kubernetes-commit: 877d889ac2c78b1c8c94dc2839351aad4136f908
2021-03-06 18:16:42 -05:00
Harry Bagdi
9db6403e9d Add namespace scoped ParametersReference to IngressClass
Kubernetes-commit: a7fc92089a42aff0c2f10d56b0ee290440adfbc4
2021-03-06 03:03:20 +05:30
Kubernetes Publisher
75a1e7fffe Merge pull request #99423 from soltysh/cronjob_controller
Switch cronjob controller to batch/v1

Kubernetes-commit: 06a4b6f3421b11a3df4653e07bcee8b2cfcc1b12
2021-03-06 13:33:22 +00:00
Kubernetes Publisher
1745c9faaa Merge pull request #99817 from liggitt/zero-value
Fix zero-value custom resource validation with go1.16

Kubernetes-commit: feab32b220cd39699696d832020f8808a70bb412
2021-03-06 13:33:19 +00:00
Kubernetes Publisher
fcacc4b270 Merge pull request #98277 from XudongLiuHarold/add-loadbalancerclass-field
Add LoadBalancerClass field in service

Kubernetes-commit: 66cbf0196bd5ed0f06d7c40fccba887aae5405d8
2021-03-05 13:22:13 +00:00
Kubernetes Publisher
4f212856ea Merge pull request #98127 from mortent/AddConditionsToPDBs
Add conditions to PDB status

Kubernetes-commit: 7a4914014521369be9e5162b869476fdfc7ea2f9
2021-03-05 13:22:11 +00:00
Morten Torkildsen
da66d1b7ed generated
Kubernetes-commit: b08eb95168a482c315b5c1c9e869ca41325f32c1
2021-03-04 19:03:00 -08:00
Kubernetes Publisher
503eb33ae5 Merge pull request #99782 from liggitt/race-tests
Fix or remove tests that don't work in race mode

Kubernetes-commit: 110b9272f27c97e1bf3fd5335124de063c3e9a48
2021-03-05 05:22:11 +00:00
Kubernetes Publisher
ec8fb0246c Merge pull request #99012 from jpbetz/apply-client-go-builders2
Apply Builders for client-go's typed client

Kubernetes-commit: 03d242665dbe39b3ceeb8562850602480e5788b8
2021-03-05 01:26:19 +00:00
Jordan Liggitt
d21dde2a15 Update k8s.io/kube-openapi
Kubernetes-commit: 5515157f82ceb1a9f9a267f32629add6d8f522f7
2021-03-04 19:45:51 -05:00
Jordan Liggitt
0693903770 Fix or remove tests that don't work in race mode
Kubernetes-commit: 68bb8b827b3827cbee61d3fcc560738beba3e110
2021-03-04 09:51:52 -05:00
Swetha Repakula
2eb8aff5d3 Graduate EndpointSlice API to GA
* Removes discovery v1alpha1 API
  * Replaces per Endpoint Topology with a read only DeprecatedTopology
  in GA API
  * Adds per Endpoint Zone field in GA API

Kubernetes-commit: a9891b4b9b909b76533a50812c21575cd96c43b1
2021-03-03 06:47:10 +00:00
Joe Betz
a793842303 Generate typed clients with Apply support
Kubernetes-commit: 08d5565b9b3892032ae98fe1592413e1703c2e3e
2021-02-18 13:07:36 -08:00
Joe Betz
f146f0fa13 generate applied configurations
Kubernetes-commit: c541c6933123ee7a9e66e2443f212b8829b29b3c
2021-02-11 17:05:24 -05:00
Kubernetes Publisher
9409f5796d Merge pull request #99741 from liggitt/client-go-install
Update client-go install instructions

Kubernetes-commit: 4d5868afc3f2ba2f9fb6a31fd9c47a04784a07fc
2021-03-04 13:22:06 +00:00
Kubernetes Publisher
a71c2f1241 Merge pull request #98892 from ankeesler/exec-plugin-metrics
exec credential provider: add rest_client_exec_plugin_call_total metric

Kubernetes-commit: cd54b1931d015df7c1609043d81b1f8308f2187d
2021-03-04 09:23:07 +00:00
Kubernetes Prow Robot
a5abe9cdbf Merge pull request #937 from liggitt/update-readme
Update readme installation instructions
2021-03-03 19:51:59 -08:00
Kubernetes Publisher
1cfb136f90 Merge pull request #99654 from ankeesler/exec-plugin-interactive-fix
exec credential provider: use stdin to detect user interaction

Kubernetes-commit: e2eb9f000528556cc7af2a3db4259a60b61a3f6f
2021-03-04 01:22:14 +00:00
Jordan Liggitt
e0f03ac11e Update client-go install instructions
Kubernetes-commit: 41c12a847ce601a5bad7f7c64277a6ef46f234d4
2021-03-03 19:24:07 -05:00
Jordan Liggitt
2dec69cc24 Update readme installation instructions 2021-03-03 19:23:07 -05:00
Kubernetes Publisher
a337294871 Merge pull request #98572 from justaugustus/go116
[go1.16] Update to go1.16

Kubernetes-commit: e4e9c31218becac11f176cc824f5cc6b7a8036ac
2021-03-03 09:26:32 +00:00
Andrew Keesler
149c501b92 exec credential provider: use stdin to detect user interaction
We are not sure why this was stdout, since stdin is what the user uses to pass
information to the exec plugin.

There is a question of backwards compatibility here. Our take is that this is a
bug, and so we are ameliorating behavior instead of breaking behavior. There are
2 main cases to consider with respect to backwards compatibility:

1. an existing exec plugin depended on stdin being hooked up to them if stdout
   was a terminal (e.g., echo foo | client-go-command-line-tool); we believe
   this is an anti-pattern, since the client-go-command-line-tool could be using
   stdin elsewhere (e.g., echo foo | kubectl apply -f -)

2. an existing exec plugin depended on stdin not being hooked up to them if
   stdout was not a terminal (e.g., client-go-command-line-tool >/dev/null);
   hopefully there are very few plugins that have tried to base logic off of
   whether stdin returned EOF immediately, since this could also happen when
   something else is wrong with stdin

We hope to apply a stronger fix to this exec plugin user interaction stuff in a
future release.

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: aea995c45ff057406b586144e28bd9575162b8df
2021-03-02 14:30:42 -05:00
Stephen Augustus
b13f594878 Fixup golang.org/x/term staticcheck warnings
Errors from staticcheck:
cmd/preferredimports/preferredimports.go:38:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go:36:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go:26:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)

Please review the above warnings. You can test via:
  hack/verify-staticcheck.sh <failing package>
If the above warnings do not make sense, you can exempt the line or
file. See:
  https://staticcheck.io/docs/#ignoring-problems

generated:
- hack/update-internal-modules.sh
- hack/lint-dependencies.sh
- hack/update-vendor.sh

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: d9435800b65d6787beaf061546599d757b8e87c9
2021-03-02 00:14:47 -05:00
Jordan Liggitt
768a62f124 [go1.16] bump golang.org/x/... dependencies
hack/pin-dependency.sh golang.org/x/crypto latest
hack/pin-dependency.sh golang.org/x/net latest
hack/pin-dependency.sh golang.org/x/exp latest
hack/pin-dependency.sh golang.org/x/sys latest
hack/pin-dependency.sh golang.org/x/time latest
hack/pin-dependency.sh golang.org/x/tools latest

hack/lint-dependencies.sh
hack/pin-dependency.sh dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037
hack/pin-dependency.sh golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f
hack/pin-dependency.sh golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449

hack/lint-dependencies.sh

hack/update-internal-modules.sh
hack/update-vendor.sh

Co-authored-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: ecef45df84a082c71dd3d96e6adb181a2c5b3790
2021-02-25 10:13:12 -05:00
Stephen Augustus
0ea7217dc7 generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 7216970cf25a39ad2e1208ad1eb5006599ca41ca
2021-02-25 09:25:53 -05:00
Stephen Augustus
36b22fd96c [go1.16] go.mod: update to go1.16
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 3c2824e3dbed6069dabddac7816239de9cb2a6ee
2021-02-15 04:46:56 -05:00
Kubernetes Publisher
fcbadc8b41 Merge pull request #99561 from BenTheElder/remove-bazel
Remove Bazel

Kubernetes-commit: 5498ee641b3459a0da1d4b2d42d502a318194189
2021-03-01 21:22:23 +00:00
Benjamin Elder
13e6cd336d hack/update-bazel.sh
Kubernetes-commit: 56e092e382038b01c61fff96efb5982a2cb137cb
2021-02-28 14:17:42 -08:00
Kubernetes Publisher
6a251876df Merge pull request #99324 from zshihang/master
reset token if got Unauthorized in KCM

Kubernetes-commit: 3cde6b199900ebc6d6dc415a6036d6fa8fcc1ae0
2021-02-27 01:22:16 +00:00
Kubernetes Publisher
c3c3d406ff Merge pull request #99377 from liggitt/version-sha
Switch gitVersion format to non-abbreviated hash

Kubernetes-commit: ab221b5d9f98833da2cbb5754fc2e7685bf80298
2021-02-26 21:22:12 +00:00
Kubernetes Publisher
8f8241f9ef Merge pull request #99195 from pacoxu/structurelog/watch-retry-timeout-1
migrate "client-go retry-watcher watch" to structured logging

Kubernetes-commit: f41aeffffbbaebc29d36492482a46d6e0ee179f2
2021-02-24 05:22:04 +00:00
Jordan Liggitt
1a6e9022ba Switch gitVersion format to non-abbreviated hash
Kubernetes-commit: b5efddb393e7beafc14bb2c3bd50598eb7a1b807
2021-02-23 16:14:29 -05:00
Shihang Zhang
3d6ec322f2 reset token if got Unauthorized in KCM
Kubernetes-commit: 5e7b60ba5fe218d8ac59496350dfdb9f43785d98
2021-02-22 15:38:18 -08:00
Kubernetes Publisher
12449b5492 Merge pull request #99193 from zhijianli88/subresource
request.go: correct subresource referencing

Kubernetes-commit: e16c6cc3483989899961c623518a1150e9078495
2021-02-19 05:21:55 +00:00
Kubernetes Publisher
fa31d62bd0 Merge pull request #99111 from databus23/patch-5
Return error when persister fails to modify config

Kubernetes-commit: a4f412dc769643723f42aa78dcea60b827d7bf55
2021-02-19 01:21:56 +00:00
pacoxu
06efd86142 Migrate client-go retry-watcher to structured logging
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>

Kubernetes-commit: c4dc34e8cbad41968c50763f79280e7cd14dabee
2021-02-18 19:06:34 +08:00
Li Zhijian
bb1d67da92 request.go: correct subresource referencing
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>

Kubernetes-commit: 678e4ebaf6534e9b15fc4cc8602caadbead2e40e
2021-02-18 17:51:55 +08:00
Kubernetes Publisher
21dd7eaeef Merge pull request #99079 from tkashem/throttle-message
add more context to client-go request throttling message

Kubernetes-commit: 83e140125c96bf9dbde46f4c13ebccb3909951cc
2021-02-17 21:33:28 +00:00
Kubernetes Publisher
10def0e245 Merge pull request #99063 from ZxYuan/patch-1
Fix typo in client-go/rest/client.go

Kubernetes-commit: 7e2e928f3920825f17096c959500f7b72dc51f8e
2021-02-17 21:33:27 +00:00
Kubernetes Publisher
7279fc64d8 Merge pull request #96987 from soltysh/drop_batch-alpha
Drop batch/v2alpha1

Kubernetes-commit: 4f1dd5d2fbe42f39a841016796c5646711946ad1
2021-02-17 17:21:42 +00:00
Kubernetes Publisher
df50762b9f Merge pull request #99014 from apelisse/update-smd
Update sigs.k8s.io/structured-merge-diff to v4.0.3

Kubernetes-commit: 93252fa433214462e61495a63e792b756fd6777a
2021-02-17 01:23:14 +00:00
Kubernetes Publisher
39da007993 Merge pull request #99110 from nikhita/clean-up-owners-jan-2021
Remove inactive members from OWNERS - Jan 2021

Kubernetes-commit: 47d076610681d027c9c7e28ca08e29e6dd49a138
2021-02-16 17:27:02 +00:00
Fabian Ruff
a125444d4d Return error when persister fails to modify config
Kubernetes-commit: 9efd1fd12f646b0a328702cca4c52fdf0966212d
2021-02-16 08:45:59 +01:00
Nikhita Raghunath
1d0cb03f5a *: remove nikhiljindal from OWNERS
Kubernetes-commit: 6cef3a4e33c10c27bb301a1070ea3ff4cdad0c39
2021-02-16 10:50:50 +05:30
Nikhita Raghunath
e8ab2528ca *: remove madhusudancs from reviewers
Kubernetes-commit: 6b12c96a9b7fe4d7c03d0dfed447edd6b1055067
2021-02-16 10:40:42 +05:30
Nikhita Raghunath
4c4207ac6f *: move gmarek to emeritus_approvers
Kubernetes-commit: b11516d69f2131327931a2cf7452d5e891d7e520
2021-02-16 10:31:19 +05:30
ZxYuan
a9fe1e1ae9 Fix typo in client-go/rest/client.go
Kubernetes-commit: cd63fd4543b99a45d0920421d0bd23af6f762dc8
2021-02-14 00:18:41 +08:00
Abu Kashem
d1fdbcd4dc client-go: add more context to request throttle message
Kubernetes-commit: bc66d3d137d3600b117be390ccb253a9dbcde25e
2021-02-12 14:39:44 -05:00
Antoine Pelisse
508a193d5a Update sigs.k8s.io/structured-merge-diff to v4.0.3
Kubernetes-commit: 707612732a7b43aa12e329b0cd6308116ff4af4d
2021-02-11 17:01:23 -08:00
Maciej Szulik
627c12d005 Generated changes
Kubernetes-commit: 1fc8fe0f7d9b2cea395a297c4ebbde9b5937b460
2021-02-10 14:52:27 +01:00
Kubernetes Publisher
20732a1bc1 Merge pull request #98889 from jkaniuk/leaderelection-simplify
Simplify leader election code

Kubernetes-commit: 93d288e2a47fa6d497b50d37c8b3a04e91da4228
2021-02-09 07:50:49 -08:00
Andrew Keesler
8aa3e0f684 exec credential provider: add rest_client_exec_plugin_call_total metric
Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 31eec29b098f790cd96fd6d2441e68938f15363b
2021-02-08 15:20:15 -05:00
Jacek Kaniuk
0eaf14c16e Simplify leader election code
Kubernetes-commit: c891207ab7c9e8e2ffb75edf41e6525d57543773
2021-02-08 19:28:55 +01:00
Kubernetes Publisher
100613764a Merge pull request #98790 from jkh52/master
Bump konnectivity-client to v0.0.15

Kubernetes-commit: 96a98e50afa7641d6f0e4fb324041126ff5a4ec2
2021-02-06 01:11:12 +00:00
Joseph Anttila Hall
bf60d3faed Bump konnectivity-client to v0.0.15
$ ./hack/pin-dependency.sh \
  sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15
$ ./hack/update-vendor.sh

Kubernetes-commit: 6499d4a730f8e6159da3e6c43f8ea6b13c5f46e5
2021-02-04 19:42:20 -08:00
Kubernetes Publisher
93ce9718ff Merge pull request #98671 from liggitt/kubeconfig-env
Isolate TestModifyContext from $KUBECONFIG

Kubernetes-commit: edd4576510445fae06cab29ba6dbd286a99987fd
2021-02-03 04:12:31 +00:00
Kubernetes Publisher
3c12da5d77 Merge pull request #98324 from atosatto/export-debug-roundripper
client-go: export NewDebuggingRoundTripper function and DebugLevel

Kubernetes-commit: 27104f159557da6bec20cf8227b468b1f22cd884
2021-02-03 00:20:23 +00:00
Kubernetes Publisher
3147a30d7b Merge pull request #98477 from palnabarun/update-gogo/protobuf
Update gogo/protobuf to v1.3.2

Kubernetes-commit: 4d3ed163a0ed45e8790801d74503fe300d05daa0
2021-02-02 20:12:39 +00:00
Jordan Liggitt
b620e827ab Isolate TestModifyContext from $KUBECONFIG
Kubernetes-commit: ce7e1e214a9b690f2222397c82c14c0d10905940
2021-02-01 14:03:07 -05:00
Kubernetes Publisher
ab82d40f6e Merge pull request #98488 from pohly/klog-2.5.0
klog 2.5.0 + logr 0.4.0 update

Kubernetes-commit: 76ead99a5601d89ac83a6a633cd2f828145adbff
2021-01-30 04:12:07 +00:00
Kubernetes Publisher
c8e0107904 Merge pull request #98565 from adisky/move-spdystream
Move dependency docker/spdystream to moby/spdystream

Kubernetes-commit: 64a6ee4321d37740b84a5c5c7aaa67e0bf6b6508
2021-01-29 20:12:47 +00:00
Aditi Sharma
b8b770f6b7 Update dependency docker/spdystream to moby/spdystream
docker/spdystream has been moved to moby/spdystream.

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>

Kubernetes-commit: c5c938a056abdf9961962554013632d6cfd3bbd4
2021-01-29 12:03:46 +05:30
Kubernetes Publisher
6329432013 Merge pull request #98496 from lavalamp/connrotation
Remove unbounded connection creation; also change worst case delay from 50s to 5s

Kubernetes-commit: 9f2f1b8c460b4b5ec8bfcd34490fb259ebad65b0
2021-01-28 08:12:11 +00:00
Daniel Smith
5985bbb560 Fix unbounded connection creation & 50s of delay
Kubernetes-commit: 80c3ec4c6a62486b0993b2e2f51c3e6f9bd6413a
2021-01-27 16:47:04 -08:00
Patrick Ohly
362c4854a6 logging: support call depth via logr, structured logging
The new releases of klog (via klogr) and logr expose support for call
traces via a new WithCallDepth API in logr.

The new klogr can be configured to pass structured log entries into
klog instead of turning them into a single text message.

Kubernetes-commit: 562a39a2e1e26854c06ac2b317f6f8a4ebb23ac1
2021-01-27 20:36:56 +01:00
Nabarun Pal
28611520a9 update gogo/protobuf to v1.3.2
gogo/protobuf@v1.3.2 fixes https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121

Ref: https://github.com/kubernetes/client-go/issues/927

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>

Kubernetes-commit: 9cada2ec3ba793597606a1df1375ff8e8311ccf3
2021-01-27 18:01:27 +05:30
Andrea Tosatto
ef84e47785 Re-run gofmt against staging/src/k8s.io/client-go/transport/
Kubernetes-commit: 1449af17555eb5148d11556ee205c42b83821af0
2021-01-27 00:08:07 +00:00
Andrea Tosatto
e87f4d8d19 Remove unexpected updates to go.mod and go.sum
Kubernetes-commit: 961fa25dd4468cad40274258c701e5d48fa02c5e
2021-01-26 23:49:25 +00:00
Andrea Tosatto
9d369ea084 Update bazel BUILD file
Kubernetes-commit: bdd2da5c7eb98e4f7ce02977793b7268c717d98a
2021-01-26 23:31:42 +00:00
Andrea Tosatto
84db31c178 Address golint warnings
Kubernetes-commit: 675cefa1d15cadc5d1772d0ced16a3e843488347
2021-01-26 23:29:32 +00:00
Andrea Tosatto
8d3dc9e9ef Run gofmt against staging/src/k8s.io/client-go/transport/round_trippers_test.go
Kubernetes-commit: e87349f3caa810b96ed86fac7aec6bd0e73dacb1
2021-01-26 23:14:56 +00:00
Andrea Tosatto
2bce1731eb Run gofmt against staging/src/k8s.io/client-go/transport/round_trippers.go
Kubernetes-commit: 9cb5580ac6584cc787a2b2061c6c61656d065392
2021-01-26 22:04:52 +00:00
Andrea Tosatto
5c01a03456 client-go: export NewDebuggingRoundTripper function and DebugLevel
`debuggingRoundTripper` is a useful throbleshooting tool to debug of Kubernetes API requests and their timing.

Unfortunately, as of today, it can only be used via the `DebugWrappers` function, which automatically adjust the amount of debug information exposed by the roundTripper based on the configured `klog` verbosity.

While `DebugWrappers` definitely fits the purpose for clients using `klog`, this is currently hard to be used for controllers using `controller-runtime`, which uses `github.com/go-logr/logr` for logging.

In this PR we change the visibility of `newDebuggingRoundTripper` and `debugLevel` in order to be directly accessible from users of the `k8s.io/client-go/transport` package.

In particular, the changes proposed in this PR allow users of `controller-runtime` to use the `debuggingRoundTripper` to intercept Kubernetes API requests as follows

```go
import (
        ctrl "sigs.k8s.io/controller-runtime"
)

func init() {
	ctrl.SetLogger(zap.New())
}

func main() {
        // wrap the http transport used by the Kubernetes client
	restConfig, err := ctrl.GetConfig()
	checkError(setupLog, err, "unable to get kubernetes client config")

        restConfig.Wrap(func(rt http.RoundTripper) http.RoundTripper {
		return transport.NewDebuggingRoundTripper(rt, transport.DebugJustURL)
	})

        ...
}
```

Kubernetes-commit: 8de53ce96cb58d56fd00e91d8bcf7761ab498b83
2021-01-22 14:57:14 +01:00
Kubernetes Publisher
b72204b244 Merge pull request #95664 from DirectXMan12/bug/non-racy-recorder-shutdown
Don't spawn a goroutine for every event recording

Kubernetes-commit: 9d99dbc357ed85bcc963fc4bab8a4a3089c910b2
2021-01-21 07:15:29 +00:00
Xudong Liu
32850001d5 Add LoadBalancerClass field in service
KEP-1959: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cloud-provider/1959-service-lb-class-field

Kubernetes-commit: 72da0b1bb06607f3f3e067f1bb5ce329ec861e1b
2021-01-20 16:56:07 -08:00
Kubernetes Publisher
fc034b4b76 Merge pull request #96552 from pandaamanda/klog_fmt
use klog.Info and klog.Warning when had no format

Kubernetes-commit: 8bf42039e62d001f5d0331753bd99790b70d51eb
2021-01-16 05:01:05 +00:00
Kubernetes Publisher
537eda74d8 Merge pull request #98058 from jprzychodzen/le-comment
[Leader election] Add documentation to function

Kubernetes-commit: a16df75344c6036730e1fba42b25c64c704b1494
2021-01-14 13:04:07 +00:00
Kubernetes Publisher
25e8b5f54c Merge pull request #97083 from knight42/feat/enable-spdy-ping
feat: enable SPDY pings on connections

Kubernetes-commit: a3bf53a0a5031f69389a835a8e13e783090b35a7
2021-01-14 01:01:00 +00:00
Jakub Przychodzeń
eae461ddf8 [Leader election] Add documentation to function
Kubernetes-commit: 852075b23c1854d538582e3940dff36947de2907
2021-01-13 17:34:07 +01:00
Jian Zeng
479dd01de2 feat: enable SPDY pings on connections
Signed-off-by: Jian Zeng <zengjian.zj@bytedance.com>

Kubernetes-commit: d0dce7035832f0673d87ae44503560204f3d3d46
2020-12-05 22:31:52 +08:00
Kubernetes Publisher
623741e9c1 Merge pull request #97909 from adamzhoul/fix-chan-bug
fix unit test "TestSPDYExecutorStream" flaking problem

Kubernetes-commit: 9caf675ed1a055ebce18cf34e8284028a729fd00
2021-01-12 05:01:01 +00:00
Kubernetes Publisher
2192138125 Merge pull request #97095 from sabbox/fix-panic-azure-oidc-auth-plugins
fix: Azure/OIDC auth panics when no AuthProviderConfigPersister is nil

Kubernetes-commit: 31e89372716a1414495594ce1a65368e4124db26
2021-01-12 05:00:59 +00:00
Andrey Viktorov
b804f9f657 add noop persister to plugin loader
Kubernetes-commit: 2dd86fe8c2cc7b655085b773bd1a06bc2ab54bbd
2021-01-12 00:08:42 +02:00
Kubernetes Publisher
f80da32721 Merge pull request #97255 from chotiwat/patch-1
Fix stale object causing a panic on DELETE event

Kubernetes-commit: d2575b7ddb374d8ce915fe095fa5b7a5b3df138e
2021-01-11 21:01:20 +00:00
Kubernetes Publisher
224c1c6ff4 Merge pull request #97857 from liggitt/exec-auth-reuse-dialer
Track opened connections with a single tracker per authenticator

Kubernetes-commit: e9dba7a627520f89778b367fc0d955776f220638
2021-01-11 17:01:11 +00:00
adamzhoul
5c32e970ce fix replyChan block
Kubernetes-commit: 314a9c4a6215b7e57944c86acacc5c75ab55121f
2021-01-11 08:36:27 +00:00
Jordan Liggitt
0c5bab64fe Track opened connections with a single tracker per authenticator
Kubernetes-commit: ecbff22ca134bd802127aab2be165d2770a9262a
2021-01-08 12:13:19 -05:00
Chotiwat Chawannakul
a35bc8fe7a Fix stale object causing a panic on DELETE event
Kubernetes-commit: 1f4f78ac414b7a1666e908670c5e447015bdc6b9
2021-01-06 10:38:31 -08:00
Kubernetes Publisher
9761a13537 Merge pull request #96906 from Rajalakshmi-Girish/issue-96853
Fixes the unit tests to be more tolerant with error messages

Kubernetes-commit: 10c1c3acf65cfb00de7fa28f784865bd42ab4872
2021-01-06 05:04:32 +00:00
Kubernetes Prow Robot
0d3f257a17 Merge pull request #907 from munnerz/patch-1
README: add 1.20 in compatibility matrix
2021-01-05 02:33:59 -08:00
Kubernetes Publisher
e9d996dae2 Merge pull request #97326 from victor-timofei/deltafifo-doc
Update DeltaFIFO documentation and group Delta definitions to the top of the file

Kubernetes-commit: 9406e145c25e4c3041ec82529176957f164fdb08
2020-12-29 09:00:12 +00:00
Victor Timofei
53a09c71a4 Update the wording of the DeltaFIFO
Kubernetes-commit: 3a107951f0bf16a022b70a667c98833e4ac1d540
2020-12-24 16:33:04 +02:00
Kubernetes Publisher
0964d4be75 Merge pull request #97033 from patrickshan/pshan/bump/Azure/go-autorest/autorest
Bump github.com/Azure/go-autorest/autorest to v0.11.12

Kubernetes-commit: e11e9d4c6c3f522ed398748a11cc5dd1f8949c2b
2020-12-17 08:59:40 +00:00
Kubernetes Publisher
2b31242e93 Merge pull request #94813 from dramich/nometrics
Don't start goroutine for noMetrics

Kubernetes-commit: c4aca30005dacca3f768e511f3e424893161558d
2020-12-17 01:02:20 +00:00
James Munnelly
efbc7082a8 README: add 1.20 in compatibility matrix 2020-12-16 15:26:15 +00:00
Kubernetes Publisher
cc9d424da8 Merge pull request #96883 from pacoxu/fix/96862
fix index test: multi index check for empty list

Kubernetes-commit: 46d481b4556e3328758eeb851920e2536a488658
2020-12-16 04:59:30 +00:00
Victor Timofei
710a222444 Move Delta definitions to the top
Kubernetes-commit: bcc1c9a387c898478ed47c629864418be89bf518
2020-12-15 22:07:33 +02:00
Victor Timofei
09cf7147ab Update DeltaFIFO Documentation
Kubernetes-commit: 1a4ed5ea57ac4d562311d2b2852dcc59b78725da
2020-12-15 21:31:30 +02:00
Kubernetes Publisher
77dfe4dff7 Merge pull request #92138 from ash2k/ash2k/client-cleanups
Client library cleanups

Kubernetes-commit: 667deec758fbbd9576df1c5f081a4e239996b074
2020-12-10 21:00:11 +00:00
Kubernetes Publisher
62f63bbbfe Merge pull request #96837 from adamzhoul/master
fix  remotecommand stream blocked forever problems.

Kubernetes-commit: ccd29ea264535fa2ef36cf4dfb004fed99c99fbf
2020-12-10 05:00:18 +00:00
Patrick Shan
01fbb1db89 Bump github.com/Azure/go-autorest/autorest to v0.11.12
Kubernetes-commit: c75d9906587a8b174338e0ffe725759f68c0be56
2020-12-03 15:38:17 +11:00
Maciej Szulik
61675820ec Generated changes
Kubernetes-commit: 7d9f36cd850cfc080d8598ff4eac7b6fa3efc27d
2020-12-01 16:34:55 +01:00
Maciej Szulik
d6cefbd7a0 Drop batch/v2alpha1 API
Kubernetes-commit: 3dab7462d1ff6e20f7efe38249dd9958e4e32c89
2020-12-01 16:33:47 +01:00
Rajalakshmi-Girish
cb8d3d1111 fixes the unit tests to be more tolerant with error messages
Kubernetes-commit: 98948ad8092b41ebc08d50aa557b2d7ba5496e7d
2020-11-27 08:21:56 +00:00
pacoxu
8031d76bd6 fix index test: multi index check for empty list
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: ae6360f6c732d554c332a0bc1b99808149d8376e
2020-11-26 18:23:57 +08:00
adamzhoul
04adad44d6 fix spdy stream, conn deadlock.
Kubernetes-commit: 94a297485bf39a6d69f316c257d351e9432b8cb5
2020-11-15 17:06:34 +08:00
Kubernetes Publisher
e24efdc77f Merge pull request #96797 from jqmichael/initialCountLength
Fixed a bug where initialPopulationCount should be based on the key length not list size in DeltaFIFO#Replace()

Kubernetes-commit: 7d8587c4cc3529dc9065c1536071ea382e6c725c
2020-12-09 05:00:23 +00:00
Kubernetes Publisher
50c086135a Merge pull request #96643 from bboreham/lose-timestamp
Remove unused argument from generateEvent

Kubernetes-commit: e3bf0cc4ae836dd27bb01a5e426cb50721f63211
2020-12-09 05:00:20 +00:00
Qing Ju
1d175299a2 Fixed a harmless bug where initialPopulationCount should be based on the key length not list size in DeltaFIFO#Replace()
Kubernetes-commit: bc39672c0638426979feef95baeff39d170161eb
2020-11-22 16:35:19 -08:00
Kubernetes Publisher
fb61a7c88c Merge pull request #96720 from liggitt/throttled-logger
Deflake ThrottledLogger test

Kubernetes-commit: 2ea6828ea0803e188a6a7c4a6581f522865ae8f3
2020-11-21 00:58:59 +00:00
Jordan Liggitt
61471be615 Deflake ThrottledLogger test
Kubernetes-commit: c84df5d66ea8d949374b67c5205b9869b984ea84
2020-11-19 13:59:27 -05:00
Kubernetes Publisher
66db254099 Merge pull request #95981 from caesarxuchao/http2-healthcheck
Enables HTTP/2 health check

Kubernetes-commit: afeac926fa79179bfd0c5e718459086845a2a80c
2020-11-18 00:58:04 +00:00
Kubernetes Publisher
7c9ea22f76 Merge pull request #92743 from liggitt/gc
Fix GC uid races and handling of conflicting ownerReferences

Kubernetes-commit: e1ab99e0d662f3d9bf89ccf48f71444dbabce37e
2020-11-17 12:14:06 -08:00
Bryan Boreham
5d2c89de53 Remove unused argument from generateEvent
Kubernetes-commit: beceee68156dff8b10123a37bb4645941b7df0c2
2020-11-17 16:51:10 +00:00
xiongzhongliang
d7ba1f2e01 use klog.Info and klog.Warning when had no format
Kubernetes-commit: 90f4aeeea4cc5f96caa6ed87c67ca7e62d1ba21c
2020-11-14 00:55:06 +08:00
Chao Xu
8dde295de4 Add a unit test testing the HTTP/2 health check help the REST client
detects broken TCP connections.

Kubernetes-commit: ba7b1f7a89ffed78115ab0229b7504d05f6c7d48
2020-10-29 23:03:14 -07:00
Haowei Cai
7dddf976b8 fix the fake client example: how to handle a race between the fake client and informer
Note that the fake client isn't designed to work with informer. It
doesn't support resource version. It's encouraged to use a real client
in an integration/E2E test if you need to test complex behavior with
informer/controllers.

Kubernetes-commit: 942bc9b32e39bb9c6ca045c02b48cc84dfa86633
2020-10-26 22:50:32 -07:00
Solly Ross
726d27fe7a Don't record events in goroutines
This changes the event recorder to use the equivalent of a select
statement instead of a goroutine to record events.

Previously, we used a goroutine to make event recording non-blocking.
Unfortunately, this writes to a channel, and during shutdown we then
race to write to a closed channel, panicing (caught by the error
handler, but still) and making the race detector unhappy.

Instead, we now use the select statement to make event emitting
non-blocking, and if we'd block, we just drop the event.  We already
drop events if a particular sink is overloaded, so this just moves the
incoming event queue to match that behavior (and makes the incoming
event queue much longer).

This means that, if the user uses `Eventf` and friends correctly (i.e.
ensure they've returned by the time we call `Shutdown`), it's
now safe to call Shutdown.  This matches the conventional go guidance on
channels: the writer should call close.

Kubernetes-commit: e90e67bd002e70a525d3ee9045b213a5d826074d
2020-10-16 15:05:00 -07:00
Taahir Ahmed
65b7d26246 Remove MPL-licensed dep from lruexpirecache
github.com/hashicorp/golang-lru is MPL 2 licensed, which means that
anyone who distributes code or binaries that incorporates it needs to
include its source code, even if they haven't made any modifications.

Since lrucacheexpire is picked up as a dependency of using the shared
informers in client-go, that's potentially a lot of distributors.
Most other deps of client-go are Apache 2.0, MIT, or BSD-like
licensed, which only requires including the license.

Rather than reverting to groupcache/lru, I just reimplemented the
functionality we need, which isn't much.

Kubernetes-commit: ecc53182475a00a4a1dc8ca1e056b0deb6bd430c
2020-10-10 20:29:26 -07:00
Jordan Liggitt
c476b49dcf Add GC unit tests
Adds unit tests covering the problematic scenarios identified
around conflicting data in child owner references

                      Before   After
package level         51%      68%
garbagecollector.go   60%      75%
graph_builder.go      50%      81%
graph.go              50%      68%

Added/improved coverage of key functions that had lacking unit test coverage:

* attemptToDeleteWorker
* attemptToDeleteItem
* processGraphChanges (added coverage of all added code)

Kubernetes-commit: e491c3bc7056530d82590d95f0af0e8c4d8dded5
2020-10-09 17:50:52 -04:00
Kubernetes Publisher
77eda6a939 Merge pull request #96317 from Jefftree/test-ssa
Integrate defaults marker to defaulter-gen

Kubernetes-commit: 05d1b94a701d807666b40665f5728e0cc5f92054
2020-11-14 08:57:41 +00:00
Kubernetes Publisher
76f48268c7 Merge pull request #96527 from adtac/apfbeta
promote API priority and fairness types and APIs to beta

Kubernetes-commit: 36f571404fcb136011024b89efaa2a0d089acd5f
2020-11-14 04:57:47 +00:00
Kubernetes Publisher
4ab8fb4585 Merge pull request #96425 from bobbypage/vendor-cadvisor-v0.38
Vendor cadvisor v0.38.4

Kubernetes-commit: 41533ecec8966636554faba44368a36d5d6c5347
2020-11-14 00:58:07 +00:00
David Porter
4bbb204f15 vendor: cadvisor v0.38.4
Kubernetes-commit: 8af7405f1730c4913c48c6dc494e319cb3015f69
2020-11-13 19:52:57 +00:00
Kubernetes Publisher
d396fd99eb Merge pull request #96549 from caesarxuchao/net-sys-dep-update
update golang.org/x/net and golang.org/x/sys

Kubernetes-commit: 85cd7c530bf55cd369bdcb92a5a31d3d1547113f
2020-11-13 17:06:34 +00:00
Kubernetes Publisher
759e1a8119 Merge pull request #95614 from wilsonehusin/golint-client-go-transport
Fix golint failures in client-go/transport

Kubernetes-commit: 3b2746c9ea9e0fa247b01dca27634e509b385eda
2020-11-13 17:06:31 +00:00
Chao Xu
26433c83c0 update golang.org/x/net and golang.org/x/sys
Kubernetes-commit: 7b26cff1740ecfb8e6ac184539d1cb5dd66991c2
2020-11-13 05:15:22 +00:00
Kubernetes Publisher
30548acd0a Merge pull request #96001 from serathius/datapolicy-client-go
Add datapolicy tags to staging/src/k8s.io/client-go/

Kubernetes-commit: f4a156eb29d51b73f52d69ab4c5f96e440eebc41
2020-11-12 20:25:28 +00:00
Antoine Pelisse
96c6b1c8c8 Update kube-openapi
Kubernetes-commit: 8cce122e7b6506b361032869f7115635f13ca96a
2020-11-10 15:09:03 -08:00
yue9944882
8ff8f8a3c2 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>

Kubernetes-commit: 849be447f563fc93a27a0827fb1185b885b57114
2020-11-04 16:33:14 +08:00
Marek Siarkowicz
e93788d387 Add datapolicy tags to staging/src/k8s.io/client-go/
Kubernetes-commit: e29c568c4a9cd45d15665345aa015e21bcff52dd
2020-10-29 18:15:52 +01:00
Kubernetes Publisher
04f89d4efe Merge pull request #95718 from SergeyKanzhelev/runtimeClass2
RuntimeClass GA

Kubernetes-commit: 12d9183da03d86c65f9f17e3e28be3c7c18ed22a
2020-11-12 12:25:17 +00:00
Sergey Kanzhelev
381d44651b GA of RuntimeClass feature gate and API
Kubernetes-commit: 06da0e5e74a99d5c6c2f4e120b2cd0c2c6f3caf4
2020-11-11 19:22:32 +00:00
Kubernetes Publisher
bef66adadf Merge pull request #95954 from sttts/sttts-go-openapi
apiextensions: replace go-openapi with kube-openapi fork for validation

Kubernetes-commit: 0cba30d891cb77e813d7f19dcc5ae422076fcfe3
2020-11-09 16:25:15 +00:00
Dr. Stefan Schimanski
be00baa5eb bump(k8s.io/kube-openapi)
Kubernetes-commit: dd1709ba46580af290712b0eca12acd00a78789d
2020-11-06 10:59:34 +01:00
Kubernetes Publisher
a2cda5636d Merge pull request #96279 from cmluciano/cml/netutilsipv4
dualstack: cleanup IsIPv4 duplicates in favor of k8s/utils functions

Kubernetes-commit: 151c2799d1d76ae6a9847b89bdf912604477c2d5
2020-11-07 12:24:55 +00:00
Kubernetes Publisher
9950c71bb5 Merge pull request #74363 from aanm/fix-client-go-metrics
client-go/rest: fix finalURLTemplate for url base == "/"

Kubernetes-commit: 80c2f61939fb01720e6d96021cc3cd8c909bf34d
2020-11-06 00:29:52 +00:00
Christopher M. Luciano
1a0a999839 dualstack: incorporate IsIPv4 updates from utils repo
This dependency bump will allow for cleanup of duplicate code in
the dualstack e2e tests.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>

Kubernetes-commit: 5303b3fbbd52f5092bdcbd3765347eb218485ca5
2020-11-05 14:25:23 -05:00
Kubernetes Publisher
1eb2027cd5 Merge pull request #96020 from deads2k/dynamiclist
update fake dynamic client to return GVK

Kubernetes-commit: dbd2be08fb0515599aadb897e0c1476abc8b2552
2020-11-05 04:24:28 +00:00
Kubernetes Publisher
bcecfeab18 Merge pull request #93293 from soltysh/loading_precedence
kubeconfig: add explicit path, if specified to loading precedence

Kubernetes-commit: 583d01a9bfc0c403bc8e1043f7046f1c8b5d7881
2020-11-05 00:24:32 +00:00
Kubernetes Publisher
68bb4a9525 Merge pull request #96154 from rf232/update_klog
Update Klog dependency

Kubernetes-commit: 3f6ec26eefcae1cdb4a43aa4e664a5f60fc7ca78
2020-11-04 16:24:36 +00:00
Rob Franken
01777546cc Update Klog dependency
Updating Klog to pickup changes needed for log sanitization.

(https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1753-logs-sanitization)

Kubernetes-commit: c6685436fdae6fbb8ac7083b85ecfd47b5871e68
2020-11-03 20:16:25 +01:00
Kubernetes Publisher
534b10dd04 Merge pull request #95933 from brianpursley/kubernetes-95882
Fix bug in JSON path parser where an error occurs when a range is empty

Kubernetes-commit: cd99c63570eb1489dd631c12ea86db708dbdcd59
2020-11-03 12:24:46 +00:00
Kubernetes Publisher
4ef01cd5e2 Merge pull request #96108 from liggitt/revert-sys
Revert "Updated golang/x/net. Also updated golang.org/x/sys"

Kubernetes-commit: 770525fd3d47a1ef86aab886b62b73b3557457d5
2020-11-02 20:24:40 +00:00
Jordan Liggitt
3b0c685ad9 Revert "Updated golang/x/net. Also updated golang.org/x/sys"
Kubernetes-commit: 4012fb005205a2f6dbd2534d600c4f784b5c0210
2020-11-02 08:28:24 -05:00
Kubernetes Publisher
852de461ed Merge pull request #96076 from caesarxuchao/update-deps
Updates golang/x/net and golang/x/sys

Kubernetes-commit: a0d23de0861d5a2fc446c417bf0c53fa1f51706e
2020-11-01 20:23:56 +00:00
brianpursley
135cef183c Fix bug in JSON path parser where an error occurs when a range is empty
Kubernetes-commit: 10634c6093c84acc78181a26c93d8785e12802e4
2020-11-01 10:41:19 -05:00
Chao Xu
285943f1c0 Updated golang/x/net. Also updated golang.org/x/sys, as required by
hack/lint-dependencies.sh.

Kubernetes-commit: ec6e2321261b900089183ac61f1ac0040be5fa9c
2020-10-31 16:21:08 -07:00
Kubernetes Publisher
0c53f2fd3c Merge pull request #95489 from ankeesler/ankeesler/enj/f/exec_plugin_cluster
exec credential provider: wire in cluster info (superset of #91192)

Kubernetes-commit: 53913a7c676c4bd21d6d3a58e6d6305729abaa9b
2020-10-30 04:24:07 +00:00
Andrew Keesler
078729a26c exec credential provider: exec -> client.authentication.k8s.io/exec
Hopefully we've fixed all of these references now...

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 409f22832a9f949e7fa534379574ce4fb9802394
2020-10-29 17:02:55 -04:00
David Eads
20c034c178 add GVK to fake dynamic client to match actual behavior
Kubernetes-commit: f4383458432cd67714e9ce0acde56a2ed5c24a21
2020-10-29 15:53:34 -04:00
David Eads
75ef13ec60 demonstrate existing generated client and fake client behavior is consistent
Kubernetes-commit: eaac8b80cabdccd0cbb35ef2d33a4f6628263c01
2020-10-29 15:12:38 -04:00
Andrew Keesler
405010f17b exec credential provider: k8s.io/client-go/tools/auth/exec helper
Exec plugin implementations should be able to call
LoadExecCredentialFromEnv() in order to get everything they need to
operate (i.e., cluster information (as long as it is passed in) and
optionally per-cluster configuration).

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 875a46bd7c1b79f1fae9cd189eec5fc9c3fbf1bc
2020-10-29 13:38:50 -04:00
Andrew Keesler
a7ba87c612 exec credential provider: ProvideClusterInfo and kubeconfig shadow
- The main idea here is that we want to 1) prevent potentially large CA
  bundles from being set in an exec plugin's environment and 2) ensure
  that the exec plugin is getting everything it needs in order to talk to
  a cluster.
- Avoid breaking existing manual declarations of rest.Config instances by
  moving exec Cluster to kubeconfig internal type.
- Use client.authentication.k8s.io/exec to qualify exec cluster extension.
- Deep copy the exec Cluster.Config when we copy a rest.Config.

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: c4299d15d5289768808034676858e76a177eeae5
2020-10-29 13:38:42 -04:00
Kubernetes Publisher
e84213f91f Merge pull request #95939 from dprotaso/leaderelection-release
Address scenario where releasing a resource lock fails if a prior update fails or gets cancelled

Kubernetes-commit: 8bc8b11bcf5d970d678e28679c1699e2383610b8
2020-10-29 00:23:46 +00:00
Kubernetes Publisher
d58491a0a7 Merge pull request #95923 from deads2k/remove-deprecated
remove the deprecated client that we stopped generating

Kubernetes-commit: ec0ef235990a1ceda22d78d96c129677e5aa097c
2020-10-28 20:24:06 +00:00
Kubernetes Publisher
3ced13b9a4 Merge pull request #95117 from andrewsykim/fake-dynamic-list
fake dynamic client: document that List does not preserve TypeMeta in UnstructuredList

Kubernetes-commit: c5ecae737d2eb668adab12cefa3644f550fc9e8a
2020-10-28 04:23:41 +00:00
Andrew Sy Kim
1db2969ba9 fake dynamic client: support *List kinds
Today the dynamic fake client is not aware of *List kinds, so List calls return UnstructuredList
objects without TypeMeta. This patch updates client-go's fake object tracker to store a map of
GVR to list GVKs. In this way, the list GVK can be set for UnstructuredList objects.

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

Kubernetes-commit: 0845b863e89912e0d6c4380f8bc362646326386a
2020-10-27 23:08:46 -04:00
Dave Protasowski
3da398aea9 Re-add the event recorder in the release test
Prior having a mock recorder would cause panics since the lock
would be set to nil on update failures. Now the recorder will
use the cached lock

Kubernetes-commit: 5e7ed7b86d26b651f1ef78a794cdc03fa945a3ce
2020-10-27 22:45:33 -04:00
Dave Protasowski
bfd1732c49 Don't clear the cached resourcelock when errors occurs on updates
This allows the lock to be release normally - even with a
potentially stale lock. This flow should only occur when we're
the lease holders.

Kubernetes-commit: 8160ecfd90284c333101a16bdccd79aacc86360d
2020-10-27 22:41:39 -04:00
Dave Protasowski
a0a4a352aa Add failing test showing release is not working properly
Kubernetes-commit: 23ce312b9f764736d8ac7cb6f8ebf6825d43f817
2020-10-27 22:29:22 -04:00
David Eads
f3da8d0730 remove the deprecated client that we stopped generating
Kubernetes-commit: 1f349b5d05b1e3deca196ddf6c4114b707c8eb08
2020-10-27 14:00:56 -04:00
Wilson Husin
d6281e9d1e Fix golint failures in client-go/transport
Signed-off-by: Wilson Husin <whusin@vmware.com>

Kubernetes-commit: 889ffb04d03e49cdbb481b86ea233d0aa3143db6
2020-10-15 11:06:24 -07:00
wojtekt
b100ecfc06 Create TransformingInformer
TransformingInfomer is like a regular Informer, but allows for applying
custom transform functions on the objects received via list/watch API calls.

Kubernetes-commit: efd3490076c391823095b4c8bd6e847ae18eb012
2020-09-29 15:06:33 +02:00
Andrew Sy Kim
f45d9426eb fake dynamic client: document that List does not preserve TypeMeta in UnstructuredList
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

Kubernetes-commit: deb1bb8bfff012e03ccc80fd85ee4fc2f9fceb6d
2020-09-28 09:29:06 -04:00
Kubernetes Publisher
b8dd4e3c0f Merge pull request #80954 from zachomedia/fix-lock-release
Fix leader election lock release when using LeaseLocks

Kubernetes-commit: 68f6b09e807917d73446e6ee6146b4029d1aae79
2020-10-27 04:23:32 +00:00
Kubernetes Publisher
d1a4fe5f2d Merge pull request #95692 from markusthoemmes/bump-azure-adal
Bump github.com/Azure/go-autorest/autorest/adal to 0.9.5

Kubernetes-commit: af1c8935d9f1f42767c6f5211a668e44a15946b4
2020-10-20 20:08:34 +00:00
Kubernetes Publisher
a789af5306 Merge pull request #95646 from jprzychodzen/leader-election-1
Add a new way to generate leader election lock

Kubernetes-commit: d5ea0edc0967697c1adf6e70831e5cb1a38d26a2
2020-10-20 09:02:09 -07:00
Markus Thömmes
f3ff478f5a Fix dependency linting
Kubernetes-commit: 34b9d115051a987442dfaf3bd12002c0843f8297
2020-10-19 11:33:30 +02:00
Markus Thömmes
605bdceafe Bump github.com/Azure/go-autorest/autorest/adal to 0.9.5
Kubernetes-commit: e1fd0bd0ebdfee973403a8eeb71a9ec0fc8a23de
2020-10-19 09:46:46 +02:00
Jakub Przychodzeń
5b14150b09 Add new way to generate leader election lock
Kubernetes-commit: 24033c908d8363ea6628b1d1c0b2a48c96a338da
2020-10-16 11:28:42 +02:00
Kubernetes Publisher
67b0d2026a Merge pull request #95427 from roycaihw/fix/tls-transport-cache
TLS transport cache: don't cache transports for incomparable configs

Kubernetes-commit: 36a6a6493621d3b0796478bc6c08b80b82282601
2020-10-20 10:20:08 +00:00
Kubernetes Publisher
27421eae1f Merge pull request #95230 from Git-Jiro/fix_vendor_client_go
Fix staticchecks in vendor/k8s.io/client-go

Kubernetes-commit: 297b021f49e30a7cadb691a252f2bb13114423b9
2020-10-20 10:20:07 +00:00
Haowei Cai
a3299cf8e9 don't cache transports for incomparable configs
Co-authored-by: Jordan Liggitt <liggitt@google.com>

Kubernetes-commit: 0765ba8e54f0c9e5f221e505a24759fa18beaf2e
2020-10-07 15:44:27 -07:00
Kubernetes Publisher
5682372f35 Merge pull request #95316 from sfowl/mask-token-in-toCurl
Mask bearer token in logs when logLevel >= 9

Kubernetes-commit: e99df0e5a75eb6e86123b56d53e9b7ca0fd00419
2020-10-07 12:01:36 +00:00
Kubernetes Publisher
1c5be7dd50 Merge pull request #92201 from cici37/features
Remove dependency pkg/features from CCM

Kubernetes-commit: a1441b2d52202c2fb9d4a8d0ffb02eb3f80383b4
2020-10-07 00:01:18 +00:00
Sam Fowler
e8f871a2e5 Mask bearer token in logs when logLevel >= 9
Kubernetes-commit: f0f52255412cbc6834bd225a59608ebb4a0d399b
2020-10-06 11:10:38 +10:00
Martin Schimandl
3450a048bc Fix staticchecks in vendor/k8s.io/client-go
Kubernetes-commit: 13c017056c924e148113e42786a511ed2fee7594
2020-10-01 12:40:32 +02:00
Dan Ramich
f39ca994bd Don't start goroutine for noMetrics
Problem:
When calling newQueue metrics can be of type noMetrics when just calling
New. When doing this a new goroutine is created to update the metrics
but in this case there are no metrics so it's just creating goroutines
that don't do anything but consume resources.

Solution:
If the incoming metrics is of type noMetrics, don't start the goroutine

Kubernetes-commit: de021396f81ff438899297a6f464c70113b58475
2020-09-15 16:21:48 -06:00
Dean Coakley
53da6da2bc Remove outdated comment on wait.Until
Kubernetes-commit: 53fef4a04598c3b1ee04c4930a29dbad5bb9ca63
2020-08-20 02:08:17 +01:00
Zhou Peng
a53ab6bcda [k8s.io/client-go/discovery/discovery_client]: CustomResourceDefinition
ThirdPartyResource has been superseded by CustomResourceDefinition

Signed-off-by: Zhou Peng <p@ctriple.cn>

Kubernetes-commit: b608a203c62f693bb1ee1c91de5969a75129db30
2020-07-24 15:22:00 +08:00
Maciej Szulik
87661a7415 kubeconfig: add explicit path, if specified to loading precedence
Kubernetes-commit: 7c8e4c83fbe66548aeb446562c29c42efe1d4386
2020-07-21 15:45:36 +02:00
cici37
c06103ad31 Move cloud related feature gates to controller-manager
Kubernetes-commit: 33e23c4005465d959a8c2d5e5f4e03e057184b3a
2020-06-16 13:48:13 -07:00
Kubernetes Publisher
becbabb360 Merge pull request #95098 from phunziker/92402-memcache_test
Fix vendor/k8s.io/client-go/discovery/cached/memory staticcheck

Kubernetes-commit: 267ba6781e29a96cc7def134c7d0fa4fc46f2d23
2020-10-04 20:02:34 +00:00
Kubernetes Publisher
758467711e Merge pull request #93901 from jpbetz/atomic-structs
Treat LabelSelectors as atomic by Server Side Apply to fix #92913

Kubernetes-commit: 90c9f7b3e198e82a756a68ffeac978a00d606e55
2020-10-04 00:01:08 +00:00
Joe Betz
ec2ace78dc Bump to latest kube-openapi and SMD to pick up structType=atomic support
Kubernetes-commit: f298d549f60c9342abcff1ad17d8455cd62b19fb
2020-09-30 11:49:13 -07:00
Patrick Hunziker
0588bc827b Fix staticcheck failure for vendor/k8s.io/client-go/discovery/cached/memory
Kubernetes-commit: b08e36eeb9c18991fab5a98d456eae76f4f570b5
2020-09-27 18:31:46 +02:00
Kubernetes Publisher
a0a9b7d9d5 Merge pull request #94364 from wojtek-t/efficient_watch_resumption
Efficient watch resumption

Kubernetes-commit: 0f39af90ed39794ceea426aa0f77de67b1392308
2020-09-26 00:00:26 +00:00
Kubernetes Publisher
206f761e8e Merge pull request #93951 from eddiezane/ez/update-client-go-out-of-cluster-example
client-go: update out of cluster example with HomeDir func

Kubernetes-commit: 9d3a8a0b9698b3c7c32b0fd75138dbe0f712fa0d
2020-09-25 04:00:16 +00:00
Kubernetes Publisher
f8c0b224ad Merge pull request #94947 from phillc/master
Replace 'the the ' with 'the '

Kubernetes-commit: 63d4a032707d4e19719a58707540858f86d02f6f
2020-09-24 04:00:14 +00:00
phillc
8ea16c1919 find . -type f \( -name "*.go" -or -name "*.md" \) -print0 | xargs -0 gsed -i 's/the the /the /g'
Kubernetes-commit: adbc7c2172ea622db7399f41e893063b00ca1a87
2020-09-21 16:37:12 -04:00
Kubernetes Publisher
cba7285b7f Merge pull request #93214 from trashhalo/prefer-error
test: prefer NoError/Error over Nil/NotNil

Kubernetes-commit: 09b3f6dbb3224f32d28c81f330f303ac16ee2eae
2020-09-17 00:02:35 +00:00
Kubernetes Publisher
a32e6027fa Merge pull request #94090 from deads2k/podpreset
remove pod presets

Kubernetes-commit: 54df1fdc9083ecc459ba60f395d755a90a2cd0b8
2020-09-15 08:57:50 +00:00
wojtekt
866e6a7e3c Allow tracking resource version for reflector store
Kubernetes-commit: 4af1328bb8a3b3eb2289bbbe624480548dd39cdc
2020-08-31 15:58:16 +02:00
David Eads
78470a58b0 clean up podpreset deprecated client
Kubernetes-commit: 82ed033ec9e05dfb33621ccd6244bc1f68f777e5
2020-08-19 08:35:52 -04:00
David Eads
e65579977d generated
Kubernetes-commit: c0c033b12ff25b86fa36ccadbed61cbd166c4b6b
2020-08-18 16:59:59 -04:00
David Eads
26b3743737 remove generated podpreset
Kubernetes-commit: 4172068d93c21001b8f194b5c1e11dfb492ff8bb
2020-08-18 16:36:19 -04:00
David Eads
890d74c7cb remove pod presets
Kubernetes-commit: c7911a384cbc11a4b5003da081b181d6b814d07e
2020-08-18 16:31:46 -04:00
Kubernetes Publisher
909a5a3935 Merge pull request #94594 from knight42/fix/TestGetListener
test(portforward): deflake TestGetListener

Kubernetes-commit: 0e58014d71ba92a055e41541b3b7b7373cc0343e
2020-09-09 13:19:11 +00:00
knight42
9ff85ef8ef test(portforward): deflake TestGetListener
Signed-off-by: knight42 <anonymousknight96@gmail.com>

Kubernetes-commit: bb68741fcbe82a7b17e05e82f7a71bd0c4815e02
2020-09-09 15:40:56 +08:00
Kubernetes Publisher
f0b431a6e0 Merge pull request #94605 from yttan/lint
fix golint failures for staging/src/k8s.io/client-go/examples/workqueue

Kubernetes-commit: 1c6057b59ca7a1eee66086b86c75315cf26db081
2020-09-09 05:18:54 +00:00
Kubernetes Publisher
42c4a6e381 Merge pull request #93087 from roycaihw/storage-version/move-types
Move the StorageVersions types to kube-apiserver

Kubernetes-commit: 5e95af8c7d9dbcb298bda2e713ba20a103401fe1
2020-09-09 01:19:13 +00:00
yttan
3f4798d9ac fix golint failures for staging/src/k8s.io/client-go/examples/workqueue
Kubernetes-commit: d3db1ec12d1156fbdefacb15b5c5c6d31523a163
2020-09-08 15:01:45 +08:00
Eddie Zaneski
a6ca2f510c Update client-go out of cluster example
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>

Kubernetes-commit: 522cba454b69c80d8a336026d6bc92a93955cbe1
2020-08-12 17:55:26 -06:00
Haowei Cai
f20af936fc generated
Kubernetes-commit: 769f057004f664ece06e5db5e77292534e4e86c4
2020-07-21 10:47:25 -07:00
Kubernetes Publisher
529dda0cb8 Merge pull request #94570 from knight42/fix/TestEventSeriesf
test(tools::events): deflake TestEventSeriesf

Kubernetes-commit: 86cbfc3ca271cde93ebf5aabbe088e2b0641b50b
2020-09-07 17:18:43 +00:00
Kubernetes Publisher
23fa3f5256 Merge pull request #94363 from mborsz/patch-13
Add WatchListPageSize to cache.Config

Kubernetes-commit: c06bc2f6e9fe0aefea2f5b8804cdb68c7c52dfc8
2020-09-07 09:19:04 +00:00
knight42
da11764900 test(tools::events): deflake TestEventSeriesf
Signed-off-by: knight42 <anonymousknight96@gmail.com>

Kubernetes-commit: d9bff7b27618bd31330187add92594a8a520e8d4
2020-09-06 16:31:15 +08:00
Kubernetes Publisher
0d9e08cf3a Merge pull request #94556 from knight42/fix/TestMetrics
test(workqueue): deflake TestMetrics

Kubernetes-commit: ec8a54b5ea3b91bbb98c6cc4407b210b220399d6
2020-09-05 21:19:05 +00:00
Kubernetes Publisher
ebfbb6a14e Merge pull request #94554 from knight42/fix/TestRetryWatcherToFinishWithUnreadEvents
test(watch-tool): deflake TestRetryWatcherToFinishWithUnreadEvents

Kubernetes-commit: 74053d555d71a14e3853b97e204d7d6415521375
2020-09-05 10:15:40 -07:00
knight42
f2963a02f6 test(workqueue): deflake TestMetrics
Signed-off-by: knight42 <anonymousknight96@gmail.com>

Kubernetes-commit: b70e1d836c2d438af6b01fd297677b900b364a33
2020-09-05 18:50:45 +08:00
knight42
a922620591 test(watch-tool): deflake TestRetryWatcherToFinishWithUnreadEvents
Signed-off-by: knight42 <anonymousknight96@gmail.com>

Kubernetes-commit: 1d92314f262548b6b24e309943274e0d9d196a41
2020-09-05 17:19:47 +08:00
Kubernetes Publisher
62c82f5540 Merge pull request #94483 from derekwaynecarr/improve-debugging-event-flake
Improve ability to debug Events e2e failure

Kubernetes-commit: 62321af7ab1c8abb44f5d99e7af560b22bd0a7c6
2020-09-04 13:19:07 +00:00
Derek Carr
475bc66604 Improve ability to debug Events e2e failure
Kubernetes-commit: 4502fa3cfcd6025ba434f8626102e56d09d95b7e
2020-09-03 15:01:33 -04:00
Kubernetes Publisher
7cd71358d5 Merge pull request #93919 from azush26/modify-format
Modify the warning message format from "%d" to "%v" in shared_informer.go.

Kubernetes-commit: d1590e70e885ea93463cf27d78b46e15cef7c5ad
2020-09-03 17:18:57 +00:00
Kubernetes Publisher
ba26c4506d Merge pull request #94235 from kevindelgado/draft/connection-refused-backoff
Add exponential backoff for connection refused errors

Kubernetes-commit: e688a0692c5a1bd891ed761ef2af2092731eede0
2020-09-03 01:18:33 +00:00
Maciej Borsz
a52faa7892 Add WatchListPageSize to cache.Config
Currently there is no way to specify WatchListPageSize used by Controller. This PR adds a field that can be used to specify this.

Change-Id: I241454a45dd94d3ea65a91b297f530e217f843aa

Kubernetes-commit: 43f5afe1a1dd058a2564cd3b2f330fc2a401f607
2020-08-31 12:52:45 +02:00
Kevin Delgado
4d01b584c3 Add exp backoff for connection refused errors
Currently when ListAndWatch() receives a connection refused error, it is
assumed to be due to the apiserver being transiently unresponsive. In
situations where a controller is running outside the k8s cluster it's
controlling, it is more common for the controller to lose connection
permanently to the apiserver and needs to exponentially backoff its
retry rather than continously spamming logs with Watch attempts that
will never succeed.

Kubernetes-commit: 1ff789f2bb9bf7fbb3df35977bc249c0dd019d31
2020-08-25 19:15:21 +00:00
Kubernetes Publisher
bb860d7b6e Merge pull request #94316 from janeczku/fix_reflector_stall_backwards_comp
Fix bug in reflector not detecting "Too large resource version" error

Kubernetes-commit: fd2c584b8f39dc72c48061d14380661df1680798
2020-09-02 13:23:34 +00:00
Kubernetes Publisher
b643ec487e Merge pull request #93499 from ZeroMagic/azure-autorest
chore: upgrade Azure/go-autorest/autorest to v0.11.1

Kubernetes-commit: e695b40db85cddd2ff87b35ec978b2c76b11dd4c
2020-09-02 13:23:32 +00:00
Kubernetes Publisher
aeb5f1a775 Merge pull request #93646 from gobomb/fix-panic-defer
let panics propagate up when processLoop in informer controller panic in client-go

Kubernetes-commit: 5a7970a42bddb415a5ef3b21f181abba0a5c37de
2020-09-02 05:18:30 +00:00
Kubernetes Publisher
57f65489c1 Merge pull request #94331 from liggitt/warning-docs
Improve docs for client-go warning handlers

Kubernetes-commit: 220c3f46258b2d1445bc57ef40dd92221eaa3a38
2020-08-30 17:18:15 +00:00
Jordan Liggitt
dbb8ed36f1 Improve docs for client-go warning handlers
Kubernetes-commit: b0573d526d5eb171e7e21edd642ffe5c258c37a7
2020-08-29 10:40:33 -04:00
janeczku
47f16e33aa Fixed reflector not recovering from "Too large resource version" errors with API servers 1.17.0-1.18.5
Kubernetes-commit: e1f4bfe1db8d3975bf626c2c8536dd8076aeb7d4
2020-08-28 21:17:27 +02:00
Kubernetes Publisher
e4aeb38be1 Merge pull request #93529 from latteczy/master
reduce the number of type conversions and correct variable name

Kubernetes-commit: 01ca6fb5c951df5154d1496c2f402c44a5809d33
2020-08-28 17:18:13 +00:00
Kubernetes Publisher
67e1ce8f65 Merge pull request #92987 from nikhita/cleanup-owners-apimachinery
apimachinery: remove inactive members from OWNERS

Kubernetes-commit: 0a1aa394b79f4647a3fe841b4ddee31a62596eb0
2020-08-28 05:18:15 +00:00
Kubernetes Publisher
91da5ef685 Merge pull request #91968 from MikeSpreitzer/fix91709
Remove contemplation of invariant violations from delta_fifo.go

Kubernetes-commit: 95fcb55b416f7f68ba1707cb9e6d11a3ed63f5c7
2020-08-28 01:18:06 +00:00
Kubernetes Publisher
c0a8e7c5dc Merge pull request #93735 from wking/fix-attempting-to-acquire-leader-lease-double-space
leaderelection: Remove doubled space in "attempting to acquire leader lease" log

Kubernetes-commit: 200283ab851772930b00944d3a360211f507c8ec
2020-08-28 01:18:04 +00:00
Kubernetes Publisher
b0d0d71889 Merge pull request #93809 from Howie66/chore-Correct-words
Chore correct words

Kubernetes-commit: 33a7ea7ca1bebdc4fa2e164ee7e700ff90030d0b
2020-08-27 21:18:27 +00:00
Kubernetes Publisher
5d33118d47 Merge pull request #93571 from ChrsMark/patch-1
Document blocking behaviour of RunOrDie and Run

Kubernetes-commit: 6b963ed9c841619d511d2830719b6100d6ab1431
2020-08-27 13:18:24 +00:00
Kubernetes Prow Robot
44d47f2411 Merge pull request #851 from nikhita/readme-release-19-update
README: add 1.19 in compatibility matrix
2020-08-27 02:29:01 -07:00
Nikhita Raghunath
58113e9136 README: add 1.19 in compatibility matrix 2020-08-24 18:37:21 +05:30
Kubernetes Publisher
20923fd71b Merge pull request #94147 from liggitt/json-patch
Update json-patch to v4.9.0 tagged release

Kubernetes-commit: ce3dd04c49067d0f7cb713d0b866b5b7eea04a18
2020-08-21 05:17:52 +00:00
Jordan Liggitt
89a1c66830 Update json-patch to v4.9.0 tagged release
Kubernetes-commit: 245064a3518c7a42fe830316da2fbfd2667db01d
2020-08-20 17:05:24 -04:00
Kubernetes Publisher
e7a1d9ada0 Merge pull request #93867 from apelisse/update-smd
Update SMD to v4.0.1 and kube-openapi

Kubernetes-commit: f4e9c3fd2745695308edd1fd725911fa564efe83
2020-08-13 01:20:17 +00:00
azush26
5f6a1b08cd modify the warning log format from %d to %v
Kubernetes-commit: ac1168e0e922ccd32b0fcc3d3aecac8920cedbda
2020-08-12 16:05:59 +09:00
Antoine Pelisse
778a95cf51 Update SMD to v4.0.1 and kube-openapi
Kubernetes-commit: f4c145511a0bb62ea7ee1f2154945c84c17ffcd5
2020-08-10 13:02:25 -07:00
Kubernetes Publisher
9bbcfbab83 Merge pull request #93810 from liggitt/json-patch-4.8.0
Update to json-patch 4.8.0

Kubernetes-commit: 9b78bd59796d3937986934582230174606403780
2020-08-08 21:17:39 +00:00
Jordan Liggitt
bc308599e4 Update to json-patch 4.8.0
Kubernetes-commit: cc6814f83ccad671c79570b44c84b280709b4c74
2020-08-08 09:53:56 -04:00
lihaowei
abfce0f8c3 Format Codes
Chore: Correct words and format codes

Revert three changes

Revert 1 change

Revert again

Revert 2 changes

Kubernetes-commit: af7cf4abc6bfeb0d2cfaca76097cf7a0603c4495
2020-08-08 13:27:28 +08:00
Kubernetes Publisher
11a3c5a78f Merge pull request #93797 from liggitt/unwrap-net-errors
[go1.15] Use errors.As to unwrap net errors

Kubernetes-commit: ce662e1621f6ca46de5ffba27d1bf0f4102e1cc1
2020-08-08 05:17:16 +00:00
Jordan Liggitt
e3251a06c1 [go1.15] Use errors.As to unwrap net errors
Kubernetes-commit: c61c60eb1f59c92b0628484b55c640e585555aab
2020-08-07 15:22:54 -04:00
W. Trevor King
42b7b70457 leaderelection: Remove doubled space in "attempting to acquire leader lease" log
The extra space was introduced in 5b854e7b17 (say which lease is being
acquired, 2018-01-16, #58341).

Kubernetes-commit: e5347d48f9e67776984fbe284f03aefc425a951d
2020-08-05 14:31:39 -07:00
gobomb
330cb14339 let panics propagate up when processLoop panic
Kubernetes-commit: 19a3ca2c289b6f3dc8cd495e3db0d347b5a3b774
2020-08-03 09:30:39 +00:00
Kubernetes Publisher
00dbcca6ee Merge pull request #93408 from joelsmith/master
jsonpath: disallow multiple immediate recursive descent

Kubernetes-commit: c0ec2eee41794796dee230f75478602b707f2be2
2020-08-02 13:25:07 +00:00
Kubernetes Publisher
6ecbef1775 Merge pull request #93602 from liggitt/utils
Update k8s.io/utils

Kubernetes-commit: a5090a8ff253e1aa626cd5613329e23aaec27e88
2020-07-31 17:16:55 +00:00
Jordan Liggitt
21dad40135 Update k8s.io/utils
Kubernetes-commit: c11e52f410603d2e8eaf6591b4c83ab19d233b17
2020-07-31 10:44:33 -04:00
Joel Smith
2221ace373 jsonpath: disallow multiple immediate recursive descent (e.g. ....Foo)
Kubernetes-commit: 8c702254938c40a48b2e3db78fcc944ca50fdc65
2020-07-30 10:53:12 -06:00
Chris Mark
ffcde95237 Document blocking behaviour of RunOrDie and Run
Kubernetes-commit: b09c01c9e2a35b8f91fad319db77bdf8963c05f1
2020-07-30 17:04:57 +03:00
caozhiyuan
fa1e013ed0 reduce type conversion and correct variable name
Kubernetes-commit: 13468442bfbdf69a6e6690497fce427317cff790
2020-07-29 19:18:05 +08:00
ZeroMagic
3431b0db1c chore: upgrade Azure/go-autorest to v14.2.0
use autorest v0.11.1

Signed-off-by: ZeroMagic <jiliu8@microsoft.com>

Kubernetes-commit: 7b444eeff37234c329a0c2ccbd5195e434c22791
2020-07-28 07:25:04 +00:00
Kubernetes Publisher
36233866f1 Merge pull request #93264 from justaugustus/go115
Update Golang to v1.15.0-rc.1

Kubernetes-commit: 9a20f30745477423e8776bb0d05316c00648f49b
2020-07-26 13:17:03 +00:00
Jordan Liggitt
523b4b71c2 generated: hack/update-vendor.sh
Kubernetes-commit: 6c2d18369f688b7200cefdca71709bb698081e84
2020-07-25 15:27:12 -04:00
Jordan Liggitt
9a590f8895 [go1.15] go.mod: update to go1.15
Kubernetes-commit: 247fcdfda5311bfc446c61c7bda67803e3527fdd
2020-07-25 15:02:16 -04:00
Kubernetes Publisher
6b13c5bd95 Merge pull request #93425 from liggitt/string-cast
Fix int->string casts

Kubernetes-commit: 19caf386650b80ce9d288cc8c42efcf2f0fd87b1
2020-07-25 09:16:56 +00:00
Kubernetes Publisher
554373823d Merge pull request #93410 from nikhita/apimachinery-triage-labels
Don't apply triage/needs-information on apimachinery and instrumentation PRs

Kubernetes-commit: 54e20707225656d6f4eaa32236216b6830a5b107
2020-07-25 05:16:34 +00:00
Jordan Liggitt
e6a0f4acba Fix int->string casts
Kubernetes-commit: 124a5ddf725c4862520d8619017cac9db7a03522
2020-07-24 11:13:07 -04:00
Nikhita Raghunath
e83c4c2825 Revert "Merge pull request #93156 from logicalhan/triage-api-machinery"
This reverts commit 32438cf26938091bea56e7ca7c3fcf4215652f9c, reversing
changes made to bb6a6aa3915cc9f7efaaf2291f6adac8333fd33c.

Kubernetes-commit: c00dae060731f6286ee3743db24782f09c33945a
2020-07-24 13:01:02 +05:30
Kubernetes Publisher
3473491eeb Merge pull request #93156 from logicalhan/triage-api-machinery
automatically assign triage labels to api-machinery tagged PRs

Kubernetes-commit: 32438cf26938091bea56e7ca7c3fcf4215652f9c
2020-07-22 05:19:03 +00:00
Kubernetes Publisher
d46605b64e Merge pull request #93253 from liggitt/utils-trace
Update k8s.io/utils

Kubernetes-commit: bb079afdef2b36a9fc9d081411a1de18b91d1ae0
2020-07-21 05:15:58 +00:00
Jordan Liggitt
5252da0c70 Update k8s.io/utils
Kubernetes-commit: 7aacbeac144a7772fa8eac5582bbd64bc52804a4
2020-07-20 11:12:29 -04:00
Stephen Solka
166114c4a0 prefer NoError/Error over Nil/NotNil
Kubernetes-commit: 203679cc6105ea490e75af1efa83497b771d7d36
2020-07-18 20:23:35 -04:00
Han Kang
7137eafebb automatically assign triage labels to api-machinery tagged PRs
Change-Id: Ifcc8a85d190d6370423af27f6e6c4c90b8472981

Kubernetes-commit: 9129dbc98bd847be9d96b39733a3b28107c920a1
2020-07-16 13:13:59 -07:00
Kubernetes Publisher
319dbfd0ed Merge pull request #92926 from detiber/FixFakeScaleClientUpdate
[client-go] Fix argument ordering for fake scale client update

Kubernetes-commit: 165a221b1c8eea44dd1a6281bc9c8ff5ee3a33d3
2020-07-13 13:08:42 +00:00
Kubernetes Publisher
505a1f4431 Merge pull request #92919 from dashpole/update_cadvisor
Update cAdvisor to v0.37.0

Kubernetes-commit: 6b5dc3770851fdc1f356e36fd17810c744181fb1
2020-07-13 13:08:41 +00:00
Kubernetes Publisher
7392b9857a Merge pull request #92910 from soltysh/kubectl_cache
Setup cache dirs properly based on --cache-dir value

Kubernetes-commit: 7d1daa09383d32fe7a325d6275d9bd51cba45ee5
2020-07-13 13:08:38 +00:00
Kubernetes Publisher
7fa340820d Merge pull request #92874 from chelseychen/event-api
Fix a few places where source field is empty when creating events via events/v1

Kubernetes-commit: c23a4b08d704156db724769a32edc71c921095d4
2020-07-12 05:06:49 +00:00
Nikhita Raghunath
480d796592 apimachinery: remove inactive members from OWNERS
Kubernetes-commit: db495ea9837cf840639a4e02085253fb341e12b5
2020-07-11 19:28:24 +05:30
Kubernetes Publisher
16621f6444 Merge pull request #92768 from deads2k/security-contacts
update security contacts for apimachinery repos

Kubernetes-commit: 0cc96859473a21eb7d4f44f355d50881e12925ad
2020-07-11 01:12:23 +00:00
Kubernetes Publisher
2cf22cd488 Merge pull request #92661 from jpbetz/smd-bump-field-unsetting
Bump to SMD PR#166 to pick up unsetting field changes and add integration tests

Kubernetes-commit: 49dced762da7bc9f74474e9f8f3efe198ff46767
2020-07-11 01:12:21 +00:00
David Ashpole
e2f93aa779 update cAdvisor to v0.37.0
Kubernetes-commit: 1f70708f6cc85985725c11cd69c4965c1f97b314
2020-07-09 10:23:10 -07:00
Jason DeTiberus
0117bb8b93 [client-go] Fix argument ordering for fake scale client update
Fixes the argument order used when calling testing.NewUpdateSubresourceAction
within the fake scale client. This was causing the generated action to swap the values
of the Namespace and Subresource in the Action.

Kubernetes-commit: 34a446d812c423da7a306963f250f4002dac9be8
2020-07-08 20:27:13 -04:00
Maciej Szulik
65806b89ce Setup cache dirs properly based on --cache-dir value
Kubernetes-commit: 6c6cd2deeb03040d458b00824fd6c1a900a81b51
2020-07-08 15:43:25 +02:00
Mike Spreitzer
53f29dc721 Replaced repair with returning error, in delta_fifo.go
When dedupDeltas does the impossible and the key is already queued,
return an error rather than maintain the data structure invariants.

Kubernetes-commit: a39481a4f6cf33f9bf4555adcffa28077863e7a9
2020-07-08 01:15:51 -04:00
Chelsey Chen
51d7273066 Update conversion between ReportingController and Source.Component
Kubernetes-commit: e010436e2acc96d710620a91ceaaa86becca4060
2020-07-07 13:38:48 -04:00
Mike Spreitzer
a166e2578b Repair instead of panic when data corruption detected in DeltaFIFO
Kubernetes-commit: abcd0f82c5634c7a23b9390172b7c6ae907d84f7
2020-07-02 23:23:59 -04:00
David Eads
90050574e3 update security contacts for apimachinery repos
Kubernetes-commit: 29c4e858b0017f8aa328d487adbbe910b8205cf8
2020-07-02 16:00:53 -04:00
Mikhail Mazurskiy
29b07456f5 Check errors of the Close call
Error from out.Close() was not checked

Kubernetes-commit: f9b928f1f13821b65ea4ef783f847993c51fb4dd
2020-06-15 21:47:08 +10:00
Mikhail Mazurskiy
6cc39819fd Make inClusterConfigProvider thread safe
If configuration object is used concurrently
it is not safe to mutate self.
There is no need for mutation so avoid it
just in case.

Kubernetes-commit: 9e360eb05efafd0fcabd5a065b62cb8226da94c2
2020-06-15 21:17:45 +10:00
Mikhail Mazurskiy
6d09f8e62e Stop using mergo.MergeWithOverwrite
Use the recommended replacement instead.

Kubernetes-commit: 243a9b204e14dc9c92f08cd3252c31731b9532fd
2020-06-15 21:11:27 +10:00
Mikhail Mazurskiy
277eea62aa Cleanup currentMigrationRules
1. Use filepath for filename manipulations
2. Restructure method logic

Kubernetes-commit: 11800147f51e85b9a4fb7eb2654cae3ded9d8cf0
2020-06-15 20:59:21 +10:00
Mike Spreitzer
826338c319 Remove contemplation of invariant violations from delta_fifo.go
Some comments and code incorrectly contemplated violating the
invariant that a keys is in `f.items` if and only if it is in
`f.queue`.

Also fixed up some comment wording.

Kubernetes-commit: 5efd727d112206ef9a8ede93c5878b0d40707ae9
2020-06-09 18:57:28 -04:00
Monis Khan
eb15c10113 Generated bazel
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 0284139660dcabfe8816b3136f12d79a5a236db1
2020-05-06 02:17:37 -04:00
Monis Khan
8959cc2497 Generated conversions
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 99566970ceceb7e60f48cf2ff3015586fe50cc0e
2020-05-06 01:28:11 -04:00
Monis Khan
9e147f192f exec credential provider: wire in cluster info
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: f97422c8bd57692f5a1a3aa6dc6abc31051ebc82
2020-05-06 01:01:09 -04:00
Zachary Seguin
7efa263687 Add lease release tests in leader election
Kubernetes-commit: a4979cd2a69192138b5998daca07d9b7ca6c8801
2020-04-22 18:52:44 -04:00
Zachary Seguin
710705cfe6 Generate complete leader election record to resolve leader election issues with LeaseLocks
Kubernetes-commit: c902b8a20578a1d299e3563613a66ed32f70efad
2019-08-03 17:40:03 -04:00
André Martins
2396a52017 client-go/rest: fix finalURLTemplate for url base == "/"
In some environments, where url base is "/", it can cause all paths to
be presented in metrics with "{prefix}" as `groupIndex` is with the wrong
index. To fix the behavior in such environments, it was added a
conditional branch to check if the URL base is "/" and, thus, print the
metrics with the correct path, for example "api/v1/nodes/{name}" instead
of "{prefix}".

Fixes: 99248b8fe1fe ("Rewrite finalURLTemplate used only for metrics because of dynamic client change")
Signed-off-by: André Martins <aanm90@gmail.com>

Kubernetes-commit: c039b02fa7281fc061455e23b6530ed8b4d19645
2019-02-21 20:25:36 +01:00
2057 changed files with 220546 additions and 49714 deletions

478
Godeps/Godeps.json generated
View File

@@ -1,478 +0,0 @@
{
"ImportPath": "k8s.io/client-go",
"GoVersion": "unknown",
"GodepVersion": "gen-godeps",
"Packages": [
"./..."
],
"Deps": [
{
"ImportPath": "cloud.google.com/go",
"Rev": "v0.51.0"
},
{
"ImportPath": "cloud.google.com/go/bigquery",
"Rev": "v1.0.1"
},
{
"ImportPath": "cloud.google.com/go/datastore",
"Rev": "v1.0.0"
},
{
"ImportPath": "cloud.google.com/go/pubsub",
"Rev": "v1.0.1"
},
{
"ImportPath": "cloud.google.com/go/storage",
"Rev": "v1.0.0"
},
{
"ImportPath": "dmitri.shuralyov.com/gpu/mtl",
"Rev": "666a987793e9"
},
{
"ImportPath": "github.com/Azure/go-autorest/autorest",
"Rev": "v0.9.6"
},
{
"ImportPath": "github.com/Azure/go-autorest/autorest/adal",
"Rev": "v0.8.2"
},
{
"ImportPath": "github.com/Azure/go-autorest/autorest/date",
"Rev": "v0.2.0"
},
{
"ImportPath": "github.com/Azure/go-autorest/autorest/mocks",
"Rev": "v0.3.0"
},
{
"ImportPath": "github.com/Azure/go-autorest/logger",
"Rev": "v0.1.0"
},
{
"ImportPath": "github.com/Azure/go-autorest/tracing",
"Rev": "v0.5.0"
},
{
"ImportPath": "github.com/BurntSushi/toml",
"Rev": "v0.3.1"
},
{
"ImportPath": "github.com/BurntSushi/xgb",
"Rev": "27f122750802"
},
{
"ImportPath": "github.com/NYTimes/gziphandler",
"Rev": "56545f4a5d46"
},
{
"ImportPath": "github.com/PuerkitoBio/purell",
"Rev": "v1.0.0"
},
{
"ImportPath": "github.com/PuerkitoBio/urlesc",
"Rev": "5bd2802263f2"
},
{
"ImportPath": "github.com/census-instrumentation/opencensus-proto",
"Rev": "v0.2.1"
},
{
"ImportPath": "github.com/chzyer/logex",
"Rev": "v1.1.10"
},
{
"ImportPath": "github.com/chzyer/readline",
"Rev": "2972be24d48e"
},
{
"ImportPath": "github.com/chzyer/test",
"Rev": "a1ea475d72b1"
},
{
"ImportPath": "github.com/client9/misspell",
"Rev": "v0.3.4"
},
{
"ImportPath": "github.com/davecgh/go-spew",
"Rev": "v1.1.1"
},
{
"ImportPath": "github.com/dgrijalva/jwt-go",
"Rev": "v3.2.0"
},
{
"ImportPath": "github.com/docker/spdystream",
"Rev": "449fdfce4d96"
},
{
"ImportPath": "github.com/docopt/docopt-go",
"Rev": "ee0de3bc6815"
},
{
"ImportPath": "github.com/elazarl/goproxy",
"Rev": "947c36da3153"
},
{
"ImportPath": "github.com/emicklei/go-restful",
"Rev": "ff4f55a20633"
},
{
"ImportPath": "github.com/envoyproxy/go-control-plane",
"Rev": "5f8ba28d4473"
},
{
"ImportPath": "github.com/envoyproxy/protoc-gen-validate",
"Rev": "v0.1.0"
},
{
"ImportPath": "github.com/evanphx/json-patch",
"Rev": "e83c0a1c26c8"
},
{
"ImportPath": "github.com/fsnotify/fsnotify",
"Rev": "v1.4.9"
},
{
"ImportPath": "github.com/ghodss/yaml",
"Rev": "73d445a93680"
},
{
"ImportPath": "github.com/go-gl/glfw/v3.3/glfw",
"Rev": "12ad95a8df72"
},
{
"ImportPath": "github.com/go-logr/logr",
"Rev": "v0.2.0"
},
{
"ImportPath": "github.com/go-openapi/jsonpointer",
"Rev": "46af16f9f7b1"
},
{
"ImportPath": "github.com/go-openapi/jsonreference",
"Rev": "13c6e3589ad9"
},
{
"ImportPath": "github.com/go-openapi/spec",
"Rev": "6aced65f8501"
},
{
"ImportPath": "github.com/go-openapi/swag",
"Rev": "1d0bd113de87"
},
{
"ImportPath": "github.com/gogo/protobuf",
"Rev": "v1.3.1"
},
{
"ImportPath": "github.com/golang/glog",
"Rev": "23def4e6c14b"
},
{
"ImportPath": "github.com/golang/groupcache",
"Rev": "215e87163ea7"
},
{
"ImportPath": "github.com/golang/mock",
"Rev": "v1.3.1"
},
{
"ImportPath": "github.com/golang/protobuf",
"Rev": "v1.4.2"
},
{
"ImportPath": "github.com/google/btree",
"Rev": "v1.0.0"
},
{
"ImportPath": "github.com/google/go-cmp",
"Rev": "v0.4.0"
},
{
"ImportPath": "github.com/google/gofuzz",
"Rev": "v1.1.0"
},
{
"ImportPath": "github.com/google/martian",
"Rev": "v2.1.0"
},
{
"ImportPath": "github.com/google/pprof",
"Rev": "d4f498aebedc"
},
{
"ImportPath": "github.com/google/renameio",
"Rev": "v0.1.0"
},
{
"ImportPath": "github.com/google/uuid",
"Rev": "v1.1.1"
},
{
"ImportPath": "github.com/googleapis/gax-go/v2",
"Rev": "v2.0.5"
},
{
"ImportPath": "github.com/googleapis/gnostic",
"Rev": "v0.4.1"
},
{
"ImportPath": "github.com/gregjones/httpcache",
"Rev": "9cad4c3443a7"
},
{
"ImportPath": "github.com/hashicorp/golang-lru",
"Rev": "v0.5.1"
},
{
"ImportPath": "github.com/hpcloud/tail",
"Rev": "v1.0.0"
},
{
"ImportPath": "github.com/ianlancetaylor/demangle",
"Rev": "5e5cf60278f6"
},
{
"ImportPath": "github.com/imdario/mergo",
"Rev": "v0.3.5"
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "v1.1.9"
},
{
"ImportPath": "github.com/jstemmer/go-junit-report",
"Rev": "v0.9.1"
},
{
"ImportPath": "github.com/kisielk/errcheck",
"Rev": "v1.2.0"
},
{
"ImportPath": "github.com/kisielk/gotool",
"Rev": "v1.0.0"
},
{
"ImportPath": "github.com/kr/pretty",
"Rev": "v0.2.0"
},
{
"ImportPath": "github.com/kr/pty",
"Rev": "v1.1.1"
},
{
"ImportPath": "github.com/kr/text",
"Rev": "v0.1.0"
},
{
"ImportPath": "github.com/mailru/easyjson",
"Rev": "d5b7844b561a"
},
{
"ImportPath": "github.com/modern-go/concurrent",
"Rev": "bacd9c7ef1dd"
},
{
"ImportPath": "github.com/modern-go/reflect2",
"Rev": "v1.0.1"
},
{
"ImportPath": "github.com/munnerz/goautoneg",
"Rev": "a547fc61f48d"
},
{
"ImportPath": "github.com/mxk/go-flowrate",
"Rev": "cca7078d478f"
},
{
"ImportPath": "github.com/onsi/ginkgo",
"Rev": "v1.11.0"
},
{
"ImportPath": "github.com/onsi/gomega",
"Rev": "v1.7.0"
},
{
"ImportPath": "github.com/peterbourgon/diskv",
"Rev": "v2.0.1"
},
{
"ImportPath": "github.com/pkg/errors",
"Rev": "v0.9.1"
},
{
"ImportPath": "github.com/pmezard/go-difflib",
"Rev": "v1.0.0"
},
{
"ImportPath": "github.com/prometheus/client_model",
"Rev": "14fe0d1b01d4"
},
{
"ImportPath": "github.com/rogpeppe/go-internal",
"Rev": "v1.3.0"
},
{
"ImportPath": "github.com/spf13/afero",
"Rev": "v1.2.2"
},
{
"ImportPath": "github.com/spf13/pflag",
"Rev": "v1.0.5"
},
{
"ImportPath": "github.com/stretchr/objx",
"Rev": "v0.1.0"
},
{
"ImportPath": "github.com/stretchr/testify",
"Rev": "v1.4.0"
},
{
"ImportPath": "go.opencensus.io",
"Rev": "v0.22.2"
},
{
"ImportPath": "golang.org/x/crypto",
"Rev": "bac4c82f6975"
},
{
"ImportPath": "golang.org/x/exp",
"Rev": "da58074b4299"
},
{
"ImportPath": "golang.org/x/image",
"Rev": "cff245a6509b"
},
{
"ImportPath": "golang.org/x/lint",
"Rev": "fdd1cda4f05f"
},
{
"ImportPath": "golang.org/x/mobile",
"Rev": "d2bd2a29d028"
},
{
"ImportPath": "golang.org/x/mod",
"Rev": "c90efee705ee"
},
{
"ImportPath": "golang.org/x/net",
"Rev": "d3edc9973b7e"
},
{
"ImportPath": "golang.org/x/oauth2",
"Rev": "858c2ad4c8b6"
},
{
"ImportPath": "golang.org/x/sync",
"Rev": "cd5d95a43a6e"
},
{
"ImportPath": "golang.org/x/sys",
"Rev": "ed371f2e16b4"
},
{
"ImportPath": "golang.org/x/text",
"Rev": "v0.3.3"
},
{
"ImportPath": "golang.org/x/time",
"Rev": "555d28b269f0"
},
{
"ImportPath": "golang.org/x/tools",
"Rev": "7b8e75db28f4"
},
{
"ImportPath": "golang.org/x/xerrors",
"Rev": "9bdfabe68543"
},
{
"ImportPath": "google.golang.org/api",
"Rev": "v0.15.0"
},
{
"ImportPath": "google.golang.org/appengine",
"Rev": "v1.6.5"
},
{
"ImportPath": "google.golang.org/genproto",
"Rev": "cb27e3aa2013"
},
{
"ImportPath": "google.golang.org/grpc",
"Rev": "v1.27.0"
},
{
"ImportPath": "google.golang.org/protobuf",
"Rev": "v1.24.0"
},
{
"ImportPath": "gopkg.in/check.v1",
"Rev": "41f04d3bba15"
},
{
"ImportPath": "gopkg.in/errgo.v2",
"Rev": "v2.1.0"
},
{
"ImportPath": "gopkg.in/fsnotify.v1",
"Rev": "v1.4.7"
},
{
"ImportPath": "gopkg.in/inf.v0",
"Rev": "v0.9.1"
},
{
"ImportPath": "gopkg.in/tomb.v1",
"Rev": "dd632973f1e7"
},
{
"ImportPath": "gopkg.in/yaml.v2",
"Rev": "v2.2.8"
},
{
"ImportPath": "honnef.co/go/tools",
"Rev": "v0.0.1-2019.2.3"
},
{
"ImportPath": "k8s.io/api",
"Rev": "02047b7ecbbf"
},
{
"ImportPath": "k8s.io/apimachinery",
"Rev": "106aebdc1c0a"
},
{
"ImportPath": "k8s.io/gengo",
"Rev": "3a45101e95ac"
},
{
"ImportPath": "k8s.io/klog/v2",
"Rev": "v2.2.0"
},
{
"ImportPath": "k8s.io/kube-openapi",
"Rev": "656914f816f9"
},
{
"ImportPath": "k8s.io/utils",
"Rev": "6e3d28b6ed19"
},
{
"ImportPath": "rsc.io/binaryregexp",
"Rev": "v0.2.0"
},
{
"ImportPath": "sigs.k8s.io/structured-merge-diff/v3",
"Rev": "v3.0.0"
},
{
"ImportPath": "sigs.k8s.io/yaml",
"Rev": "v1.2.0"
}
]
}

5
Godeps/Readme generated
View File

@@ -1,5 +0,0 @@
This directory tree is generated automatically by godep.
Please do not edit.
See https://github.com/tools/godep for more information.

View File

@@ -1,13 +1,11 @@
# Installing client-go
## For the casual user
## Using the latest version
If you want to write a simple script, don't care about a reproducible client
library install, don't mind getting HEAD (which may be less stable than a
particular release), then simply:
If you want to use the latest version of this library, use go1.16+ and run:
```sh
go get k8s.io/client-go@master
go get k8s.io/client-go@latest
```
This will record a dependency on `k8s.io/client-go` in your go module.
@@ -17,27 +15,72 @@ The next time you `go build`, `go test`, or `go run` your project,
and detailed dependency version info will be added to your `go.mod` file
(or you can also run `go mod tidy` to do this directly).
This assumes you are using go modules with go 1.11+.
## Using a specific version
If you want to use a particular version of the `k8s.io/client-go` library,
you can indicate which version of `client-go` your project requires:
- If you are using Kubernetes versions >= `v1.17.0`, use a corresponding `v0.x.y` tag.
For example, `k8s.io/client-go@v0.20.4` corresponds to Kubernetes `v1.20.4`:
```sh
go get k8s.io/client-go@v0.20.4
```
- If you are using Kubernetes versions < `v1.17.0`, use a corresponding `kubernetes-1.x.y` tag.
For example, `k8s.io/client-go@kubernetes-1.16.3` corresponds to Kubernetes `v1.16.3`:
```sh
go get k8s.io/client-go@kubernetes-1.16.3
```
You can now import and use the `k8s.io/client-go` APIs in your project.
The next time you `go build`, `go test`, or `go run` your project,
`k8s.io/client-go` and its dependencies will be downloaded (if needed),
and detailed dependency version info will be added to your `go.mod` file
(or you can also run `go mod tidy` to do this directly).
## Troubleshooting
### Go versions prior to 1.16
If you get a message like
`module k8s.io/client-go@latest found (v1.5.2), but does not contain package k8s.io/client-go/...`,
you are likely using a go version prior to 1.16 and must explicitly specify the k8s.io/client-go version you want.
For example:
```sh
go get k8s.io/client-go@v0.20.4
```
### Conflicting requirements for older client-go versions
If you get a message like
`module k8s.io/api@latest found, but does not contain package k8s.io/api/auditregistration/v1alpha1`,
something in your build is likely requiring an old version of `k8s.io/client-go` like `v11.0.0+incompatible`.
First, try to fetch a more recent version. For example:
```sh
go get k8s.io/client-go@v0.20.4
```
If that doesn't resolve the problem, see what is requiring an `...+incompatible` version of client-go,
and update to use a newer version of that library, if possible:
```sh
go mod graph | grep " k8s.io/client-go@"
```
As a last resort, you can force the build to use a specific version of client-go,
even if some of your dependencies still want `...+incompatible` versions. For example:
```sh
go mod edit -replace=k8s.io/client-go=k8s.io/client-go@v0.20.4
go get k8s.io/client-go@v0.20.4
```
### Go modules disabled
If you get a message like `cannot use path@version syntax in GOPATH mode`,
see the instructions for [enabling go modules](#enabling-go-modules).
## Dependency management for the serious (or reluctant) user
Reasons why you might need to use a dependency management system:
* You use a dependency that client-go also uses, and don't want two copies of
the dependency compiled into your application. For some dependencies with
singletons or global inits (e.g. `glog`) this wouldn't even compile...
* You want to lock in a particular version (so you don't have to change your
code every time we change a public interface).
* You want your install to be reproducible. For example, for your CI system or
for new team members.
### Enabling go modules
Dependency management tools are built into go 1.11+ in the form of [go modules](https://github.com/golang/go/wiki/Modules).
These are used by the main Kubernetes repo (>= `v1.15.0`) and `client-go` (>= `kubernetes-1.15.0`) to manage dependencies.
If you are using go 1.11 or 1.12 and are working with a project located within `$GOPATH`,
you must opt into using go modules:
you likely do not have go modules enabled. This should be on by default in all
supported versions of Go.
```sh
export GO111MODULE=on
@@ -49,33 +92,3 @@ If you do not already have one, `go mod init` will create one for you:
```sh
go mod init
```
### Add client-go as a dependency
Indicate which version of `client-go` your project requires:
- If you are using Kubernetes versions >= `v1.17.0`, use a corresponding
`v0.x.y` tag. For example, `k8s.io/client-go@v0.17.0` corresponds to Kubernetes `v1.17.0`:
```sh
go get k8s.io/client-go@v0.17.0
```
You can also use a non-semver `kubernetes-1.x.y` tag to refer to a version
of `client-go` corresponding to a given Kubernetes release. Prior to Kubernetes
`v1.17.0` these were the only tags available for use with go modules.
For example, `kubernetes-1.16.3` corresponds to Kubernetes `v1.16.3`.
However, it is recommended to use semver-like `v0.x.y` tags over non-semver
`kubernetes-1.x.y` tags to have a seamless experience with go modules.
- If you are using Kubernetes versions < `v1.17.0` (replace `kubernetes-1.16.3` with the desired version):
```sh
go get k8s.io/client-go@kubernetes-1.16.3
```
You can now import and use the `k8s.io/client-go` APIs in your project.
The next time you `go build`, `go test`, or `go run` your project,
`k8s.io/client-go` and its dependencies will be downloaded (if needed),
and detailed dependency version info will be added to your `go.mod` file
(or you can also run `go mod tidy` to do this directly).

35
OWNERS
View File

@@ -1,19 +1,26 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- caesarxuchao
- deads2k
- lavalamp
- liggitt
- smarterclayton
- sttts
- aojea
- caesarxuchao
- deads2k
- liggitt
- smarterclayton
- sttts
- yliaog
- jpbetz
reviewers:
- caesarxuchao
- deads2k
- lavalamp
- liggitt
- soltysh
- sttts
- yliaog
- aojea
- apelisse
- caesarxuchao
- deads2k
- jpbetz
- liggitt
- soltysh
- sttts
- yliaog
- jpbetz
labels:
- sig/api-machinery
- sig/api-machinery
emeritus_approvers:
- lavalamp

View File

@@ -4,19 +4,12 @@ Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster.
We recommend using the `v0.x.y` tags for Kubernetes releases >= `v1.17.0` and
`kubernetes-1.x.y` tags for Kubernetes releases < `v1.17.0`.
See [INSTALL.md](/INSTALL.md) for detailed installation instructions.
`go get k8s.io/client-go@master` works, but will fetch `master`, which may be less stable than a tagged release.
[![BuildStatus Widget]][BuildStatus Result]
[![GoReport Widget]][GoReport Status]
The fastest way to add this library to a project is to run `go get k8s.io/client-go@latest` with go1.16+.
See [INSTALL.md](/INSTALL.md) for detailed installation instructions and troubleshooting.
[![GoDocWidget]][GoDocReference]
[BuildStatus Result]: https://travis-ci.org/kubernetes/client-go
[BuildStatus Widget]: https://travis-ci.org/kubernetes/client-go.svg?branch=master
[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes/client-go
[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes/client-go
[GoDocWidget]: https://godoc.org/k8s.io/client-go?status.svg
[GoDocReference]:https://godoc.org/k8s.io/client-go
@@ -82,13 +75,15 @@ We will backport bugfixes--but not new features--into older versions of
#### Compatibility matrix
| | Kubernetes 1.15 | Kubernetes 1.16 | Kubernetes 1.17 | Kubernetes 1.18 |
|-------------------------------|-----------------|-----------------|-----------------|-----------------|
| `kubernetes-1.15.0` | ✓ | +- | +- | +- |
| `kubernetes-1.16.0` | +- | | +- | +- |
| `kubernetes-1.17.0`/`v0.17.0` | +- | +- | ✓ | +- |
| `kubernetes-1.18.0`/`v0.18.0` | +- | +- | +- | ✓ |
| `HEAD` | +- | +- | +- | +- |
| | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | Kubernetes 1.26 | Kubernetes 1.27 | Kubernetes 1.28 |
| ----------------------------- | --------------- | --------------- | --------------- | --------------- | --------------- | --------------- |
| `kubernetes-1.23.0`/`v0.23.0` | ✓ | +- | +- | +- | +- | +- |
| `kubernetes-1.24.0`/`v0.24.0` | +- | ✓ | +- | +- | +- | +- |
| `kubernetes-1.25.0`/`v0.25.0` | +- | +- | ✓ | +- | +- | +- |
| `kubernetes-1.26.0`/`v0.26.0` | +- | +- | +- | ✓ | +- | +- |
| `kubernetes-1.27.0`/`v0.27.0` | +- | +- | +- | +- | ✓ | +- |
| `kubernetes-1.28.0`/`v0.28.0` | +- | +- | +- | +- | +- | ✓ |
| `HEAD` | +- | +- | +- | +- | +- | +- |
Key:
@@ -107,25 +102,19 @@ Key:
See the [CHANGELOG](./CHANGELOG.md) for a detailed description of changes
between client-go versions.
| Branch | Canonical source code location | Maintenance status |
|----------------|--------------------------------------|-------------------------------|
| `release-1.4` | Kubernetes main repo, 1.4 branch | = - |
| `release-1.5` | Kubernetes main repo, 1.5 branch | = - |
| `release-2.0` | Kubernetes main repo, 1.5 branch | = - |
| `release-3.0` | Kubernetes main repo, 1.6 branch | = - |
| `release-4.0` | Kubernetes main repo, 1.7 branch | = - |
| `release-5.0` | Kubernetes main repo, 1.8 branch | = - |
| `release-6.0` | Kubernetes main repo, 1.9 branch | = - |
| `release-7.0` | Kubernetes main repo, 1.10 branch | = - |
| `release-8.0` | Kubernetes main repo, 1.11 branch | =- |
| `release-9.0` | Kubernetes main repo, 1.12 branch | =- |
| `release-10.0` | Kubernetes main repo, 1.13 branch | =- |
| `release-11.0` | Kubernetes main repo, 1.14 branch | =- |
| `release-12.0` | Kubernetes main repo, 1.15 branch | ✓ |
| `release-13.0` | Kubernetes main repo, 1.16 branch | ✓ |
| `release-14.0` | Kubernetes main repo, 1.17 branch | ✓ |
| `release-1.18` | Kubernetes main repo, 1.18 branch | ✓ |
| client-go HEAD | Kubernetes main repo, master branch | ✓ |
| Branch | Canonical source code location | Maintenance status |
| -------------- | ----------------------------------- | ------------------ |
| `release-1.19` | Kubernetes main repo, 1.19 branch | =- |
| `release-1.20` | Kubernetes main repo, 1.20 branch | =- |
| `release-1.21` | Kubernetes main repo, 1.21 branch | =- |
| `release-1.22` | Kubernetes main repo, 1.22 branch | =- |
| `release-1.23` | Kubernetes main repo, 1.23 branch | =- |
| `release-1.24` | Kubernetes main repo, 1.24 branch | =- |
| `release-1.25` | Kubernetes main repo, 1.25 branch | ✓ |
| `release-1.26` | Kubernetes main repo, 1.26 branch | |
| `release-1.27` | Kubernetes main repo, 1.27 branch | |
| `release-1.28` | Kubernetes main repo, 1.28 branch | |
| client-go HEAD | Kubernetes main repo, master branch | ✓ |
Key:
@@ -171,13 +160,19 @@ you care about backwards compatibility.
### How to get it
Use go1.11+ and fetch the desired version using the `go get` command. For example:
To get the latest version, use go1.16+ and fetch using the `go get` command. For example:
```
go get k8s.io/client-go@v0.17.0
go get k8s.io/client-go@latest
```
See [INSTALL.md](/INSTALL.md) for detailed instructions.
To get a specific version, use go1.11+ and fetch the desired version using the `go get` command. For example:
```
go get k8s.io/client-go@v0.20.4
```
See [INSTALL.md](/INSTALL.md) for detailed instructions and troubleshooting.
### How to use it

View File

@@ -10,9 +10,7 @@
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
# INSTRUCTIONS AT https://kubernetes.io/security/
cjcullen
joelsmith
liggitt
philips
caesarxuchao
deads2k
lavalamp
sttts
tallclair

View File

@@ -1,7 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- ericchiang
reviewers:
- ericchiang
- rithujohn191
- apelisse
- jpbetz

View File

@@ -0,0 +1,48 @@
/*
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
// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use
// with apply.
type AuditAnnotationApplyConfiguration struct {
Key *string `json:"key,omitempty"`
ValueExpression *string `json:"valueExpression,omitempty"`
}
// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with
// apply.
func AuditAnnotation() *AuditAnnotationApplyConfiguration {
return &AuditAnnotationApplyConfiguration{}
}
// WithKey sets the Key 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 Key field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration {
b.Key = &value
return b
}
// WithValueExpression sets the ValueExpression 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 ValueExpression field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration {
b.ValueExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// ExpressionWarningApplyConfiguration represents an declarative configuration of the ExpressionWarning type for use
// with apply.
type ExpressionWarningApplyConfiguration struct {
FieldRef *string `json:"fieldRef,omitempty"`
Warning *string `json:"warning,omitempty"`
}
// ExpressionWarningApplyConfiguration constructs an declarative configuration of the ExpressionWarning type for use with
// apply.
func ExpressionWarning() *ExpressionWarningApplyConfiguration {
return &ExpressionWarningApplyConfiguration{}
}
// WithFieldRef sets the FieldRef 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 FieldRef field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration {
b.FieldRef = &value
return b
}
// WithWarning sets the Warning 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 Warning field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration {
b.Warning = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// MatchConditionApplyConfiguration represents an declarative configuration of the MatchCondition type for use
// with apply.
type MatchConditionApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// MatchConditionApplyConfiguration constructs an declarative configuration of the MatchCondition type for use with
// apply.
func MatchCondition() *MatchConditionApplyConfiguration {
return &MatchConditionApplyConfiguration{}
}
// 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 *MatchConditionApplyConfiguration) WithName(value string) *MatchConditionApplyConfiguration {
b.Name = &value
return b
}
// 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 *MatchConditionApplyConfiguration) WithExpression(value string) *MatchConditionApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,90 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MatchResourcesApplyConfiguration represents an declarative configuration of the MatchResources type for use
// with apply.
type MatchResourcesApplyConfiguration struct {
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
MatchPolicy *apiadmissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
}
// MatchResourcesApplyConfiguration constructs an declarative configuration of the MatchResources type for use with
// apply.
func MatchResources() *MatchResourcesApplyConfiguration {
return &MatchResourcesApplyConfiguration{}
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithResourceRules adds the given value to the ResourceRules 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 ResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceRules")
}
b.ResourceRules = append(b.ResourceRules, *values[i])
}
return b
}
// WithExcludeResourceRules adds the given value to the ExcludeResourceRules 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 ExcludeResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExcludeResourceRules")
}
b.ExcludeResourceRules = append(b.ExcludeResourceRules, *values[i])
}
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value apiadmissionregistrationv1.MatchPolicyType) *MatchResourcesApplyConfiguration {
b.MatchPolicy = &value
return b
}

View File

@@ -0,0 +1,155 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MutatingWebhookApplyConfiguration represents an declarative configuration of the MutatingWebhook type for use
// with apply.
type MutatingWebhookApplyConfiguration struct {
Name *string `json:"name,omitempty"`
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
}
// MutatingWebhookApplyConfiguration constructs an declarative configuration of the MutatingWebhook type for use with
// apply.
func MutatingWebhook() *MutatingWebhookApplyConfiguration {
return &MutatingWebhookApplyConfiguration{}
}
// 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 *MutatingWebhookApplyConfiguration) WithName(value string) *MutatingWebhookApplyConfiguration {
b.Name = &value
return b
}
// WithClientConfig sets the ClientConfig 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 ClientConfig field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.ClientConfig = value
return b
}
// WithRules adds the given value to the Rules 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 Rules field.
func (b *MutatingWebhookApplyConfiguration) WithRules(values ...*RuleWithOperationsApplyConfiguration) *MutatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRules")
}
b.Rules = append(b.Rules, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *MutatingWebhookApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithMatchPolicy(value admissionregistrationv1.MatchPolicyType) *MutatingWebhookApplyConfiguration {
b.MatchPolicy = &value
return b
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithObjectSelector(value *metav1.LabelSelectorApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithSideEffects sets the SideEffects 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 SideEffects field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithSideEffects(value admissionregistrationv1.SideEffectClass) *MutatingWebhookApplyConfiguration {
b.SideEffects = &value
return b
}
// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithTimeoutSeconds(value int32) *MutatingWebhookApplyConfiguration {
b.TimeoutSeconds = &value
return b
}
// WithAdmissionReviewVersions adds the given value to the AdmissionReviewVersions 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 AdmissionReviewVersions field.
func (b *MutatingWebhookApplyConfiguration) WithAdmissionReviewVersions(values ...string) *MutatingWebhookApplyConfiguration {
for i := range values {
b.AdmissionReviewVersions = append(b.AdmissionReviewVersions, values[i])
}
return b
}
// WithReinvocationPolicy sets the ReinvocationPolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ReinvocationPolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithReinvocationPolicy(value admissionregistrationv1.ReinvocationPolicyType) *MutatingWebhookApplyConfiguration {
b.ReinvocationPolicy = &value
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *MutatingWebhookApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}

View File

@@ -0,0 +1,252 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
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"
)
// MutatingWebhookConfigurationApplyConfiguration represents an declarative configuration of the MutatingWebhookConfiguration type for use
// with apply.
type MutatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}
// MutatingWebhookConfiguration constructs an declarative configuration of the MutatingWebhookConfiguration type for use with
// apply.
func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationApplyConfiguration {
b := &MutatingWebhookConfigurationApplyConfiguration{}
b.WithName(name)
b.WithKind("MutatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a
// MutatingWebhookConfigurationApplyConfiguration 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.
// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
// ExtractMutatingWebhookConfiguration 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.
// Experimental!
func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *apiadmissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "")
}
// ExtractMutatingWebhookConfigurationStatus is the same as ExtractMutatingWebhookConfiguration except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractMutatingWebhookConfigurationStatus(mutatingWebhookConfiguration *apiadmissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "status")
}
func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *apiadmissionregistrationv1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
b := &MutatingWebhookConfigurationApplyConfiguration{}
err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(mutatingWebhookConfiguration.Name)
b.WithKind("MutatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// 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 *MutatingWebhookConfigurationApplyConfiguration) WithKind(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithAPIVersion(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithName(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithGenerateName(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithUID(value types.UID) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithResourceVersion(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithGeneration(value int64) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithLabels(entries map[string]string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values ...string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithWebhooks adds the given value to the Webhooks 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 Webhooks field.
func (b *MutatingWebhookConfigurationApplyConfiguration) WithWebhooks(values ...*MutatingWebhookApplyConfiguration) *MutatingWebhookConfigurationApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithWebhooks")
}
b.Webhooks = append(b.Webhooks, *values[i])
}
return b
}

View File

@@ -0,0 +1,94 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
)
// NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use
// with apply.
type NamedRuleWithOperationsApplyConfiguration struct {
ResourceNames []string `json:"resourceNames,omitempty"`
RuleWithOperationsApplyConfiguration `json:",inline"`
}
// NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with
// apply.
func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration {
return &NamedRuleWithOperationsApplyConfiguration{}
}
// WithResourceNames adds the given value to the ResourceNames 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 ResourceNames field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.ResourceNames = append(b.ResourceNames, values[i])
}
return b
}
// WithOperations adds the given value to the Operations 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 Operations field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Operations = append(b.Operations, values[i])
}
return b
}
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIGroups = append(b.APIGroups, values[i])
}
return b
}
// WithAPIVersions adds the given value to the APIVersions 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 APIVersions field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIVersions = append(b.APIVersions, values[i])
}
return b
}
// WithResources adds the given value to the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Resources field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Resources = append(b.Resources, values[i])
}
return b
}
// WithScope sets the Scope 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 Scope field is set to the value of the last call.
func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration {
b.Scope = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// ParamKindApplyConfiguration represents an declarative configuration of the ParamKind type for use
// with apply.
type ParamKindApplyConfiguration struct {
APIVersion *string `json:"apiVersion,omitempty"`
Kind *string `json:"kind,omitempty"`
}
// ParamKindApplyConfiguration constructs an declarative configuration of the ParamKind type for use with
// apply.
func ParamKind() *ParamKindApplyConfiguration {
return &ParamKindApplyConfiguration{}
}
// 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 *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration {
b.APIVersion = &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 *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration {
b.Kind = &value
return b
}

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 applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ParamRefApplyConfiguration represents an declarative configuration of the ParamRef type for use
// with apply.
type ParamRefApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
ParameterNotFoundAction *admissionregistrationv1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"`
}
// ParamRefApplyConfiguration constructs an declarative configuration of the ParamRef type for use with
// apply.
func ParamRef() *ParamRefApplyConfiguration {
return &ParamRefApplyConfiguration{}
}
// 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 *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration {
b.Name = &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 *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration {
b.Namespace = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration {
b.Selector = value
return b
}
// WithParameterNotFoundAction sets the ParameterNotFoundAction 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 ParameterNotFoundAction field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value admissionregistrationv1.ParameterNotFoundActionType) *ParamRefApplyConfiguration {
b.ParameterNotFoundAction = &value
return b
}

View File

@@ -0,0 +1,76 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/admissionregistration/v1"
)
// RuleApplyConfiguration represents an declarative configuration of the Rule type for use
// with apply.
type RuleApplyConfiguration struct {
APIGroups []string `json:"apiGroups,omitempty"`
APIVersions []string `json:"apiVersions,omitempty"`
Resources []string `json:"resources,omitempty"`
Scope *v1.ScopeType `json:"scope,omitempty"`
}
// RuleApplyConfiguration constructs an declarative configuration of the Rule type for use with
// apply.
func Rule() *RuleApplyConfiguration {
return &RuleApplyConfiguration{}
}
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
func (b *RuleApplyConfiguration) WithAPIGroups(values ...string) *RuleApplyConfiguration {
for i := range values {
b.APIGroups = append(b.APIGroups, values[i])
}
return b
}
// WithAPIVersions adds the given value to the APIVersions 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 APIVersions field.
func (b *RuleApplyConfiguration) WithAPIVersions(values ...string) *RuleApplyConfiguration {
for i := range values {
b.APIVersions = append(b.APIVersions, values[i])
}
return b
}
// WithResources adds the given value to the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Resources field.
func (b *RuleApplyConfiguration) WithResources(values ...string) *RuleApplyConfiguration {
for i := range values {
b.Resources = append(b.Resources, values[i])
}
return b
}
// WithScope sets the Scope 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 Scope field is set to the value of the last call.
func (b *RuleApplyConfiguration) WithScope(value v1.ScopeType) *RuleApplyConfiguration {
b.Scope = &value
return b
}

View File

@@ -0,0 +1,84 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/admissionregistration/v1"
)
// RuleWithOperationsApplyConfiguration represents an declarative configuration of the RuleWithOperations type for use
// with apply.
type RuleWithOperationsApplyConfiguration struct {
Operations []v1.OperationType `json:"operations,omitempty"`
RuleApplyConfiguration `json:",inline"`
}
// RuleWithOperationsApplyConfiguration constructs an declarative configuration of the RuleWithOperations type for use with
// apply.
func RuleWithOperations() *RuleWithOperationsApplyConfiguration {
return &RuleWithOperationsApplyConfiguration{}
}
// WithOperations adds the given value to the Operations 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 Operations field.
func (b *RuleWithOperationsApplyConfiguration) WithOperations(values ...v1.OperationType) *RuleWithOperationsApplyConfiguration {
for i := range values {
b.Operations = append(b.Operations, values[i])
}
return b
}
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
func (b *RuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *RuleWithOperationsApplyConfiguration {
for i := range values {
b.APIGroups = append(b.APIGroups, values[i])
}
return b
}
// WithAPIVersions adds the given value to the APIVersions 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 APIVersions field.
func (b *RuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *RuleWithOperationsApplyConfiguration {
for i := range values {
b.APIVersions = append(b.APIVersions, values[i])
}
return b
}
// WithResources adds the given value to the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Resources field.
func (b *RuleWithOperationsApplyConfiguration) WithResources(values ...string) *RuleWithOperationsApplyConfiguration {
for i := range values {
b.Resources = append(b.Resources, values[i])
}
return b
}
// WithScope sets the Scope 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 Scope field is set to the value of the last call.
func (b *RuleWithOperationsApplyConfiguration) WithScope(value v1.ScopeType) *RuleWithOperationsApplyConfiguration {
b.Scope = &value
return b
}

View File

@@ -0,0 +1,66 @@
/*
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
// ServiceReferenceApplyConfiguration represents an declarative configuration of the ServiceReference type for use
// with apply.
type ServiceReferenceApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Port *int32 `json:"port,omitempty"`
}
// ServiceReferenceApplyConfiguration constructs an declarative configuration of the ServiceReference type for use with
// apply.
func ServiceReference() *ServiceReferenceApplyConfiguration {
return &ServiceReferenceApplyConfiguration{}
}
// 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 *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration {
b.Namespace = &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 *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithPath sets the Path 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 Path field is set to the value of the last call.
func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration {
b.Path = &value
return b
}
// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration {
b.Port = &value
return b
}

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 v1
// TypeCheckingApplyConfiguration represents an declarative configuration of the TypeChecking type for use
// with apply.
type TypeCheckingApplyConfiguration struct {
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}
// TypeCheckingApplyConfiguration constructs an declarative configuration of the TypeChecking type for use with
// apply.
func TypeChecking() *TypeCheckingApplyConfiguration {
return &TypeCheckingApplyConfiguration{}
}
// WithExpressionWarnings adds the given value to the ExpressionWarnings 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 ExpressionWarnings field.
func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExpressionWarnings")
}
b.ExpressionWarnings = append(b.ExpressionWarnings, *values[i])
}
return b
}

View File

@@ -0,0 +1,256 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
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"
)
// ValidatingAdmissionPolicyApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicy type for use
// with apply.
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"`
}
// ValidatingAdmissionPolicy constructs an declarative configuration of the ValidatingAdmissionPolicy type for use with
// apply.
func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a
// ValidatingAdmissionPolicyApplyConfiguration 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.
// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicy 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.
// Experimental!
func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status")
}
func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicy.Name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyApplyConfiguration) 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 *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Spec = 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 *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,247 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
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"
)
// ValidatingAdmissionPolicyBindingApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBinding type for use
// with apply.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
// ValidatingAdmissionPolicyBinding constructs an declarative configuration of the ValidatingAdmissionPolicyBinding type for use with
// apply.
func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a
// ValidatingAdmissionPolicyBindingApplyConfiguration 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.
// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicyBinding 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.
// Experimental!
func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status")
}
func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicyBinding.Name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.Spec = value
return b
}

View File

@@ -0,0 +1,72 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
)
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
// with apply.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
PolicyName *string `json:"policyName,omitempty"`
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
ValidationActions []admissionregistrationv1.ValidationAction `json:"validationActions,omitempty"`
}
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
// apply.
func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{}
}
// WithPolicyName sets the PolicyName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PolicyName field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.PolicyName = &value
return b
}
// WithParamRef sets the ParamRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamRef field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.ParamRef = value
return b
}
// WithMatchResources sets the MatchResources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchResources field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.MatchResources = value
return b
}
// WithValidationActions adds the given value to the ValidationActions 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 ValidationActions field.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
for i := range values {
b.ValidationActions = append(b.ValidationActions, values[i])
}
return b
}

View File

@@ -0,0 +1,117 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
)
// ValidatingAdmissionPolicySpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicySpec type for use
// with apply.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
}
// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with
// apply.
func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration {
return &ValidatingAdmissionPolicySpecApplyConfiguration{}
}
// WithParamKind sets the ParamKind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamKind field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.ParamKind = value
return b
}
// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchConstraints field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.MatchConstraints = value
return b
}
// WithValidations adds the given value to the Validations 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 Validations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithValidations")
}
b.Validations = append(b.Validations, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithAuditAnnotations adds the given value to the AuditAnnotations 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 AuditAnnotations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithAuditAnnotations")
}
b.AuditAnnotations = append(b.AuditAnnotations, *values[i])
}
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}
// WithVariables adds the given value to the Variables field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Variables field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVariables")
}
b.Variables = append(b.Variables, *values[i])
}
return b
}

View File

@@ -0,0 +1,66 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use
// with apply.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with
// apply.
func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration {
return &ValidatingAdmissionPolicyStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithTypeChecking sets the TypeChecking 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 TypeChecking field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.TypeChecking = value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
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

@@ -0,0 +1,146 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ValidatingWebhookApplyConfiguration represents an declarative configuration of the ValidatingWebhook type for use
// with apply.
type ValidatingWebhookApplyConfiguration struct {
Name *string `json:"name,omitempty"`
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
}
// ValidatingWebhookApplyConfiguration constructs an declarative configuration of the ValidatingWebhook type for use with
// apply.
func ValidatingWebhook() *ValidatingWebhookApplyConfiguration {
return &ValidatingWebhookApplyConfiguration{}
}
// 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 *ValidatingWebhookApplyConfiguration) WithName(value string) *ValidatingWebhookApplyConfiguration {
b.Name = &value
return b
}
// WithClientConfig sets the ClientConfig 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 ClientConfig field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.ClientConfig = value
return b
}
// WithRules adds the given value to the Rules 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 Rules field.
func (b *ValidatingWebhookApplyConfiguration) WithRules(values ...*RuleWithOperationsApplyConfiguration) *ValidatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRules")
}
b.Rules = append(b.Rules, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *ValidatingWebhookApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithMatchPolicy(value admissionregistrationv1.MatchPolicyType) *ValidatingWebhookApplyConfiguration {
b.MatchPolicy = &value
return b
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithObjectSelector(value *metav1.LabelSelectorApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithSideEffects sets the SideEffects 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 SideEffects field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithSideEffects(value admissionregistrationv1.SideEffectClass) *ValidatingWebhookApplyConfiguration {
b.SideEffects = &value
return b
}
// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithTimeoutSeconds(value int32) *ValidatingWebhookApplyConfiguration {
b.TimeoutSeconds = &value
return b
}
// WithAdmissionReviewVersions adds the given value to the AdmissionReviewVersions 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 AdmissionReviewVersions field.
func (b *ValidatingWebhookApplyConfiguration) WithAdmissionReviewVersions(values ...string) *ValidatingWebhookApplyConfiguration {
for i := range values {
b.AdmissionReviewVersions = append(b.AdmissionReviewVersions, values[i])
}
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *ValidatingWebhookApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}

View File

@@ -0,0 +1,252 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
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"
)
// ValidatingWebhookConfigurationApplyConfiguration represents an declarative configuration of the ValidatingWebhookConfiguration type for use
// with apply.
type ValidatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}
// ValidatingWebhookConfiguration constructs an declarative configuration of the ValidatingWebhookConfiguration type for use with
// apply.
func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfigurationApplyConfiguration {
b := &ValidatingWebhookConfigurationApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b
}
// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a
// ValidatingWebhookConfigurationApplyConfiguration 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.
// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
// ExtractValidatingWebhookConfiguration 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.
// Experimental!
func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *apiadmissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "")
}
// ExtractValidatingWebhookConfigurationStatus is the same as ExtractValidatingWebhookConfiguration except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingWebhookConfigurationStatus(validatingWebhookConfiguration *apiadmissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "status")
}
func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *apiadmissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
b := &ValidatingWebhookConfigurationApplyConfiguration{}
err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingWebhookConfiguration.Name)
b.WithKind("ValidatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1")
return b, nil
}
// 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 *ValidatingWebhookConfigurationApplyConfiguration) WithKind(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithAPIVersion(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithName(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithGenerateName(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithUID(value types.UID) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithResourceVersion(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithGeneration(value int64) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithLabels(entries map[string]string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values ...string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithWebhooks adds the given value to the Webhooks 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 Webhooks field.
func (b *ValidatingWebhookConfigurationApplyConfiguration) WithWebhooks(values ...*ValidatingWebhookApplyConfiguration) *ValidatingWebhookConfigurationApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithWebhooks")
}
b.Webhooks = append(b.Webhooks, *values[i])
}
return b
}

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 v1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use
// with apply.
type ValidationApplyConfiguration struct {
Expression *string `json:"expression,omitempty"`
Message *string `json:"message,omitempty"`
Reason *v1.StatusReason `json:"reason,omitempty"`
MessageExpression *string `json:"messageExpression,omitempty"`
}
// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with
// apply.
func Validation() *ValidationApplyConfiguration {
return &ValidationApplyConfiguration{}
}
// 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 *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration {
b.Expression = &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 *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration {
b.Message = &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 *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration {
b.Reason = &value
return b
}
// WithMessageExpression sets the MessageExpression 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 MessageExpression field is set to the value of the last call.
func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration {
b.MessageExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// VariableApplyConfiguration represents an declarative configuration of the Variable type for use
// with apply.
type VariableApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// VariableApplyConfiguration constructs an declarative configuration of the Variable type for use with
// apply.
func Variable() *VariableApplyConfiguration {
return &VariableApplyConfiguration{}
}
// 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 *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration {
b.Name = &value
return b
}
// 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 *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,59 @@
/*
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
// WebhookClientConfigApplyConfiguration represents an declarative configuration of the WebhookClientConfig type for use
// with apply.
type WebhookClientConfigApplyConfiguration struct {
URL *string `json:"url,omitempty"`
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
CABundle []byte `json:"caBundle,omitempty"`
}
// WebhookClientConfigApplyConfiguration constructs an declarative configuration of the WebhookClientConfig type for use with
// apply.
func WebhookClientConfig() *WebhookClientConfigApplyConfiguration {
return &WebhookClientConfigApplyConfiguration{}
}
// WithURL sets the URL 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 URL field is set to the value of the last call.
func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration {
b.URL = &value
return b
}
// WithService sets the Service 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 Service field is set to the value of the last call.
func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration {
b.Service = value
return b
}
// WithCABundle adds the given value to the CABundle 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 CABundle field.
func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration {
for i := range values {
b.CABundle = append(b.CABundle, values[i])
}
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use
// with apply.
type AuditAnnotationApplyConfiguration struct {
Key *string `json:"key,omitempty"`
ValueExpression *string `json:"valueExpression,omitempty"`
}
// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with
// apply.
func AuditAnnotation() *AuditAnnotationApplyConfiguration {
return &AuditAnnotationApplyConfiguration{}
}
// WithKey sets the Key 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 Key field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration {
b.Key = &value
return b
}
// WithValueExpression sets the ValueExpression 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 ValueExpression field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration {
b.ValueExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// ExpressionWarningApplyConfiguration represents an declarative configuration of the ExpressionWarning type for use
// with apply.
type ExpressionWarningApplyConfiguration struct {
FieldRef *string `json:"fieldRef,omitempty"`
Warning *string `json:"warning,omitempty"`
}
// ExpressionWarningApplyConfiguration constructs an declarative configuration of the ExpressionWarning type for use with
// apply.
func ExpressionWarning() *ExpressionWarningApplyConfiguration {
return &ExpressionWarningApplyConfiguration{}
}
// WithFieldRef sets the FieldRef 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 FieldRef field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration {
b.FieldRef = &value
return b
}
// WithWarning sets the Warning 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 Warning field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration {
b.Warning = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// MatchConditionApplyConfiguration represents an declarative configuration of the MatchCondition type for use
// with apply.
type MatchConditionApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// MatchConditionApplyConfiguration constructs an declarative configuration of the MatchCondition type for use with
// apply.
func MatchCondition() *MatchConditionApplyConfiguration {
return &MatchConditionApplyConfiguration{}
}
// 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 *MatchConditionApplyConfiguration) WithName(value string) *MatchConditionApplyConfiguration {
b.Name = &value
return b
}
// 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 *MatchConditionApplyConfiguration) WithExpression(value string) *MatchConditionApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,90 @@
/*
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 (
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MatchResourcesApplyConfiguration represents an declarative configuration of the MatchResources type for use
// with apply.
type MatchResourcesApplyConfiguration struct {
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
MatchPolicy *admissionregistrationv1alpha1.MatchPolicyType `json:"matchPolicy,omitempty"`
}
// MatchResourcesApplyConfiguration constructs an declarative configuration of the MatchResources type for use with
// apply.
func MatchResources() *MatchResourcesApplyConfiguration {
return &MatchResourcesApplyConfiguration{}
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithResourceRules adds the given value to the ResourceRules 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 ResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceRules")
}
b.ResourceRules = append(b.ResourceRules, *values[i])
}
return b
}
// WithExcludeResourceRules adds the given value to the ExcludeResourceRules 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 ExcludeResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExcludeResourceRules")
}
b.ExcludeResourceRules = append(b.ExcludeResourceRules, *values[i])
}
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value admissionregistrationv1alpha1.MatchPolicyType) *MatchResourcesApplyConfiguration {
b.MatchPolicy = &value
return b
}

View File

@@ -0,0 +1,95 @@
/*
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 (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
)
// NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use
// with apply.
type NamedRuleWithOperationsApplyConfiguration struct {
ResourceNames []string `json:"resourceNames,omitempty"`
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
}
// NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with
// apply.
func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration {
return &NamedRuleWithOperationsApplyConfiguration{}
}
// WithResourceNames adds the given value to the ResourceNames 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 ResourceNames field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.ResourceNames = append(b.ResourceNames, values[i])
}
return b
}
// WithOperations adds the given value to the Operations 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 Operations field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Operations = append(b.Operations, values[i])
}
return b
}
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIGroups = append(b.APIGroups, values[i])
}
return b
}
// WithAPIVersions adds the given value to the APIVersions 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 APIVersions field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIVersions = append(b.APIVersions, values[i])
}
return b
}
// WithResources adds the given value to the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Resources field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Resources = append(b.Resources, values[i])
}
return b
}
// WithScope sets the Scope 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 Scope field is set to the value of the last call.
func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration {
b.Scope = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// ParamKindApplyConfiguration represents an declarative configuration of the ParamKind type for use
// with apply.
type ParamKindApplyConfiguration struct {
APIVersion *string `json:"apiVersion,omitempty"`
Kind *string `json:"kind,omitempty"`
}
// ParamKindApplyConfiguration constructs an declarative configuration of the ParamKind type for use with
// apply.
func ParamKind() *ParamKindApplyConfiguration {
return &ParamKindApplyConfiguration{}
}
// 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 *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration {
b.APIVersion = &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 *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration {
b.Kind = &value
return b
}

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 applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ParamRefApplyConfiguration represents an declarative configuration of the ParamRef type for use
// with apply.
type ParamRefApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
ParameterNotFoundAction *v1alpha1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"`
}
// ParamRefApplyConfiguration constructs an declarative configuration of the ParamRef type for use with
// apply.
func ParamRef() *ParamRefApplyConfiguration {
return &ParamRefApplyConfiguration{}
}
// 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 *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration {
b.Name = &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 *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration {
b.Namespace = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration {
b.Selector = value
return b
}
// WithParameterNotFoundAction sets the ParameterNotFoundAction 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 ParameterNotFoundAction field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value v1alpha1.ParameterNotFoundActionType) *ParamRefApplyConfiguration {
b.ParameterNotFoundAction = &value
return b
}

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
// TypeCheckingApplyConfiguration represents an declarative configuration of the TypeChecking type for use
// with apply.
type TypeCheckingApplyConfiguration struct {
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}
// TypeCheckingApplyConfiguration constructs an declarative configuration of the TypeChecking type for use with
// apply.
func TypeChecking() *TypeCheckingApplyConfiguration {
return &TypeCheckingApplyConfiguration{}
}
// WithExpressionWarnings adds the given value to the ExpressionWarnings 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 ExpressionWarnings field.
func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExpressionWarnings")
}
b.ExpressionWarnings = append(b.ExpressionWarnings, *values[i])
}
return b
}

View File

@@ -0,0 +1,256 @@
/*
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 (
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/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"
)
// ValidatingAdmissionPolicyApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicy type for use
// with apply.
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"`
}
// ValidatingAdmissionPolicy constructs an declarative configuration of the ValidatingAdmissionPolicy type for use with
// apply.
func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1")
return b
}
// ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a
// ValidatingAdmissionPolicyApplyConfiguration 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.
// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicy 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.
// Experimental!
func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status")
}
func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicy.Name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyApplyConfiguration) 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 *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Spec = 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 *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,247 @@
/*
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 (
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/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"
)
// ValidatingAdmissionPolicyBindingApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBinding type for use
// with apply.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
// ValidatingAdmissionPolicyBinding constructs an declarative configuration of the ValidatingAdmissionPolicyBinding type for use with
// apply.
func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1")
return b
}
// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a
// ValidatingAdmissionPolicyBindingApplyConfiguration 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.
// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicyBinding 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.
// Experimental!
func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status")
}
func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicyBinding.Name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1alpha1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.Spec = value
return b
}

View File

@@ -0,0 +1,72 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
)
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
// with apply.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
PolicyName *string `json:"policyName,omitempty"`
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
ValidationActions []admissionregistrationv1alpha1.ValidationAction `json:"validationActions,omitempty"`
}
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
// apply.
func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{}
}
// WithPolicyName sets the PolicyName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PolicyName field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.PolicyName = &value
return b
}
// WithParamRef sets the ParamRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamRef field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.ParamRef = value
return b
}
// WithMatchResources sets the MatchResources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchResources field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.MatchResources = value
return b
}
// WithValidationActions adds the given value to the ValidationActions 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 ValidationActions field.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1alpha1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
for i := range values {
b.ValidationActions = append(b.ValidationActions, values[i])
}
return b
}

View File

@@ -0,0 +1,117 @@
/*
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 (
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
)
// ValidatingAdmissionPolicySpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicySpec type for use
// with apply.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"`
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
}
// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with
// apply.
func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration {
return &ValidatingAdmissionPolicySpecApplyConfiguration{}
}
// WithParamKind sets the ParamKind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamKind field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.ParamKind = value
return b
}
// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchConstraints field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.MatchConstraints = value
return b
}
// WithValidations adds the given value to the Validations 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 Validations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithValidations")
}
b.Validations = append(b.Validations, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithAuditAnnotations adds the given value to the AuditAnnotations 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 AuditAnnotations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithAuditAnnotations")
}
b.AuditAnnotations = append(b.AuditAnnotations, *values[i])
}
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}
// WithVariables adds the given value to the Variables field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Variables field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVariables")
}
b.Variables = append(b.Variables, *values[i])
}
return b
}

View File

@@ -0,0 +1,66 @@
/*
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/client-go/applyconfigurations/meta/v1"
)
// ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use
// with apply.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with
// apply.
func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration {
return &ValidatingAdmissionPolicyStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithTypeChecking sets the TypeChecking 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 TypeChecking field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.TypeChecking = value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
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

@@ -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 v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use
// with apply.
type ValidationApplyConfiguration struct {
Expression *string `json:"expression,omitempty"`
Message *string `json:"message,omitempty"`
Reason *v1.StatusReason `json:"reason,omitempty"`
MessageExpression *string `json:"messageExpression,omitempty"`
}
// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with
// apply.
func Validation() *ValidationApplyConfiguration {
return &ValidationApplyConfiguration{}
}
// 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 *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration {
b.Expression = &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 *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration {
b.Message = &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 *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration {
b.Reason = &value
return b
}
// WithMessageExpression sets the MessageExpression 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 MessageExpression field is set to the value of the last call.
func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration {
b.MessageExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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
// VariableApplyConfiguration represents an declarative configuration of the Variable type for use
// with apply.
type VariableApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// VariableApplyConfiguration constructs an declarative configuration of the Variable type for use with
// apply.
func Variable() *VariableApplyConfiguration {
return &VariableApplyConfiguration{}
}
// 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 *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration {
b.Name = &value
return b
}
// 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 *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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 v1beta1
// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use
// with apply.
type AuditAnnotationApplyConfiguration struct {
Key *string `json:"key,omitempty"`
ValueExpression *string `json:"valueExpression,omitempty"`
}
// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with
// apply.
func AuditAnnotation() *AuditAnnotationApplyConfiguration {
return &AuditAnnotationApplyConfiguration{}
}
// WithKey sets the Key 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 Key field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration {
b.Key = &value
return b
}
// WithValueExpression sets the ValueExpression 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 ValueExpression field is set to the value of the last call.
func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration {
b.ValueExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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 v1beta1
// ExpressionWarningApplyConfiguration represents an declarative configuration of the ExpressionWarning type for use
// with apply.
type ExpressionWarningApplyConfiguration struct {
FieldRef *string `json:"fieldRef,omitempty"`
Warning *string `json:"warning,omitempty"`
}
// ExpressionWarningApplyConfiguration constructs an declarative configuration of the ExpressionWarning type for use with
// apply.
func ExpressionWarning() *ExpressionWarningApplyConfiguration {
return &ExpressionWarningApplyConfiguration{}
}
// WithFieldRef sets the FieldRef 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 FieldRef field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration {
b.FieldRef = &value
return b
}
// WithWarning sets the Warning 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 Warning field is set to the value of the last call.
func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration {
b.Warning = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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 v1beta1
// MatchConditionApplyConfiguration represents an declarative configuration of the MatchCondition type for use
// with apply.
type MatchConditionApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// MatchConditionApplyConfiguration constructs an declarative configuration of the MatchCondition type for use with
// apply.
func MatchCondition() *MatchConditionApplyConfiguration {
return &MatchConditionApplyConfiguration{}
}
// 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 *MatchConditionApplyConfiguration) WithName(value string) *MatchConditionApplyConfiguration {
b.Name = &value
return b
}
// 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 *MatchConditionApplyConfiguration) WithExpression(value string) *MatchConditionApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,90 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MatchResourcesApplyConfiguration represents an declarative configuration of the MatchResources type for use
// with apply.
type MatchResourcesApplyConfiguration struct {
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
}
// MatchResourcesApplyConfiguration constructs an declarative configuration of the MatchResources type for use with
// apply.
func MatchResources() *MatchResourcesApplyConfiguration {
return &MatchResourcesApplyConfiguration{}
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithResourceRules adds the given value to the ResourceRules 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 ResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceRules")
}
b.ResourceRules = append(b.ResourceRules, *values[i])
}
return b
}
// WithExcludeResourceRules adds the given value to the ExcludeResourceRules 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 ExcludeResourceRules field.
func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExcludeResourceRules")
}
b.ExcludeResourceRules = append(b.ExcludeResourceRules, *values[i])
}
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value admissionregistrationv1beta1.MatchPolicyType) *MatchResourcesApplyConfiguration {
b.MatchPolicy = &value
return b
}

View File

@@ -0,0 +1,156 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MutatingWebhookApplyConfiguration represents an declarative configuration of the MutatingWebhook type for use
// with apply.
type MutatingWebhookApplyConfiguration struct {
Name *string `json:"name,omitempty"`
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
ReinvocationPolicy *admissionregistrationv1beta1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
}
// MutatingWebhookApplyConfiguration constructs an declarative configuration of the MutatingWebhook type for use with
// apply.
func MutatingWebhook() *MutatingWebhookApplyConfiguration {
return &MutatingWebhookApplyConfiguration{}
}
// 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 *MutatingWebhookApplyConfiguration) WithName(value string) *MutatingWebhookApplyConfiguration {
b.Name = &value
return b
}
// WithClientConfig sets the ClientConfig 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 ClientConfig field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.ClientConfig = value
return b
}
// WithRules adds the given value to the Rules 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 Rules field.
func (b *MutatingWebhookApplyConfiguration) WithRules(values ...*v1.RuleWithOperationsApplyConfiguration) *MutatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRules")
}
b.Rules = append(b.Rules, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithFailurePolicy(value admissionregistrationv1beta1.FailurePolicyType) *MutatingWebhookApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithMatchPolicy(value admissionregistrationv1beta1.MatchPolicyType) *MutatingWebhookApplyConfiguration {
b.MatchPolicy = &value
return b
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithObjectSelector(value *metav1.LabelSelectorApplyConfiguration) *MutatingWebhookApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithSideEffects sets the SideEffects 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 SideEffects field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithSideEffects(value admissionregistrationv1beta1.SideEffectClass) *MutatingWebhookApplyConfiguration {
b.SideEffects = &value
return b
}
// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithTimeoutSeconds(value int32) *MutatingWebhookApplyConfiguration {
b.TimeoutSeconds = &value
return b
}
// WithAdmissionReviewVersions adds the given value to the AdmissionReviewVersions 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 AdmissionReviewVersions field.
func (b *MutatingWebhookApplyConfiguration) WithAdmissionReviewVersions(values ...string) *MutatingWebhookApplyConfiguration {
for i := range values {
b.AdmissionReviewVersions = append(b.AdmissionReviewVersions, values[i])
}
return b
}
// WithReinvocationPolicy sets the ReinvocationPolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ReinvocationPolicy field is set to the value of the last call.
func (b *MutatingWebhookApplyConfiguration) WithReinvocationPolicy(value admissionregistrationv1beta1.ReinvocationPolicyType) *MutatingWebhookApplyConfiguration {
b.ReinvocationPolicy = &value
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *MutatingWebhookApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}

View File

@@ -0,0 +1,252 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
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"
)
// MutatingWebhookConfigurationApplyConfiguration represents an declarative configuration of the MutatingWebhookConfiguration type for use
// with apply.
type MutatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}
// MutatingWebhookConfiguration constructs an declarative configuration of the MutatingWebhookConfiguration type for use with
// apply.
func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationApplyConfiguration {
b := &MutatingWebhookConfigurationApplyConfiguration{}
b.WithName(name)
b.WithKind("MutatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b
}
// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a
// MutatingWebhookConfigurationApplyConfiguration 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.
// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
// ExtractMutatingWebhookConfiguration 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.
// Experimental!
func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "")
}
// ExtractMutatingWebhookConfigurationStatus is the same as ExtractMutatingWebhookConfiguration except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractMutatingWebhookConfigurationStatus(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
return extractMutatingWebhookConfiguration(mutatingWebhookConfiguration, fieldManager, "status")
}
func extractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string, subresource string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
b := &MutatingWebhookConfigurationApplyConfiguration{}
err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(mutatingWebhookConfiguration.Name)
b.WithKind("MutatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b, nil
}
// 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 *MutatingWebhookConfigurationApplyConfiguration) WithKind(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithAPIVersion(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithName(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithGenerateName(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithUID(value types.UID) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithResourceVersion(value string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithGeneration(value int64) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithLabels(entries map[string]string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *MutatingWebhookConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values ...string) *MutatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithWebhooks adds the given value to the Webhooks 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 Webhooks field.
func (b *MutatingWebhookConfigurationApplyConfiguration) WithWebhooks(values ...*MutatingWebhookApplyConfiguration) *MutatingWebhookConfigurationApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithWebhooks")
}
b.Webhooks = append(b.Webhooks, *values[i])
}
return b
}

View File

@@ -0,0 +1,95 @@
/*
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 v1beta1
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
)
// NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use
// with apply.
type NamedRuleWithOperationsApplyConfiguration struct {
ResourceNames []string `json:"resourceNames,omitempty"`
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
}
// NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with
// apply.
func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration {
return &NamedRuleWithOperationsApplyConfiguration{}
}
// WithResourceNames adds the given value to the ResourceNames 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 ResourceNames field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.ResourceNames = append(b.ResourceNames, values[i])
}
return b
}
// WithOperations adds the given value to the Operations 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 Operations field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Operations = append(b.Operations, values[i])
}
return b
}
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIGroups = append(b.APIGroups, values[i])
}
return b
}
// WithAPIVersions adds the given value to the APIVersions 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 APIVersions field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.APIVersions = append(b.APIVersions, values[i])
}
return b
}
// WithResources adds the given value to the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Resources field.
func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration {
for i := range values {
b.Resources = append(b.Resources, values[i])
}
return b
}
// WithScope sets the Scope 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 Scope field is set to the value of the last call.
func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration {
b.Scope = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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 v1beta1
// ParamKindApplyConfiguration represents an declarative configuration of the ParamKind type for use
// with apply.
type ParamKindApplyConfiguration struct {
APIVersion *string `json:"apiVersion,omitempty"`
Kind *string `json:"kind,omitempty"`
}
// ParamKindApplyConfiguration constructs an declarative configuration of the ParamKind type for use with
// apply.
func ParamKind() *ParamKindApplyConfiguration {
return &ParamKindApplyConfiguration{}
}
// 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 *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration {
b.APIVersion = &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 *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration {
b.Kind = &value
return b
}

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 applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ParamRefApplyConfiguration represents an declarative configuration of the ParamRef type for use
// with apply.
type ParamRefApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
ParameterNotFoundAction *v1beta1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"`
}
// ParamRefApplyConfiguration constructs an declarative configuration of the ParamRef type for use with
// apply.
func ParamRef() *ParamRefApplyConfiguration {
return &ParamRefApplyConfiguration{}
}
// 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 *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration {
b.Name = &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 *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration {
b.Namespace = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration {
b.Selector = value
return b
}
// WithParameterNotFoundAction sets the ParameterNotFoundAction 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 ParameterNotFoundAction field is set to the value of the last call.
func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value v1beta1.ParameterNotFoundActionType) *ParamRefApplyConfiguration {
b.ParameterNotFoundAction = &value
return b
}

View File

@@ -0,0 +1,66 @@
/*
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 v1beta1
// ServiceReferenceApplyConfiguration represents an declarative configuration of the ServiceReference type for use
// with apply.
type ServiceReferenceApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Port *int32 `json:"port,omitempty"`
}
// ServiceReferenceApplyConfiguration constructs an declarative configuration of the ServiceReference type for use with
// apply.
func ServiceReference() *ServiceReferenceApplyConfiguration {
return &ServiceReferenceApplyConfiguration{}
}
// 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 *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration {
b.Namespace = &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 *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithPath sets the Path 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 Path field is set to the value of the last call.
func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration {
b.Path = &value
return b
}
// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration {
b.Port = &value
return b
}

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 v1beta1
// TypeCheckingApplyConfiguration represents an declarative configuration of the TypeChecking type for use
// with apply.
type TypeCheckingApplyConfiguration struct {
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}
// TypeCheckingApplyConfiguration constructs an declarative configuration of the TypeChecking type for use with
// apply.
func TypeChecking() *TypeCheckingApplyConfiguration {
return &TypeCheckingApplyConfiguration{}
}
// WithExpressionWarnings adds the given value to the ExpressionWarnings 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 ExpressionWarnings field.
func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithExpressionWarnings")
}
b.ExpressionWarnings = append(b.ExpressionWarnings, *values[i])
}
return b
}

View File

@@ -0,0 +1,256 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
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"
)
// ValidatingAdmissionPolicyApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicy type for use
// with apply.
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"`
}
// ValidatingAdmissionPolicy constructs an declarative configuration of the ValidatingAdmissionPolicy type for use with
// apply.
func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b
}
// ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a
// ValidatingAdmissionPolicyApplyConfiguration 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.
// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicy 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.
// Experimental!
func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status")
}
func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicy.Name)
b.WithKind("ValidatingAdmissionPolicy")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyApplyConfiguration) 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 *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Spec = 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 *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,247 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
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"
)
// ValidatingAdmissionPolicyBindingApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBinding type for use
// with apply.
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
// ValidatingAdmissionPolicyBinding constructs an declarative configuration of the ValidatingAdmissionPolicyBinding type for use with
// apply.
func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b
}
// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from
// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a
// ValidatingAdmissionPolicyBindingApplyConfiguration 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.
// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
// ExtractValidatingAdmissionPolicyBinding 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.
// Experimental!
func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "")
}
// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status")
}
func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) {
b := &ValidatingAdmissionPolicyBindingApplyConfiguration{}
err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingAdmissionPolicyBinding.Name)
b.WithKind("ValidatingAdmissionPolicyBinding")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b, nil
}
// 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) 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 *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration {
b.Spec = value
return b
}

View File

@@ -0,0 +1,72 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
)
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
// with apply.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
PolicyName *string `json:"policyName,omitempty"`
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
ValidationActions []admissionregistrationv1beta1.ValidationAction `json:"validationActions,omitempty"`
}
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
// apply.
func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{}
}
// WithPolicyName sets the PolicyName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PolicyName field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.PolicyName = &value
return b
}
// WithParamRef sets the ParamRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamRef field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.ParamRef = value
return b
}
// WithMatchResources sets the MatchResources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchResources field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
b.MatchResources = value
return b
}
// WithValidationActions adds the given value to the ValidationActions 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 ValidationActions field.
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1beta1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
for i := range values {
b.ValidationActions = append(b.ValidationActions, values[i])
}
return b
}

View File

@@ -0,0 +1,117 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
)
// ValidatingAdmissionPolicySpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicySpec type for use
// with apply.
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
}
// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with
// apply.
func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration {
return &ValidatingAdmissionPolicySpecApplyConfiguration{}
}
// WithParamKind sets the ParamKind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParamKind field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.ParamKind = value
return b
}
// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MatchConstraints field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.MatchConstraints = value
return b
}
// WithValidations adds the given value to the Validations 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 Validations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithValidations")
}
b.Validations = append(b.Validations, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1beta1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithAuditAnnotations adds the given value to the AuditAnnotations 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 AuditAnnotations field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithAuditAnnotations")
}
b.AuditAnnotations = append(b.AuditAnnotations, *values[i])
}
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}
// WithVariables adds the given value to the Variables field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Variables field.
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVariables")
}
b.Variables = append(b.Variables, *values[i])
}
return b
}

View File

@@ -0,0 +1,66 @@
/*
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 v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use
// with apply.
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with
// apply.
func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration {
return &ValidatingAdmissionPolicyStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithTypeChecking sets the TypeChecking 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 TypeChecking field is set to the value of the last call.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
b.TypeChecking = value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
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

@@ -0,0 +1,147 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ValidatingWebhookApplyConfiguration represents an declarative configuration of the ValidatingWebhook type for use
// with apply.
type ValidatingWebhookApplyConfiguration struct {
Name *string `json:"name,omitempty"`
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
}
// ValidatingWebhookApplyConfiguration constructs an declarative configuration of the ValidatingWebhook type for use with
// apply.
func ValidatingWebhook() *ValidatingWebhookApplyConfiguration {
return &ValidatingWebhookApplyConfiguration{}
}
// 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 *ValidatingWebhookApplyConfiguration) WithName(value string) *ValidatingWebhookApplyConfiguration {
b.Name = &value
return b
}
// WithClientConfig sets the ClientConfig 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 ClientConfig field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.ClientConfig = value
return b
}
// WithRules adds the given value to the Rules 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 Rules field.
func (b *ValidatingWebhookApplyConfiguration) WithRules(values ...*v1.RuleWithOperationsApplyConfiguration) *ValidatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRules")
}
b.Rules = append(b.Rules, *values[i])
}
return b
}
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FailurePolicy field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithFailurePolicy(value admissionregistrationv1beta1.FailurePolicyType) *ValidatingWebhookApplyConfiguration {
b.FailurePolicy = &value
return b
}
// WithMatchPolicy sets the MatchPolicy 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 MatchPolicy field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithMatchPolicy(value admissionregistrationv1beta1.MatchPolicyType) *ValidatingWebhookApplyConfiguration {
b.MatchPolicy = &value
return b
}
// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.NamespaceSelector = value
return b
}
// WithObjectSelector sets the ObjectSelector 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 ObjectSelector field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithObjectSelector(value *metav1.LabelSelectorApplyConfiguration) *ValidatingWebhookApplyConfiguration {
b.ObjectSelector = value
return b
}
// WithSideEffects sets the SideEffects 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 SideEffects field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithSideEffects(value admissionregistrationv1beta1.SideEffectClass) *ValidatingWebhookApplyConfiguration {
b.SideEffects = &value
return b
}
// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *ValidatingWebhookApplyConfiguration) WithTimeoutSeconds(value int32) *ValidatingWebhookApplyConfiguration {
b.TimeoutSeconds = &value
return b
}
// WithAdmissionReviewVersions adds the given value to the AdmissionReviewVersions 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 AdmissionReviewVersions field.
func (b *ValidatingWebhookApplyConfiguration) WithAdmissionReviewVersions(values ...string) *ValidatingWebhookApplyConfiguration {
for i := range values {
b.AdmissionReviewVersions = append(b.AdmissionReviewVersions, values[i])
}
return b
}
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (b *ValidatingWebhookApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingWebhookApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMatchConditions")
}
b.MatchConditions = append(b.MatchConditions, *values[i])
}
return b
}

View File

@@ -0,0 +1,252 @@
/*
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 v1beta1
import (
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
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"
)
// ValidatingWebhookConfigurationApplyConfiguration represents an declarative configuration of the ValidatingWebhookConfiguration type for use
// with apply.
type ValidatingWebhookConfigurationApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
}
// ValidatingWebhookConfiguration constructs an declarative configuration of the ValidatingWebhookConfiguration type for use with
// apply.
func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfigurationApplyConfiguration {
b := &ValidatingWebhookConfigurationApplyConfiguration{}
b.WithName(name)
b.WithKind("ValidatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b
}
// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a
// ValidatingWebhookConfigurationApplyConfiguration 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.
// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
// ExtractValidatingWebhookConfiguration 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.
// Experimental!
func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "")
}
// ExtractValidatingWebhookConfigurationStatus is the same as ExtractValidatingWebhookConfiguration except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractValidatingWebhookConfigurationStatus(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
return extractValidatingWebhookConfiguration(validatingWebhookConfiguration, fieldManager, "status")
}
func extractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string, subresource string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
b := &ValidatingWebhookConfigurationApplyConfiguration{}
err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(validatingWebhookConfiguration.Name)
b.WithKind("ValidatingWebhookConfiguration")
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
return b, nil
}
// 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 *ValidatingWebhookConfigurationApplyConfiguration) WithKind(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithAPIVersion(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithName(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithGenerateName(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithUID(value types.UID) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithResourceVersion(value string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithGeneration(value int64) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithLabels(entries map[string]string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values ...string) *ValidatingWebhookConfigurationApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithWebhooks adds the given value to the Webhooks 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 Webhooks field.
func (b *ValidatingWebhookConfigurationApplyConfiguration) WithWebhooks(values ...*ValidatingWebhookApplyConfiguration) *ValidatingWebhookConfigurationApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithWebhooks")
}
b.Webhooks = append(b.Webhooks, *values[i])
}
return b
}

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 v1beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use
// with apply.
type ValidationApplyConfiguration struct {
Expression *string `json:"expression,omitempty"`
Message *string `json:"message,omitempty"`
Reason *v1.StatusReason `json:"reason,omitempty"`
MessageExpression *string `json:"messageExpression,omitempty"`
}
// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with
// apply.
func Validation() *ValidationApplyConfiguration {
return &ValidationApplyConfiguration{}
}
// 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 *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration {
b.Expression = &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 *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration {
b.Message = &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 *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration {
b.Reason = &value
return b
}
// WithMessageExpression sets the MessageExpression 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 MessageExpression field is set to the value of the last call.
func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration {
b.MessageExpression = &value
return b
}

View File

@@ -0,0 +1,48 @@
/*
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 v1beta1
// VariableApplyConfiguration represents an declarative configuration of the Variable type for use
// with apply.
type VariableApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Expression *string `json:"expression,omitempty"`
}
// VariableApplyConfiguration constructs an declarative configuration of the Variable type for use with
// apply.
func Variable() *VariableApplyConfiguration {
return &VariableApplyConfiguration{}
}
// 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 *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration {
b.Name = &value
return b
}
// 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 *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration {
b.Expression = &value
return b
}

View File

@@ -0,0 +1,59 @@
/*
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 v1beta1
// WebhookClientConfigApplyConfiguration represents an declarative configuration of the WebhookClientConfig type for use
// with apply.
type WebhookClientConfigApplyConfiguration struct {
URL *string `json:"url,omitempty"`
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
CABundle []byte `json:"caBundle,omitempty"`
}
// WebhookClientConfigApplyConfiguration constructs an declarative configuration of the WebhookClientConfig type for use with
// apply.
func WebhookClientConfig() *WebhookClientConfigApplyConfiguration {
return &WebhookClientConfigApplyConfiguration{}
}
// WithURL sets the URL 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 URL field is set to the value of the last call.
func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration {
b.URL = &value
return b
}
// WithService sets the Service 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 Service field is set to the value of the last call.
func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration {
b.Service = value
return b
}
// WithCABundle adds the given value to the CABundle 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 CABundle field.
func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration {
for i := range values {
b.CABundle = append(b.CABundle, values[i])
}
return b
}

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 v1alpha1
// ServerStorageVersionApplyConfiguration represents an declarative configuration of the ServerStorageVersion type for use
// with apply.
type ServerStorageVersionApplyConfiguration struct {
APIServerID *string `json:"apiServerID,omitempty"`
EncodingVersion *string `json:"encodingVersion,omitempty"`
DecodableVersions []string `json:"decodableVersions,omitempty"`
ServedVersions []string `json:"servedVersions,omitempty"`
}
// ServerStorageVersionApplyConfiguration constructs an declarative configuration of the ServerStorageVersion type for use with
// apply.
func ServerStorageVersion() *ServerStorageVersionApplyConfiguration {
return &ServerStorageVersionApplyConfiguration{}
}
// WithAPIServerID sets the APIServerID 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 APIServerID field is set to the value of the last call.
func (b *ServerStorageVersionApplyConfiguration) WithAPIServerID(value string) *ServerStorageVersionApplyConfiguration {
b.APIServerID = &value
return b
}
// WithEncodingVersion sets the EncodingVersion 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 EncodingVersion field is set to the value of the last call.
func (b *ServerStorageVersionApplyConfiguration) WithEncodingVersion(value string) *ServerStorageVersionApplyConfiguration {
b.EncodingVersion = &value
return b
}
// WithDecodableVersions adds the given value to the DecodableVersions 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 DecodableVersions field.
func (b *ServerStorageVersionApplyConfiguration) WithDecodableVersions(values ...string) *ServerStorageVersionApplyConfiguration {
for i := range values {
b.DecodableVersions = append(b.DecodableVersions, values[i])
}
return b
}
// WithServedVersions adds the given value to the ServedVersions 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 ServedVersions field.
func (b *ServerStorageVersionApplyConfiguration) WithServedVersions(values ...string) *ServerStorageVersionApplyConfiguration {
for i := range values {
b.ServedVersions = append(b.ServedVersions, values[i])
}
return b
}

View File

@@ -0,0 +1,256 @@
/*
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 (
v1alpha1 "k8s.io/api/apiserverinternal/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"
)
// StorageVersionApplyConfiguration represents an declarative configuration of the StorageVersion type for use
// with apply.
type StorageVersionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *v1alpha1.StorageVersionSpec `json:"spec,omitempty"`
Status *StorageVersionStatusApplyConfiguration `json:"status,omitempty"`
}
// StorageVersion constructs an declarative configuration of the StorageVersion type for use with
// apply.
func StorageVersion(name string) *StorageVersionApplyConfiguration {
b := &StorageVersionApplyConfiguration{}
b.WithName(name)
b.WithKind("StorageVersion")
b.WithAPIVersion("internal.apiserver.k8s.io/v1alpha1")
return b
}
// ExtractStorageVersion extracts the applied configuration owned by fieldManager from
// storageVersion. If no managedFields are found in storageVersion for fieldManager, a
// StorageVersionApplyConfiguration 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.
// storageVersion must be a unmodified StorageVersion API object that was retrieved from the Kubernetes API.
// ExtractStorageVersion 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.
// Experimental!
func ExtractStorageVersion(storageVersion *v1alpha1.StorageVersion, fieldManager string) (*StorageVersionApplyConfiguration, error) {
return extractStorageVersion(storageVersion, fieldManager, "")
}
// ExtractStorageVersionStatus is the same as ExtractStorageVersion except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractStorageVersionStatus(storageVersion *v1alpha1.StorageVersion, fieldManager string) (*StorageVersionApplyConfiguration, error) {
return extractStorageVersion(storageVersion, fieldManager, "status")
}
func extractStorageVersion(storageVersion *v1alpha1.StorageVersion, fieldManager string, subresource string) (*StorageVersionApplyConfiguration, error) {
b := &StorageVersionApplyConfiguration{}
err := managedfields.ExtractInto(storageVersion, internal.Parser().Type("io.k8s.api.apiserverinternal.v1alpha1.StorageVersion"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(storageVersion.Name)
b.WithKind("StorageVersion")
b.WithAPIVersion("internal.apiserver.k8s.io/v1alpha1")
return b, nil
}
// 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 *StorageVersionApplyConfiguration) WithKind(value string) *StorageVersionApplyConfiguration {
b.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 *StorageVersionApplyConfiguration) WithAPIVersion(value string) *StorageVersionApplyConfiguration {
b.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 *StorageVersionApplyConfiguration) WithName(value string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithGenerateName(value string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithNamespace(value string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithUID(value types.UID) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithResourceVersion(value string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithGeneration(value int64) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StorageVersionApplyConfiguration) WithLabels(entries map[string]string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *StorageVersionApplyConfiguration) WithAnnotations(entries map[string]string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *StorageVersionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *StorageVersionApplyConfiguration) WithFinalizers(values ...string) *StorageVersionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *StorageVersionApplyConfiguration) 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 *StorageVersionApplyConfiguration) WithSpec(value v1alpha1.StorageVersionSpec) *StorageVersionApplyConfiguration {
b.Spec = &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 *StorageVersionApplyConfiguration) WithStatus(value *StorageVersionStatusApplyConfiguration) *StorageVersionApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,89 @@
/*
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 (
v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// StorageVersionConditionApplyConfiguration represents an declarative configuration of the StorageVersionCondition type for use
// with apply.
type StorageVersionConditionApplyConfiguration struct {
Type *v1alpha1.StorageVersionConditionType `json:"type,omitempty"`
Status *v1alpha1.ConditionStatus `json:"status,omitempty"`
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// StorageVersionConditionApplyConfiguration constructs an declarative configuration of the StorageVersionCondition type for use with
// apply.
func StorageVersionCondition() *StorageVersionConditionApplyConfiguration {
return &StorageVersionConditionApplyConfiguration{}
}
// 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 *StorageVersionConditionApplyConfiguration) WithType(value v1alpha1.StorageVersionConditionType) *StorageVersionConditionApplyConfiguration {
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 *StorageVersionConditionApplyConfiguration) WithStatus(value v1alpha1.ConditionStatus) *StorageVersionConditionApplyConfiguration {
b.Status = &value
return b
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *StorageVersionConditionApplyConfiguration) WithObservedGeneration(value int64) *StorageVersionConditionApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *StorageVersionConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *StorageVersionConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *StorageVersionConditionApplyConfiguration) WithReason(value string) *StorageVersionConditionApplyConfiguration {
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 *StorageVersionConditionApplyConfiguration) WithMessage(value string) *StorageVersionConditionApplyConfiguration {
b.Message = &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
// StorageVersionStatusApplyConfiguration represents an declarative configuration of the StorageVersionStatus type for use
// with apply.
type StorageVersionStatusApplyConfiguration struct {
StorageVersions []ServerStorageVersionApplyConfiguration `json:"storageVersions,omitempty"`
CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty"`
Conditions []StorageVersionConditionApplyConfiguration `json:"conditions,omitempty"`
}
// StorageVersionStatusApplyConfiguration constructs an declarative configuration of the StorageVersionStatus type for use with
// apply.
func StorageVersionStatus() *StorageVersionStatusApplyConfiguration {
return &StorageVersionStatusApplyConfiguration{}
}
// WithStorageVersions adds the given value to the StorageVersions 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 StorageVersions field.
func (b *StorageVersionStatusApplyConfiguration) WithStorageVersions(values ...*ServerStorageVersionApplyConfiguration) *StorageVersionStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithStorageVersions")
}
b.StorageVersions = append(b.StorageVersions, *values[i])
}
return b
}
// WithCommonEncodingVersion sets the CommonEncodingVersion 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 CommonEncodingVersion field is set to the value of the last call.
func (b *StorageVersionStatusApplyConfiguration) WithCommonEncodingVersion(value string) *StorageVersionStatusApplyConfiguration {
b.CommonEncodingVersion = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *StorageVersionStatusApplyConfiguration) WithConditions(values ...*StorageVersionConditionApplyConfiguration) *StorageVersionStatusApplyConfiguration {
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

@@ -0,0 +1,259 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
appsv1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
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"
)
// ControllerRevisionApplyConfiguration represents an declarative configuration of the ControllerRevision type for use
// with apply.
type ControllerRevisionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Data *runtime.RawExtension `json:"data,omitempty"`
Revision *int64 `json:"revision,omitempty"`
}
// ControllerRevision constructs an declarative configuration of the ControllerRevision type for use with
// apply.
func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfiguration {
b := &ControllerRevisionApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ControllerRevision")
b.WithAPIVersion("apps/v1")
return b
}
// ExtractControllerRevision extracts the applied configuration owned by fieldManager from
// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a
// ControllerRevisionApplyConfiguration 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.
// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API.
// ExtractControllerRevision 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.
// Experimental!
func ExtractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
return extractControllerRevision(controllerRevision, fieldManager, "")
}
// ExtractControllerRevisionStatus is the same as ExtractControllerRevision except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractControllerRevisionStatus(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
return extractControllerRevision(controllerRevision, fieldManager, "status")
}
func extractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) {
b := &ControllerRevisionApplyConfiguration{}
err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1.ControllerRevision"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(controllerRevision.Name)
b.WithNamespace(controllerRevision.Namespace)
b.WithKind("ControllerRevision")
b.WithAPIVersion("apps/v1")
return b, nil
}
// 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 *ControllerRevisionApplyConfiguration) WithKind(value string) *ControllerRevisionApplyConfiguration {
b.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 *ControllerRevisionApplyConfiguration) WithAPIVersion(value string) *ControllerRevisionApplyConfiguration {
b.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 *ControllerRevisionApplyConfiguration) WithName(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithGenerateName(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithNamespace(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithUID(value types.UID) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithResourceVersion(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithGeneration(value int64) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithLabels(entries map[string]string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ControllerRevisionApplyConfiguration) WithAnnotations(entries map[string]string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ControllerRevisionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithData sets the Data 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 Data field is set to the value of the last call.
func (b *ControllerRevisionApplyConfiguration) WithData(value runtime.RawExtension) *ControllerRevisionApplyConfiguration {
b.Data = &value
return b
}
// WithRevision sets the Revision 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 Revision field is set to the value of the last call.
func (b *ControllerRevisionApplyConfiguration) WithRevision(value int64) *ControllerRevisionApplyConfiguration {
b.Revision = &value
return b
}

View File

@@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiappsv1 "k8s.io/api/apps/v1"
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"
)
// DaemonSetApplyConfiguration represents an declarative configuration of the DaemonSet type for use
// with apply.
type DaemonSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *DaemonSetSpecApplyConfiguration `json:"spec,omitempty"`
Status *DaemonSetStatusApplyConfiguration `json:"status,omitempty"`
}
// DaemonSet constructs an declarative configuration of the DaemonSet type for use with
// apply.
func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration {
b := &DaemonSetApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("DaemonSet")
b.WithAPIVersion("apps/v1")
return b
}
// ExtractDaemonSet extracts the applied configuration owned by fieldManager from
// daemonSet. If no managedFields are found in daemonSet for fieldManager, a
// DaemonSetApplyConfiguration 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.
// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API.
// ExtractDaemonSet 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.
// Experimental!
func ExtractDaemonSet(daemonSet *apiappsv1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) {
return extractDaemonSet(daemonSet, fieldManager, "")
}
// ExtractDaemonSetStatus is the same as ExtractDaemonSet except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractDaemonSetStatus(daemonSet *apiappsv1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) {
return extractDaemonSet(daemonSet, fieldManager, "status")
}
func extractDaemonSet(daemonSet *apiappsv1.DaemonSet, fieldManager string, subresource string) (*DaemonSetApplyConfiguration, error) {
b := &DaemonSetApplyConfiguration{}
err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1.DaemonSet"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(daemonSet.Name)
b.WithNamespace(daemonSet.Namespace)
b.WithKind("DaemonSet")
b.WithAPIVersion("apps/v1")
return b, nil
}
// 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 *DaemonSetApplyConfiguration) WithKind(value string) *DaemonSetApplyConfiguration {
b.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 *DaemonSetApplyConfiguration) WithAPIVersion(value string) *DaemonSetApplyConfiguration {
b.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 *DaemonSetApplyConfiguration) WithName(value string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithGenerateName(value string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithUID(value types.UID) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithResourceVersion(value string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithGeneration(value int64) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DaemonSetApplyConfiguration) WithLabels(entries map[string]string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DaemonSetApplyConfiguration) WithAnnotations(entries map[string]string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DaemonSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *DaemonSetApplyConfiguration) 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 *DaemonSetApplyConfiguration) WithSpec(value *DaemonSetSpecApplyConfiguration) *DaemonSetApplyConfiguration {
b.Spec = 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 *DaemonSetApplyConfiguration) WithStatus(value *DaemonSetStatusApplyConfiguration) *DaemonSetApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,81 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DaemonSetConditionApplyConfiguration represents an declarative configuration of the DaemonSetCondition type for use
// with apply.
type DaemonSetConditionApplyConfiguration struct {
Type *v1.DaemonSetConditionType `json:"type,omitempty"`
Status *corev1.ConditionStatus `json:"status,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// DaemonSetConditionApplyConfiguration constructs an declarative configuration of the DaemonSetCondition type for use with
// apply.
func DaemonSetCondition() *DaemonSetConditionApplyConfiguration {
return &DaemonSetConditionApplyConfiguration{}
}
// 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 *DaemonSetConditionApplyConfiguration) WithType(value v1.DaemonSetConditionType) *DaemonSetConditionApplyConfiguration {
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 *DaemonSetConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *DaemonSetConditionApplyConfiguration {
b.Status = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *DaemonSetConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *DaemonSetConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *DaemonSetConditionApplyConfiguration) WithReason(value string) *DaemonSetConditionApplyConfiguration {
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 *DaemonSetConditionApplyConfiguration) WithMessage(value string) *DaemonSetConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -0,0 +1,80 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// DaemonSetSpecApplyConfiguration represents an declarative configuration of the DaemonSetSpec type for use
// with apply.
type DaemonSetSpecApplyConfiguration struct {
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}
// DaemonSetSpecApplyConfiguration constructs an declarative configuration of the DaemonSetSpec type for use with
// apply.
func DaemonSetSpec() *DaemonSetSpecApplyConfiguration {
return &DaemonSetSpecApplyConfiguration{}
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *DaemonSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DaemonSetSpecApplyConfiguration {
b.Selector = value
return b
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *DaemonSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DaemonSetSpecApplyConfiguration {
b.Template = value
return b
}
// WithUpdateStrategy sets the UpdateStrategy 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 UpdateStrategy field is set to the value of the last call.
func (b *DaemonSetSpecApplyConfiguration) WithUpdateStrategy(value *DaemonSetUpdateStrategyApplyConfiguration) *DaemonSetSpecApplyConfiguration {
b.UpdateStrategy = value
return b
}
// WithMinReadySeconds sets the MinReadySeconds 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 MinReadySeconds field is set to the value of the last call.
func (b *DaemonSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *DaemonSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}
// WithRevisionHistoryLimit sets the RevisionHistoryLimit 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 RevisionHistoryLimit field is set to the value of the last call.
func (b *DaemonSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DaemonSetSpecApplyConfiguration {
b.RevisionHistoryLimit = &value
return b
}

View File

@@ -0,0 +1,125 @@
/*
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
// DaemonSetStatusApplyConfiguration represents an declarative configuration of the DaemonSetStatus type for use
// with apply.
type DaemonSetStatusApplyConfiguration struct {
CurrentNumberScheduled *int32 `json:"currentNumberScheduled,omitempty"`
NumberMisscheduled *int32 `json:"numberMisscheduled,omitempty"`
DesiredNumberScheduled *int32 `json:"desiredNumberScheduled,omitempty"`
NumberReady *int32 `json:"numberReady,omitempty"`
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
UpdatedNumberScheduled *int32 `json:"updatedNumberScheduled,omitempty"`
NumberAvailable *int32 `json:"numberAvailable,omitempty"`
NumberUnavailable *int32 `json:"numberUnavailable,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
Conditions []DaemonSetConditionApplyConfiguration `json:"conditions,omitempty"`
}
// DaemonSetStatusApplyConfiguration constructs an declarative configuration of the DaemonSetStatus type for use with
// apply.
func DaemonSetStatus() *DaemonSetStatusApplyConfiguration {
return &DaemonSetStatusApplyConfiguration{}
}
// WithCurrentNumberScheduled sets the CurrentNumberScheduled 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 CurrentNumberScheduled field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithCurrentNumberScheduled(value int32) *DaemonSetStatusApplyConfiguration {
b.CurrentNumberScheduled = &value
return b
}
// WithNumberMisscheduled sets the NumberMisscheduled 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 NumberMisscheduled field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithNumberMisscheduled(value int32) *DaemonSetStatusApplyConfiguration {
b.NumberMisscheduled = &value
return b
}
// WithDesiredNumberScheduled sets the DesiredNumberScheduled 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 DesiredNumberScheduled field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithDesiredNumberScheduled(value int32) *DaemonSetStatusApplyConfiguration {
b.DesiredNumberScheduled = &value
return b
}
// WithNumberReady sets the NumberReady 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 NumberReady field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithNumberReady(value int32) *DaemonSetStatusApplyConfiguration {
b.NumberReady = &value
return b
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithObservedGeneration(value int64) *DaemonSetStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithUpdatedNumberScheduled sets the UpdatedNumberScheduled 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 UpdatedNumberScheduled field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithUpdatedNumberScheduled(value int32) *DaemonSetStatusApplyConfiguration {
b.UpdatedNumberScheduled = &value
return b
}
// WithNumberAvailable sets the NumberAvailable 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 NumberAvailable field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithNumberAvailable(value int32) *DaemonSetStatusApplyConfiguration {
b.NumberAvailable = &value
return b
}
// WithNumberUnavailable sets the NumberUnavailable 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 NumberUnavailable field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithNumberUnavailable(value int32) *DaemonSetStatusApplyConfiguration {
b.NumberUnavailable = &value
return b
}
// WithCollisionCount sets the CollisionCount 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 CollisionCount field is set to the value of the last call.
func (b *DaemonSetStatusApplyConfiguration) WithCollisionCount(value int32) *DaemonSetStatusApplyConfiguration {
b.CollisionCount = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *DaemonSetStatusApplyConfiguration) WithConditions(values ...*DaemonSetConditionApplyConfiguration) *DaemonSetStatusApplyConfiguration {
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

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
)
// DaemonSetUpdateStrategyApplyConfiguration represents an declarative configuration of the DaemonSetUpdateStrategy type for use
// with apply.
type DaemonSetUpdateStrategyApplyConfiguration struct {
Type *v1.DaemonSetUpdateStrategyType `json:"type,omitempty"`
RollingUpdate *RollingUpdateDaemonSetApplyConfiguration `json:"rollingUpdate,omitempty"`
}
// DaemonSetUpdateStrategyApplyConfiguration constructs an declarative configuration of the DaemonSetUpdateStrategy type for use with
// apply.
func DaemonSetUpdateStrategy() *DaemonSetUpdateStrategyApplyConfiguration {
return &DaemonSetUpdateStrategyApplyConfiguration{}
}
// 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 *DaemonSetUpdateStrategyApplyConfiguration) WithType(value v1.DaemonSetUpdateStrategyType) *DaemonSetUpdateStrategyApplyConfiguration {
b.Type = &value
return b
}
// WithRollingUpdate sets the RollingUpdate 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 RollingUpdate field is set to the value of the last call.
func (b *DaemonSetUpdateStrategyApplyConfiguration) WithRollingUpdate(value *RollingUpdateDaemonSetApplyConfiguration) *DaemonSetUpdateStrategyApplyConfiguration {
b.RollingUpdate = value
return b
}

View File

@@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiappsv1 "k8s.io/api/apps/v1"
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"
)
// DeploymentApplyConfiguration represents an declarative configuration of the Deployment type for use
// with apply.
type DeploymentApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"`
Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"`
}
// Deployment constructs an declarative configuration of the Deployment type for use with
// apply.
func Deployment(name, namespace string) *DeploymentApplyConfiguration {
b := &DeploymentApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Deployment")
b.WithAPIVersion("apps/v1")
return b
}
// ExtractDeployment extracts the applied configuration owned by fieldManager from
// deployment. If no managedFields are found in deployment for fieldManager, a
// DeploymentApplyConfiguration 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.
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
// ExtractDeployment 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.
// Experimental!
func ExtractDeployment(deployment *apiappsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
return extractDeployment(deployment, fieldManager, "")
}
// ExtractDeploymentStatus is the same as ExtractDeployment except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractDeploymentStatus(deployment *apiappsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
return extractDeployment(deployment, fieldManager, "status")
}
func extractDeployment(deployment *apiappsv1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) {
b := &DeploymentApplyConfiguration{}
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1.Deployment"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(deployment.Name)
b.WithNamespace(deployment.Namespace)
b.WithKind("Deployment")
b.WithAPIVersion("apps/v1")
return b, nil
}
// 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 *DeploymentApplyConfiguration) WithKind(value string) *DeploymentApplyConfiguration {
b.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 *DeploymentApplyConfiguration) WithAPIVersion(value string) *DeploymentApplyConfiguration {
b.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 *DeploymentApplyConfiguration) WithName(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithGenerateName(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithUID(value types.UID) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithResourceVersion(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithGeneration(value int64) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithLabels(entries map[string]string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DeploymentApplyConfiguration) WithAnnotations(entries map[string]string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DeploymentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *DeploymentApplyConfiguration) WithFinalizers(values ...string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *DeploymentApplyConfiguration) 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 *DeploymentApplyConfiguration) WithSpec(value *DeploymentSpecApplyConfiguration) *DeploymentApplyConfiguration {
b.Spec = 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 *DeploymentApplyConfiguration) WithStatus(value *DeploymentStatusApplyConfiguration) *DeploymentApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,90 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DeploymentConditionApplyConfiguration represents an declarative configuration of the DeploymentCondition type for use
// with apply.
type DeploymentConditionApplyConfiguration struct {
Type *v1.DeploymentConditionType `json:"type,omitempty"`
Status *corev1.ConditionStatus `json:"status,omitempty"`
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// DeploymentConditionApplyConfiguration constructs an declarative configuration of the DeploymentCondition type for use with
// apply.
func DeploymentCondition() *DeploymentConditionApplyConfiguration {
return &DeploymentConditionApplyConfiguration{}
}
// 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 *DeploymentConditionApplyConfiguration) WithType(value v1.DeploymentConditionType) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
b.LastUpdateTime = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *DeploymentConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *DeploymentConditionApplyConfiguration) WithReason(value string) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithMessage(value string) *DeploymentConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -0,0 +1,107 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// DeploymentSpecApplyConfiguration represents an declarative configuration of the DeploymentSpec type for use
// with apply.
type DeploymentSpecApplyConfiguration struct {
Replicas *int32 `json:"replicas,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
Paused *bool `json:"paused,omitempty"`
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
}
// DeploymentSpecApplyConfiguration constructs an declarative configuration of the DeploymentSpec type for use with
// apply.
func DeploymentSpec() *DeploymentSpecApplyConfiguration {
return &DeploymentSpecApplyConfiguration{}
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithReplicas(value int32) *DeploymentSpecApplyConfiguration {
b.Replicas = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Selector = value
return b
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Template = value
return b
}
// WithStrategy sets the Strategy 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 Strategy field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithStrategy(value *DeploymentStrategyApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Strategy = value
return b
}
// WithMinReadySeconds sets the MinReadySeconds 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 MinReadySeconds field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithMinReadySeconds(value int32) *DeploymentSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}
// WithRevisionHistoryLimit sets the RevisionHistoryLimit 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 RevisionHistoryLimit field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DeploymentSpecApplyConfiguration {
b.RevisionHistoryLimit = &value
return b
}
// WithPaused sets the Paused 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 Paused field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithPaused(value bool) *DeploymentSpecApplyConfiguration {
b.Paused = &value
return b
}
// WithProgressDeadlineSeconds sets the ProgressDeadlineSeconds 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 ProgressDeadlineSeconds field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithProgressDeadlineSeconds(value int32) *DeploymentSpecApplyConfiguration {
b.ProgressDeadlineSeconds = &value
return b
}

View File

@@ -0,0 +1,107 @@
/*
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
// DeploymentStatusApplyConfiguration represents an declarative configuration of the DeploymentStatus type for use
// with apply.
type DeploymentStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
Replicas *int32 `json:"replicas,omitempty"`
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
}
// DeploymentStatusApplyConfiguration constructs an declarative configuration of the DeploymentStatus type for use with
// apply.
func DeploymentStatus() *DeploymentStatusApplyConfiguration {
return &DeploymentStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithObservedGeneration(value int64) *DeploymentStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.Replicas = &value
return b
}
// WithUpdatedReplicas sets the UpdatedReplicas 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 UpdatedReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithUpdatedReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.UpdatedReplicas = &value
return b
}
// WithReadyReplicas sets the ReadyReplicas 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 ReadyReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithReadyReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.ReadyReplicas = &value
return b
}
// WithAvailableReplicas sets the AvailableReplicas 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 AvailableReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithAvailableReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}
// WithUnavailableReplicas sets the UnavailableReplicas 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 UnavailableReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithUnavailableReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.UnavailableReplicas = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *DeploymentStatusApplyConfiguration) WithConditions(values ...*DeploymentConditionApplyConfiguration) *DeploymentStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithCollisionCount sets the CollisionCount 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 CollisionCount field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithCollisionCount(value int32) *DeploymentStatusApplyConfiguration {
b.CollisionCount = &value
return b
}

View File

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
)
// DeploymentStrategyApplyConfiguration represents an declarative configuration of the DeploymentStrategy type for use
// with apply.
type DeploymentStrategyApplyConfiguration struct {
Type *v1.DeploymentStrategyType `json:"type,omitempty"`
RollingUpdate *RollingUpdateDeploymentApplyConfiguration `json:"rollingUpdate,omitempty"`
}
// DeploymentStrategyApplyConfiguration constructs an declarative configuration of the DeploymentStrategy type for use with
// apply.
func DeploymentStrategy() *DeploymentStrategyApplyConfiguration {
return &DeploymentStrategyApplyConfiguration{}
}
// 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 *DeploymentStrategyApplyConfiguration) WithType(value v1.DeploymentStrategyType) *DeploymentStrategyApplyConfiguration {
b.Type = &value
return b
}
// WithRollingUpdate sets the RollingUpdate 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 RollingUpdate field is set to the value of the last call.
func (b *DeploymentStrategyApplyConfiguration) WithRollingUpdate(value *RollingUpdateDeploymentApplyConfiguration) *DeploymentStrategyApplyConfiguration {
b.RollingUpdate = value
return b
}

View File

@@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiappsv1 "k8s.io/api/apps/v1"
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"
)
// ReplicaSetApplyConfiguration represents an declarative configuration of the ReplicaSet type for use
// with apply.
type ReplicaSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ReplicaSetSpecApplyConfiguration `json:"spec,omitempty"`
Status *ReplicaSetStatusApplyConfiguration `json:"status,omitempty"`
}
// ReplicaSet constructs an declarative configuration of the ReplicaSet type for use with
// apply.
func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration {
b := &ReplicaSetApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ReplicaSet")
b.WithAPIVersion("apps/v1")
return b
}
// ExtractReplicaSet extracts the applied configuration owned by fieldManager from
// replicaSet. If no managedFields are found in replicaSet for fieldManager, a
// ReplicaSetApplyConfiguration 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.
// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API.
// ExtractReplicaSet 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.
// Experimental!
func ExtractReplicaSet(replicaSet *apiappsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
return extractReplicaSet(replicaSet, fieldManager, "")
}
// ExtractReplicaSetStatus is the same as ExtractReplicaSet except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractReplicaSetStatus(replicaSet *apiappsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
return extractReplicaSet(replicaSet, fieldManager, "status")
}
func extractReplicaSet(replicaSet *apiappsv1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) {
b := &ReplicaSetApplyConfiguration{}
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1.ReplicaSet"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(replicaSet.Name)
b.WithNamespace(replicaSet.Namespace)
b.WithKind("ReplicaSet")
b.WithAPIVersion("apps/v1")
return b, nil
}
// 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 *ReplicaSetApplyConfiguration) WithKind(value string) *ReplicaSetApplyConfiguration {
b.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 *ReplicaSetApplyConfiguration) WithAPIVersion(value string) *ReplicaSetApplyConfiguration {
b.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 *ReplicaSetApplyConfiguration) WithName(value string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithGenerateName(value string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithUID(value types.UID) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithResourceVersion(value string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithGeneration(value int64) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ReplicaSetApplyConfiguration) WithLabels(entries map[string]string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ReplicaSetApplyConfiguration) WithAnnotations(entries map[string]string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ReplicaSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *ReplicaSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ReplicaSetApplyConfiguration) 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 *ReplicaSetApplyConfiguration) WithSpec(value *ReplicaSetSpecApplyConfiguration) *ReplicaSetApplyConfiguration {
b.Spec = 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 *ReplicaSetApplyConfiguration) WithStatus(value *ReplicaSetStatusApplyConfiguration) *ReplicaSetApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,81 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ReplicaSetConditionApplyConfiguration represents an declarative configuration of the ReplicaSetCondition type for use
// with apply.
type ReplicaSetConditionApplyConfiguration struct {
Type *v1.ReplicaSetConditionType `json:"type,omitempty"`
Status *corev1.ConditionStatus `json:"status,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// ReplicaSetConditionApplyConfiguration constructs an declarative configuration of the ReplicaSetCondition type for use with
// apply.
func ReplicaSetCondition() *ReplicaSetConditionApplyConfiguration {
return &ReplicaSetConditionApplyConfiguration{}
}
// 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 *ReplicaSetConditionApplyConfiguration) WithType(value v1.ReplicaSetConditionType) *ReplicaSetConditionApplyConfiguration {
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 *ReplicaSetConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *ReplicaSetConditionApplyConfiguration {
b.Status = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *ReplicaSetConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ReplicaSetConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *ReplicaSetConditionApplyConfiguration) WithReason(value string) *ReplicaSetConditionApplyConfiguration {
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 *ReplicaSetConditionApplyConfiguration) WithMessage(value string) *ReplicaSetConditionApplyConfiguration {
b.Message = &value
return b
}

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 applyconfiguration-gen. DO NOT EDIT.
package v1
import (
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ReplicaSetSpecApplyConfiguration represents an declarative configuration of the ReplicaSetSpec type for use
// with apply.
type ReplicaSetSpecApplyConfiguration struct {
Replicas *int32 `json:"replicas,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
}
// ReplicaSetSpecApplyConfiguration constructs an declarative configuration of the ReplicaSetSpec type for use with
// apply.
func ReplicaSetSpec() *ReplicaSetSpecApplyConfiguration {
return &ReplicaSetSpecApplyConfiguration{}
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *ReplicaSetSpecApplyConfiguration) WithReplicas(value int32) *ReplicaSetSpecApplyConfiguration {
b.Replicas = &value
return b
}
// WithMinReadySeconds sets the MinReadySeconds 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 MinReadySeconds field is set to the value of the last call.
func (b *ReplicaSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *ReplicaSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *ReplicaSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ReplicaSetSpecApplyConfiguration {
b.Selector = value
return b
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *ReplicaSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *ReplicaSetSpecApplyConfiguration {
b.Template = value
return b
}

View File

@@ -0,0 +1,89 @@
/*
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
// ReplicaSetStatusApplyConfiguration represents an declarative configuration of the ReplicaSetStatus type for use
// with apply.
type ReplicaSetStatusApplyConfiguration struct {
Replicas *int32 `json:"replicas,omitempty"`
FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"`
ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ReplicaSetStatusApplyConfiguration constructs an declarative configuration of the ReplicaSetStatus type for use with
// apply.
func ReplicaSetStatus() *ReplicaSetStatusApplyConfiguration {
return &ReplicaSetStatusApplyConfiguration{}
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *ReplicaSetStatusApplyConfiguration) WithReplicas(value int32) *ReplicaSetStatusApplyConfiguration {
b.Replicas = &value
return b
}
// WithFullyLabeledReplicas sets the FullyLabeledReplicas 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 FullyLabeledReplicas field is set to the value of the last call.
func (b *ReplicaSetStatusApplyConfiguration) WithFullyLabeledReplicas(value int32) *ReplicaSetStatusApplyConfiguration {
b.FullyLabeledReplicas = &value
return b
}
// WithReadyReplicas sets the ReadyReplicas 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 ReadyReplicas field is set to the value of the last call.
func (b *ReplicaSetStatusApplyConfiguration) WithReadyReplicas(value int32) *ReplicaSetStatusApplyConfiguration {
b.ReadyReplicas = &value
return b
}
// WithAvailableReplicas sets the AvailableReplicas 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 AvailableReplicas field is set to the value of the last call.
func (b *ReplicaSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *ReplicaSetStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *ReplicaSetStatusApplyConfiguration) WithObservedGeneration(value int64) *ReplicaSetStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ReplicaSetStatusApplyConfiguration) WithConditions(values ...*ReplicaSetConditionApplyConfiguration) *ReplicaSetStatusApplyConfiguration {
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

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateDaemonSetApplyConfiguration represents an declarative configuration of the RollingUpdateDaemonSet type for use
// with apply.
type RollingUpdateDaemonSetApplyConfiguration struct {
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}
// RollingUpdateDaemonSetApplyConfiguration constructs an declarative configuration of the RollingUpdateDaemonSet type for use with
// apply.
func RollingUpdateDaemonSet() *RollingUpdateDaemonSetApplyConfiguration {
return &RollingUpdateDaemonSetApplyConfiguration{}
}
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateDaemonSetApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateDaemonSetApplyConfiguration {
b.MaxUnavailable = &value
return b
}
// WithMaxSurge sets the MaxSurge 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 MaxSurge field is set to the value of the last call.
func (b *RollingUpdateDaemonSetApplyConfiguration) WithMaxSurge(value intstr.IntOrString) *RollingUpdateDaemonSetApplyConfiguration {
b.MaxSurge = &value
return b
}

View File

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateDeploymentApplyConfiguration represents an declarative configuration of the RollingUpdateDeployment type for use
// with apply.
type RollingUpdateDeploymentApplyConfiguration struct {
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}
// RollingUpdateDeploymentApplyConfiguration constructs an declarative configuration of the RollingUpdateDeployment type for use with
// apply.
func RollingUpdateDeployment() *RollingUpdateDeploymentApplyConfiguration {
return &RollingUpdateDeploymentApplyConfiguration{}
}
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateDeploymentApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateDeploymentApplyConfiguration {
b.MaxUnavailable = &value
return b
}
// WithMaxSurge sets the MaxSurge 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 MaxSurge field is set to the value of the last call.
func (b *RollingUpdateDeploymentApplyConfiguration) WithMaxSurge(value intstr.IntOrString) *RollingUpdateDeploymentApplyConfiguration {
b.MaxSurge = &value
return b
}

View File

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use
// with apply.
type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
Partition *int32 `json:"partition,omitempty"`
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}
// RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with
// apply.
func RollingUpdateStatefulSetStrategy() *RollingUpdateStatefulSetStrategyApplyConfiguration {
return &RollingUpdateStatefulSetStrategyApplyConfiguration{}
}
// WithPartition sets the Partition 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 Partition field is set to the value of the last call.
func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value int32) *RollingUpdateStatefulSetStrategyApplyConfiguration {
b.Partition = &value
return b
}
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration {
b.MaxUnavailable = &value
return b
}

View File

@@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apiappsv1 "k8s.io/api/apps/v1"
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"
)
// StatefulSetApplyConfiguration represents an declarative configuration of the StatefulSet type for use
// with apply.
type StatefulSetApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`
Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"`
}
// StatefulSet constructs an declarative configuration of the StatefulSet type for use with
// apply.
func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration {
b := &StatefulSetApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("StatefulSet")
b.WithAPIVersion("apps/v1")
return b
}
// ExtractStatefulSet extracts the applied configuration owned by fieldManager from
// statefulSet. If no managedFields are found in statefulSet for fieldManager, a
// StatefulSetApplyConfiguration 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.
// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API.
// ExtractStatefulSet 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.
// Experimental!
func ExtractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
return extractStatefulSet(statefulSet, fieldManager, "")
}
// ExtractStatefulSetStatus is the same as ExtractStatefulSet except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractStatefulSetStatus(statefulSet *apiappsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
return extractStatefulSet(statefulSet, fieldManager, "status")
}
func extractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) {
b := &StatefulSetApplyConfiguration{}
err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1.StatefulSet"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(statefulSet.Name)
b.WithNamespace(statefulSet.Namespace)
b.WithKind("StatefulSet")
b.WithAPIVersion("apps/v1")
return b, nil
}
// 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 *StatefulSetApplyConfiguration) WithKind(value string) *StatefulSetApplyConfiguration {
b.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 *StatefulSetApplyConfiguration) WithAPIVersion(value string) *StatefulSetApplyConfiguration {
b.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 *StatefulSetApplyConfiguration) WithName(value string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithGenerateName(value string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithUID(value types.UID) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithResourceVersion(value string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithGeneration(value int64) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *StatefulSetApplyConfiguration) WithLabels(entries map[string]string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *StatefulSetApplyConfiguration) WithAnnotations(entries map[string]string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *StatefulSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *StatefulSetApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *StatefulSetApplyConfiguration) 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 *StatefulSetApplyConfiguration) WithSpec(value *StatefulSetSpecApplyConfiguration) *StatefulSetApplyConfiguration {
b.Spec = 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 *StatefulSetApplyConfiguration) WithStatus(value *StatefulSetStatusApplyConfiguration) *StatefulSetApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,81 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// StatefulSetConditionApplyConfiguration represents an declarative configuration of the StatefulSetCondition type for use
// with apply.
type StatefulSetConditionApplyConfiguration struct {
Type *v1.StatefulSetConditionType `json:"type,omitempty"`
Status *corev1.ConditionStatus `json:"status,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// StatefulSetConditionApplyConfiguration constructs an declarative configuration of the StatefulSetCondition type for use with
// apply.
func StatefulSetCondition() *StatefulSetConditionApplyConfiguration {
return &StatefulSetConditionApplyConfiguration{}
}
// 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 *StatefulSetConditionApplyConfiguration) WithType(value v1.StatefulSetConditionType) *StatefulSetConditionApplyConfiguration {
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 *StatefulSetConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *StatefulSetConditionApplyConfiguration {
b.Status = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *StatefulSetConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *StatefulSetConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *StatefulSetConditionApplyConfiguration) WithReason(value string) *StatefulSetConditionApplyConfiguration {
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 *StatefulSetConditionApplyConfiguration) WithMessage(value string) *StatefulSetConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -0,0 +1,39 @@
/*
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
// StatefulSetOrdinalsApplyConfiguration represents an declarative configuration of the StatefulSetOrdinals type for use
// with apply.
type StatefulSetOrdinalsApplyConfiguration struct {
Start *int32 `json:"start,omitempty"`
}
// StatefulSetOrdinalsApplyConfiguration constructs an declarative configuration of the StatefulSetOrdinals type for use with
// apply.
func StatefulSetOrdinals() *StatefulSetOrdinalsApplyConfiguration {
return &StatefulSetOrdinalsApplyConfiguration{}
}
// WithStart sets the Start 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 Start field is set to the value of the last call.
func (b *StatefulSetOrdinalsApplyConfiguration) WithStart(value int32) *StatefulSetOrdinalsApplyConfiguration {
b.Start = &value
return b
}

View File

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
)
// StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration represents an declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use
// with apply.
type StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration struct {
WhenDeleted *v1.PersistentVolumeClaimRetentionPolicyType `json:"whenDeleted,omitempty"`
WhenScaled *v1.PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"`
}
// StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration constructs an declarative configuration of the StatefulSetPersistentVolumeClaimRetentionPolicy type for use with
// apply.
func StatefulSetPersistentVolumeClaimRetentionPolicy() *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration {
return &StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration{}
}
// WithWhenDeleted sets the WhenDeleted 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 WhenDeleted field is set to the value of the last call.
func (b *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration) WithWhenDeleted(value v1.PersistentVolumeClaimRetentionPolicyType) *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration {
b.WhenDeleted = &value
return b
}
// WithWhenScaled sets the WhenScaled 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 WhenScaled field is set to the value of the last call.
func (b *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration) WithWhenScaled(value v1.PersistentVolumeClaimRetentionPolicyType) *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration {
b.WhenScaled = &value
return b
}

View File

@@ -0,0 +1,140 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// StatefulSetSpecApplyConfiguration represents an declarative configuration of the StatefulSetSpec type for use
// with apply.
type StatefulSetSpecApplyConfiguration struct {
Replicas *int32 `json:"replicas,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
VolumeClaimTemplates []corev1.PersistentVolumeClaimApplyConfiguration `json:"volumeClaimTemplates,omitempty"`
ServiceName *string `json:"serviceName,omitempty"`
PodManagementPolicy *appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration `json:"persistentVolumeClaimRetentionPolicy,omitempty"`
Ordinals *StatefulSetOrdinalsApplyConfiguration `json:"ordinals,omitempty"`
}
// StatefulSetSpecApplyConfiguration constructs an declarative configuration of the StatefulSetSpec type for use with
// apply.
func StatefulSetSpec() *StatefulSetSpecApplyConfiguration {
return &StatefulSetSpecApplyConfiguration{}
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithReplicas(value int32) *StatefulSetSpecApplyConfiguration {
b.Replicas = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *StatefulSetSpecApplyConfiguration {
b.Selector = value
return b
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *StatefulSetSpecApplyConfiguration {
b.Template = value
return b
}
// WithVolumeClaimTemplates adds the given value to the VolumeClaimTemplates 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 VolumeClaimTemplates field.
func (b *StatefulSetSpecApplyConfiguration) WithVolumeClaimTemplates(values ...*corev1.PersistentVolumeClaimApplyConfiguration) *StatefulSetSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVolumeClaimTemplates")
}
b.VolumeClaimTemplates = append(b.VolumeClaimTemplates, *values[i])
}
return b
}
// WithServiceName sets the ServiceName 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 ServiceName field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithServiceName(value string) *StatefulSetSpecApplyConfiguration {
b.ServiceName = &value
return b
}
// WithPodManagementPolicy sets the PodManagementPolicy 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 PodManagementPolicy field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithPodManagementPolicy(value appsv1.PodManagementPolicyType) *StatefulSetSpecApplyConfiguration {
b.PodManagementPolicy = &value
return b
}
// WithUpdateStrategy sets the UpdateStrategy 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 UpdateStrategy field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithUpdateStrategy(value *StatefulSetUpdateStrategyApplyConfiguration) *StatefulSetSpecApplyConfiguration {
b.UpdateStrategy = value
return b
}
// WithRevisionHistoryLimit sets the RevisionHistoryLimit 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 RevisionHistoryLimit field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *StatefulSetSpecApplyConfiguration {
b.RevisionHistoryLimit = &value
return b
}
// WithMinReadySeconds sets the MinReadySeconds 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 MinReadySeconds field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *StatefulSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}
// WithPersistentVolumeClaimRetentionPolicy sets the PersistentVolumeClaimRetentionPolicy 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 PersistentVolumeClaimRetentionPolicy field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithPersistentVolumeClaimRetentionPolicy(value *StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration) *StatefulSetSpecApplyConfiguration {
b.PersistentVolumeClaimRetentionPolicy = value
return b
}
// WithOrdinals sets the Ordinals 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 Ordinals field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithOrdinals(value *StatefulSetOrdinalsApplyConfiguration) *StatefulSetSpecApplyConfiguration {
b.Ordinals = value
return b
}

View File

@@ -0,0 +1,125 @@
/*
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
// StatefulSetStatusApplyConfiguration represents an declarative configuration of the StatefulSetStatus type for use
// with apply.
type StatefulSetStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
Replicas *int32 `json:"replicas,omitempty"`
ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
CurrentRevision *string `json:"currentRevision,omitempty"`
UpdateRevision *string `json:"updateRevision,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
}
// StatefulSetStatusApplyConfiguration constructs an declarative configuration of the StatefulSetStatus type for use with
// apply.
func StatefulSetStatus() *StatefulSetStatusApplyConfiguration {
return &StatefulSetStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithObservedGeneration(value int64) *StatefulSetStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.Replicas = &value
return b
}
// WithReadyReplicas sets the ReadyReplicas 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 ReadyReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithReadyReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.ReadyReplicas = &value
return b
}
// WithCurrentReplicas sets the CurrentReplicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CurrentReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithCurrentReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.CurrentReplicas = &value
return b
}
// WithUpdatedReplicas sets the UpdatedReplicas 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 UpdatedReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithUpdatedReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.UpdatedReplicas = &value
return b
}
// WithCurrentRevision sets the CurrentRevision 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 CurrentRevision field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithCurrentRevision(value string) *StatefulSetStatusApplyConfiguration {
b.CurrentRevision = &value
return b
}
// WithUpdateRevision sets the UpdateRevision 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 UpdateRevision field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithUpdateRevision(value string) *StatefulSetStatusApplyConfiguration {
b.UpdateRevision = &value
return b
}
// WithCollisionCount sets the CollisionCount 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 CollisionCount field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithCollisionCount(value int32) *StatefulSetStatusApplyConfiguration {
b.CollisionCount = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *StatefulSetStatusApplyConfiguration) WithConditions(values ...*StatefulSetConditionApplyConfiguration) *StatefulSetStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithAvailableReplicas sets the AvailableReplicas 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 AvailableReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}

View File

@@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/api/apps/v1"
)
// StatefulSetUpdateStrategyApplyConfiguration represents an declarative configuration of the StatefulSetUpdateStrategy type for use
// with apply.
type StatefulSetUpdateStrategyApplyConfiguration struct {
Type *v1.StatefulSetUpdateStrategyType `json:"type,omitempty"`
RollingUpdate *RollingUpdateStatefulSetStrategyApplyConfiguration `json:"rollingUpdate,omitempty"`
}
// StatefulSetUpdateStrategyApplyConfiguration constructs an declarative configuration of the StatefulSetUpdateStrategy type for use with
// apply.
func StatefulSetUpdateStrategy() *StatefulSetUpdateStrategyApplyConfiguration {
return &StatefulSetUpdateStrategyApplyConfiguration{}
}
// 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 *StatefulSetUpdateStrategyApplyConfiguration) WithType(value v1.StatefulSetUpdateStrategyType) *StatefulSetUpdateStrategyApplyConfiguration {
b.Type = &value
return b
}
// WithRollingUpdate sets the RollingUpdate 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 RollingUpdate field is set to the value of the last call.
func (b *StatefulSetUpdateStrategyApplyConfiguration) WithRollingUpdate(value *RollingUpdateStatefulSetStrategyApplyConfiguration) *StatefulSetUpdateStrategyApplyConfiguration {
b.RollingUpdate = value
return b
}

View File

@@ -0,0 +1,259 @@
/*
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 v1beta1
import (
v1beta1 "k8s.io/api/apps/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
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"
)
// ControllerRevisionApplyConfiguration represents an declarative configuration of the ControllerRevision type for use
// with apply.
type ControllerRevisionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Data *runtime.RawExtension `json:"data,omitempty"`
Revision *int64 `json:"revision,omitempty"`
}
// ControllerRevision constructs an declarative configuration of the ControllerRevision type for use with
// apply.
func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfiguration {
b := &ControllerRevisionApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ControllerRevision")
b.WithAPIVersion("apps/v1beta1")
return b
}
// ExtractControllerRevision extracts the applied configuration owned by fieldManager from
// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a
// ControllerRevisionApplyConfiguration 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.
// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API.
// ExtractControllerRevision 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.
// Experimental!
func ExtractControllerRevision(controllerRevision *v1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
return extractControllerRevision(controllerRevision, fieldManager, "")
}
// ExtractControllerRevisionStatus is the same as ExtractControllerRevision except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractControllerRevisionStatus(controllerRevision *v1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
return extractControllerRevision(controllerRevision, fieldManager, "status")
}
func extractControllerRevision(controllerRevision *v1beta1.ControllerRevision, fieldManager string, subresource string) (*ControllerRevisionApplyConfiguration, error) {
b := &ControllerRevisionApplyConfiguration{}
err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1beta1.ControllerRevision"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(controllerRevision.Name)
b.WithNamespace(controllerRevision.Namespace)
b.WithKind("ControllerRevision")
b.WithAPIVersion("apps/v1beta1")
return b, nil
}
// 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 *ControllerRevisionApplyConfiguration) WithKind(value string) *ControllerRevisionApplyConfiguration {
b.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 *ControllerRevisionApplyConfiguration) WithAPIVersion(value string) *ControllerRevisionApplyConfiguration {
b.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 *ControllerRevisionApplyConfiguration) WithName(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithGenerateName(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithNamespace(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithUID(value types.UID) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithResourceVersion(value string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithGeneration(value int64) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *ControllerRevisionApplyConfiguration) WithLabels(entries map[string]string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ControllerRevisionApplyConfiguration) WithAnnotations(entries map[string]string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *ControllerRevisionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) *ControllerRevisionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithData sets the Data 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 Data field is set to the value of the last call.
func (b *ControllerRevisionApplyConfiguration) WithData(value runtime.RawExtension) *ControllerRevisionApplyConfiguration {
b.Data = &value
return b
}
// WithRevision sets the Revision 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 Revision field is set to the value of the last call.
func (b *ControllerRevisionApplyConfiguration) WithRevision(value int64) *ControllerRevisionApplyConfiguration {
b.Revision = &value
return b
}

View File

@@ -0,0 +1,258 @@
/*
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 v1beta1
import (
appsv1beta1 "k8s.io/api/apps/v1beta1"
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"
)
// DeploymentApplyConfiguration represents an declarative configuration of the Deployment type for use
// with apply.
type DeploymentApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *DeploymentSpecApplyConfiguration `json:"spec,omitempty"`
Status *DeploymentStatusApplyConfiguration `json:"status,omitempty"`
}
// Deployment constructs an declarative configuration of the Deployment type for use with
// apply.
func Deployment(name, namespace string) *DeploymentApplyConfiguration {
b := &DeploymentApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Deployment")
b.WithAPIVersion("apps/v1beta1")
return b
}
// ExtractDeployment extracts the applied configuration owned by fieldManager from
// deployment. If no managedFields are found in deployment for fieldManager, a
// DeploymentApplyConfiguration 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.
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
// ExtractDeployment 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.
// Experimental!
func ExtractDeployment(deployment *appsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
return extractDeployment(deployment, fieldManager, "")
}
// ExtractDeploymentStatus is the same as ExtractDeployment except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractDeploymentStatus(deployment *appsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
return extractDeployment(deployment, fieldManager, "status")
}
func extractDeployment(deployment *appsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) {
b := &DeploymentApplyConfiguration{}
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta1.Deployment"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(deployment.Name)
b.WithNamespace(deployment.Namespace)
b.WithKind("Deployment")
b.WithAPIVersion("apps/v1beta1")
return b, nil
}
// 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 *DeploymentApplyConfiguration) WithKind(value string) *DeploymentApplyConfiguration {
b.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 *DeploymentApplyConfiguration) WithAPIVersion(value string) *DeploymentApplyConfiguration {
b.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 *DeploymentApplyConfiguration) WithName(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithGenerateName(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithUID(value types.UID) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithResourceVersion(value string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithGeneration(value int64) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.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 *DeploymentApplyConfiguration) WithLabels(entries map[string]string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DeploymentApplyConfiguration) WithAnnotations(entries map[string]string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.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 *DeploymentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.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 *DeploymentApplyConfiguration) WithFinalizers(values ...string) *DeploymentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *DeploymentApplyConfiguration) 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 *DeploymentApplyConfiguration) WithSpec(value *DeploymentSpecApplyConfiguration) *DeploymentApplyConfiguration {
b.Spec = 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 *DeploymentApplyConfiguration) WithStatus(value *DeploymentStatusApplyConfiguration) *DeploymentApplyConfiguration {
b.Status = value
return b
}

View File

@@ -0,0 +1,90 @@
/*
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 v1beta1
import (
v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DeploymentConditionApplyConfiguration represents an declarative configuration of the DeploymentCondition type for use
// with apply.
type DeploymentConditionApplyConfiguration struct {
Type *v1beta1.DeploymentConditionType `json:"type,omitempty"`
Status *v1.ConditionStatus `json:"status,omitempty"`
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
Reason *string `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// DeploymentConditionApplyConfiguration constructs an declarative configuration of the DeploymentCondition type for use with
// apply.
func DeploymentCondition() *DeploymentConditionApplyConfiguration {
return &DeploymentConditionApplyConfiguration{}
}
// 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 *DeploymentConditionApplyConfiguration) WithType(value v1beta1.DeploymentConditionType) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
b.LastUpdateTime = &value
return b
}
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
func (b *DeploymentConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
func (b *DeploymentConditionApplyConfiguration) WithReason(value string) *DeploymentConditionApplyConfiguration {
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 *DeploymentConditionApplyConfiguration) WithMessage(value string) *DeploymentConditionApplyConfiguration {
b.Message = &value
return b
}

View File

@@ -0,0 +1,116 @@
/*
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 v1beta1
import (
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// DeploymentSpecApplyConfiguration represents an declarative configuration of the DeploymentSpec type for use
// with apply.
type DeploymentSpecApplyConfiguration struct {
Replicas *int32 `json:"replicas,omitempty"`
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
Paused *bool `json:"paused,omitempty"`
RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"`
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
}
// DeploymentSpecApplyConfiguration constructs an declarative configuration of the DeploymentSpec type for use with
// apply.
func DeploymentSpec() *DeploymentSpecApplyConfiguration {
return &DeploymentSpecApplyConfiguration{}
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithReplicas(value int32) *DeploymentSpecApplyConfiguration {
b.Replicas = &value
return b
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Selector = value
return b
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Template = value
return b
}
// WithStrategy sets the Strategy 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 Strategy field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithStrategy(value *DeploymentStrategyApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.Strategy = value
return b
}
// WithMinReadySeconds sets the MinReadySeconds 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 MinReadySeconds field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithMinReadySeconds(value int32) *DeploymentSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}
// WithRevisionHistoryLimit sets the RevisionHistoryLimit 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 RevisionHistoryLimit field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DeploymentSpecApplyConfiguration {
b.RevisionHistoryLimit = &value
return b
}
// WithPaused sets the Paused 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 Paused field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithPaused(value bool) *DeploymentSpecApplyConfiguration {
b.Paused = &value
return b
}
// WithRollbackTo sets the RollbackTo 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 RollbackTo field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithRollbackTo(value *RollbackConfigApplyConfiguration) *DeploymentSpecApplyConfiguration {
b.RollbackTo = value
return b
}
// WithProgressDeadlineSeconds sets the ProgressDeadlineSeconds 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 ProgressDeadlineSeconds field is set to the value of the last call.
func (b *DeploymentSpecApplyConfiguration) WithProgressDeadlineSeconds(value int32) *DeploymentSpecApplyConfiguration {
b.ProgressDeadlineSeconds = &value
return b
}

View File

@@ -0,0 +1,107 @@
/*
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 v1beta1
// DeploymentStatusApplyConfiguration represents an declarative configuration of the DeploymentStatus type for use
// with apply.
type DeploymentStatusApplyConfiguration struct {
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
Replicas *int32 `json:"replicas,omitempty"`
UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"`
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
}
// DeploymentStatusApplyConfiguration constructs an declarative configuration of the DeploymentStatus type for use with
// apply.
func DeploymentStatus() *DeploymentStatusApplyConfiguration {
return &DeploymentStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithObservedGeneration(value int64) *DeploymentStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.Replicas = &value
return b
}
// WithUpdatedReplicas sets the UpdatedReplicas 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 UpdatedReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithUpdatedReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.UpdatedReplicas = &value
return b
}
// WithReadyReplicas sets the ReadyReplicas 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 ReadyReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithReadyReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.ReadyReplicas = &value
return b
}
// WithAvailableReplicas sets the AvailableReplicas 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 AvailableReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithAvailableReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}
// WithUnavailableReplicas sets the UnavailableReplicas 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 UnavailableReplicas field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithUnavailableReplicas(value int32) *DeploymentStatusApplyConfiguration {
b.UnavailableReplicas = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *DeploymentStatusApplyConfiguration) WithConditions(values ...*DeploymentConditionApplyConfiguration) *DeploymentStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithCollisionCount sets the CollisionCount 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 CollisionCount field is set to the value of the last call.
func (b *DeploymentStatusApplyConfiguration) WithCollisionCount(value int32) *DeploymentStatusApplyConfiguration {
b.CollisionCount = &value
return b
}

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