Commit Graph

202 Commits

Author SHA1 Message Date
ndixita
77d9809f89 Generated files and compatability data from API changes
Kubernetes-commit: 85488b5f10bc6128dab69e4bdd94cec2c005c7f5
2024-10-16 20:34:52 +00:00
Jefftree
ef8b7aa53e generated
Kubernetes-commit: e86c38b249bb614c13210f1fe34fb92247641ef9
2024-10-04 15:53:28 +00:00
Lionel Jouin
fba42f0ac4 [KEP-4817] make update
Kubernetes-commit: d84c8d2a647aee3a7b0ac499a55e5f630c71d2a9
2024-11-07 22:19:09 +01:00
Lionel Jouin
bfbe175263 [KEP-4817] make update
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>

Kubernetes-commit: d28b50e0a04a4c5bbf494a423ad7851f0393467c
2024-11-07 10:36:09 +01:00
Abu Kashem
95fc3d7e88 api: run codegen
run 'make update' to code gen for changes in meta/v1 DeleteOptions

Kubernetes-commit: aff05b0bcad2b62730e101067a04ffc75a96a41b
2024-09-23 13:29:15 -04:00
Patrick Ohly
4e05c623ae DRA API: rename DeviceCapacity.Quantity to DeviceCapacity.Value
Based on review
feedback (https://github.com/kubernetes/kubernetes/pull/127511#discussion_r1823521172).

Kubernetes-commit: 30f52826560129839922e1756730b02f184f0ef9
2024-10-31 21:30:28 +01:00
Patrick Ohly
f65974c297 DRA API: use DeviceCapacity struct instead of plain Quantity
This enables a future extension where capacity of a single device gets consumed
by different claims. The semantic without any additional fields is the same as
before: a capacity cannot be split up and is only an attribute of a device.

Because its semantically the same as before, two-way conversion to v1alpha3 is
possible.

Kubernetes-commit: 81fd64256c9cfca47385997e06a694bf98bfb799
2024-09-26 16:56:48 +02:00
Patrick Ohly
98e4506ad9 DRA API: generated files
Kubernetes-commit: 0ee52b23cd56aa4a8e33cc366c2d150286ad041e
2024-09-26 12:07:39 +02:00
Joe Betz
5295d256f6 generate code
Kubernetes-commit: fe3a7f529153db690ac8588ee9c31bdfda0ed5f8
2024-10-25 13:46:37 -04:00
Jan Safranek
f0b2234e53 Regenerated API
Kubernetes-commit: 3867cb40add0cfc41157e9fd11f2377cda7d3770
2024-10-03 11:13:07 +02:00
Patrick Ohly
d86bbaef58 DRA: treat AdminAccess as a new feature gated field
Using the "normal" logic for a feature gated field simplifies the
implementation of the feature gate.

There is one (entirely theoretic!) problem with updating from 1.31: if a claim
was allocated in 1.31 with admin access, the status field was not set because
it didn't exist yet. If a driver now follows the current definition of "unset =
off", then it will not grant admin access even though it should. This is
theoretic because drivers are starting to support admin access with 1.32, so
there shouldn't be any claim where this problem could occur.

Kubernetes-commit: 4419568259590c35f1dab69aabec3d740944a51d
2024-10-29 09:42:08 +01:00
Patrick Ohly
d32193115c DRA API: AdminAccess in DeviceRequestAllocationResult
Drivers need to know that because admin access may also grant additional
permissions. The allocator needs to ignore such results when determining which
devices are considered as allocated.

In both cases it is conceptually cleaner to not rely on the content of the
ClaimSpec.

Kubernetes-commit: f3fef01e79a75ebc4c327afb7d05d6fd350e08fa
2024-09-04 08:03:22 +02:00
Patrick Ohly
d366fa7737 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.

Kubernetes-commit: f84eb5ecf894fa0fc4e0d05da52ef51d4cd723d9
2024-10-11 16:08:54 +02:00
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