Commit Graph

189 Commits

Author SHA1 Message Date
Joe Betz
2b735405b2 generate
Kubernetes-commit: 2595aa13098355414a558b2d97c58d505ca7b6c2
2024-09-03 14:25:56 -04:00
Stephen Kitt
d7a6826d37 Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 689d6ef7a3a44405909f6007b3a91eff458b95a2
2024-08-29 18:16:41 +02:00
Jefftree
8a2bbd0393 Coordinated Leader Election Alpha API
Kubernetes-commit: 3999b98c8840e41acaa19d94e88f46d1fbb0c1b3
2024-07-21 20:02:00 +00:00
Sergey Kanzhelev
79fd7abf82 generated files
Kubernetes-commit: 2253b53b585e3405c5ce2dda2921db3a0afa02c9
2024-07-22 05:20:58 +00:00
carlory
9dea255e12 Promote VolumeAttributesClass to beta
Kubernetes-commit: 0260c7d023551f85621049ca604a4fd5110ba0a9
2024-07-17 15:55:06 +08:00
Patrick Ohly
a7db3ade62 DRA: new API for 1.31
This is a complete revamp of the original API. Some of the key
differences:
- refocused on structured parameters and allocating devices
- support for constraints across devices
- support for allocating "all" or a fixed amount
  of similar devices in a single request
- no class for ResourceClaims, instead individual
  device requests are associated with a mandatory
  DeviceClass

For the sake of simplicity, optional basic types (ints, strings) where the null
value is the default are represented as values in the API types. This makes Go
code simpler because it doesn't have to check for nil (consumers) and values
can be set directly (producers). The effect is that in protobuf, these fields
always get encoded because `opt` only has an effect for pointers.

The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new
"request" field. This is considered acceptable because the entire `claims`
field in the pod spec is still alpha.

The implementation is complete enough to bring up the apiserver.
Adapting other components follows.

Kubernetes-commit: 91d7882e867da25ae8014f679db32b20e35e89b4
2024-06-18 17:47:29 +02:00
Patrick Ohly
e0bc24e153 DRA: remove "sharable" from claim allocation result
Now all claims are shareable up to the limit imposed by the size of the
"reserverFor" array.

This is one of the agreed simplifications for 1.31.

Kubernetes-commit: 8a629b9f150c1042e2918043e6012a4f22742b19
2024-06-13 18:43:17 +02:00
Patrick Ohly
a7f430b8bb DRA: remove immediate allocation
As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate
allocation is one of those features which can be removed because it makes no
sense for structured parameters and the justification for classic DRA is weak.

Kubernetes-commit: de5742ae83c8d77268a7caf5f3b1f418c4a13a84
2024-06-13 17:25:39 +02:00
Patrick Ohly
91ff2f6ea5 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.

Kubernetes-commit: b51d68bb87ba4fa47eb760f8a5e0baf9cf7f5b53
2024-06-14 12:40:48 +02:00
Tim Hockin
cd892da09f Make ServiceBackendPort an atomic struct
This allows different actors to force ownership of it without having to
explicitly unset the other field.

Kubernetes-commit: 7313990f61881c676c1f5d68365144a1d77cced3
2024-07-18 10:31:37 -07:00
Sascha Grunert
485ae13a58 Add ImageVolumeSource API
Adding the required Kubernetes API so that the kubelet can start using
it. This patch also adds the corresponding alpha feature gate as
outlined in KEP 4639.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Kubernetes-commit: f7ca3131e0922563a561134b4ed9eed8d2bdd2c4
2024-06-24 10:34:43 +02:00
Morlay
9ab93c0777 Remove json:",omitempty" where json:",inline" specified.
Signed-off-by: Morlay <morlay.null@gmail.com>

Kubernetes-commit: f9b69ce10847a31626c364d3d86bf361b16456b2
2024-06-28 23:16:51 +08:00
Shingo Omura
1ea671aac4 KEP-3619: API: add NodeFeatures.SupplementalGroupsPolicy in NodeStatus
KEP-3619: don't capitalize comment in K8S API

KEP-3619: fix typos and grammatical ones in K8s API

KEP-3619: rephrase NodeFeatures, NodeHandlerFeatures in K8s API

Kubernetes-commit: 5d75660dc11ff443ebab2551aed8e56a54cc218d
2024-06-22 18:43:31 +09:00
Peter Hunt
21b1828b05 api: add user namespaces field to NodeRuntimeHandlerFeatures
Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

Kubernetes-commit: 86240aaca17e0bfbdbaec78bf2604f8623c73615
2024-05-31 13:30:45 -04:00
Lan Liang
fa8c68e986 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: 73613b48c6472c71eb6cb6ff12a0d5acb1beadcc
2024-05-16 08:36:27 +00:00
Antonio Ojea
a146a0f353 make update
Kubernetes-commit: bc8bce2ef98b85d642c7e805e8c6d1fd92cbcf53
2024-05-21 11:58:12 +00:00
Patrick Ohly
fdffb523da DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.

Kubernetes-commit: bde9b64cdfbbbb185593c20fea84cdced631ffd6
2024-05-24 15:24:24 +02:00
Tim Hockin
af26305389 Use +default for now deprecated ScaleIO volume
Kubernetes-commit: a074dd6f2e3ce394b767c109701045d13a56b6e2
2024-06-19 12:18:33 -07:00
Tim Hockin
f9b8f88e7d Use +default for now deprecated AzureDisk volume
Kubernetes-commit: 0f5ab4beec4d05138ed3fff5a5b2a7e42bf75d0c
2024-06-19 11:45:22 -07:00
Tim Hockin
90902b591f Use +default for now deprecated ISCSI volume
Kubernetes-commit: 333c02cf28baa02a234b977f62a9a51f41c98572
2024-06-19 11:28:55 -07:00
Tim Hockin
64e74f9623 Use +default for now deprecated RBD volume
THis leaves us less hand-written code and a better schema.

Kubernetes-commit: 03f0110b953a171bfc985fc65a40ffe6820a6007
2024-06-19 11:15:41 -07:00
Joe Betz
c4145a9c20 Generate code
Kubernetes-commit: 7772769d19a82a26aa91181e0804ff2ccbdd843c
2024-06-24 15:58:35 -04:00
Stephen Kitt
6a88f2da38 Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: c982ce1891eacd1bff135e9010df4fc17e3dbb23
2024-05-27 11:00:27 +02:00
Stephen Kitt
233a06528f Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 55ea0a55358de787353c9c9c38280d483456475a
2024-05-27 10:55:47 +02:00
Shingo Omura
7adab2f2f6 KEP-3619: Fine-grained SupplementalGroups control (#117842)
* Add `Linux{Sandbox,Container}SecurityContext.SupplementalGroupsPolicy` and `ContainerStatus.user` in cri-api

* Add `PodSecurityContext.SupplementalGroupsPolicy`, `ContainerStatus.User` and its featuregate

* Implement DropDisabledPodFields for PodSecurityContext.SupplementalGroupsPolicy and ContainerStatus.User fields

* Implement kubelet so to wire between SecurityContext.SupplementalGroupsPolicy/ContainerStatus.User and cri-api in kubelet

* Clarify `SupplementalGroupsPolicy` is an OS depdendent field.

* Make `ContainerStatus.User` is initially attached user identity to the first process in the ContainerStatus

It is because, the process identity can be dynamic if the initially attached identity
has enough privilege calling setuid/setgid/setgroups syscalls in Linux.

* Rewording suggestion applied

* Add TODO comment for updating SupplementalGroupsPolicy default value in v1.34

* Added validations for SupplementalGroupsPolicy and ContainerUser

* No need featuregate check in validation when adding new field with no default value

* fix typo: identitiy -> identity

Kubernetes-commit: 552fd7e85084b4cbd3ae8e81ff13433e28dc8327
2024-05-30 00:39:19 +00:00
Patryk Małek
35cab326ad 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: 8dbeaa5786bab14772873cc90af70ccb9b06b4c1
2024-05-04 00:30:57 +00:00
Patrick Ohly
a457c5ed68 DRA api: ResourceHandle.DriverName is required
It was already required via validation, but not declared as such by the
OpenAPI.

Kubernetes-commit: 1a13b0aa3333d04ae67a6fcdd21c8e2a042dc0c2
2024-03-27 11:22:35 +01: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
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
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
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
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
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
Tim Allclair
db79dcf23b Generated code
Kubernetes-commit: b7f620c12b7f2dbd7907ccad1ca63811a5c5766b
2024-02-20 20:04:35 -08:00
cici37
4ceeb096c4 Auto updates
Kubernetes-commit: 5d83282823d5ee728d610befb389e3732b4503c3
2024-02-01 01:00:24 +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
Gaurav Ghildiyal
64b46766f1 Run 'make update'
Kubernetes-commit: 646fd200b8532b0df95df300a8351379315f3ac9
2024-02-23 12:23:32 -08: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
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
Antonio Ojea
60aa89a1ab make update with the new API with arrays
Kubernetes-commit: fee07ad6080ccd6e0e8241e10b1b0330f57c64be
2023-10-29 19:01:10 +00:00
Antonio Ojea
824910b3a9 make update
Change-Id: I4007d4f6dda24b5c74f602d35191556f315de222

Kubernetes-commit: 8182c4d9ec8c254d7291f7b451bfe47aadc1c691
2023-10-18 00:37:58 +00:00
carlory
6278c99b77 generated changes
Kubernetes-commit: 56ab6c5942171cd1e598fc7c25a21f5aa457f36f
2023-10-31 10:13:04 +08:00
Abu Kashem
5a34ab53bd apiserver: add generated files for flowcontrol api change
Kubernetes-commit: 730d10a8fb918e75c22d57267adf34a8fbb5cee1
2023-10-27 19:27:07 -04: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
Kensei Nakada
a46288252b feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity
Kubernetes-commit: d5d3c26337af418555fe6f62f86b9aaf38dc59d3
2023-02-26 04:25:59 +00:00
Alexander Zielenski
b5925219d4 update generated code and openapi
Kubernetes-commit: 0a6d9531f40f63543591d1515deb2ac05b4c62f3
2023-10-17 17:09:48 -07:00