Commit Graph

812 Commits

Author SHA1 Message Date
Sergey Kanzhelev
4fc209f12b generated files 2024-11-03 06:28:45 +00:00
Patrick Ohly
4419568259 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.
2024-10-29 10:22:31 +01:00
Patrick Ohly
9a7e4ccab2 DRA admin access: add feature gate
The new DRAAdminAccess feature gate has the following effects:
- If disabled in the apiserver, the spec.devices.requests[*].adminAccess
  field gets cleared. Same in the status. In both cases the scenario
  that it was already set and a claim or claim template get updated
  is special: in those cases, the field is not cleared.

  Also, allocating a claim with admin access is allowed regardless of the
  feature gate and the field is not cleared. In practice, the scheduler
  will not do that.
- If disabled in the resource claim controller, creating ResourceClaims
  with the field set gets rejected. This prevents running workloads
  which depend on admin access.
- If disabled in the scheduler, claims with admin access don't get
  allocated. The effect is the same.

The alternative would have been to ignore the fields in claim controller and
scheduler. This is bad because a monitoring workload then runs, blocking
resources that probably were meant for production workloads.
2024-10-29 09:50:11 +01:00
Patrick Ohly
f3fef01e79 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.
2024-10-29 09:50:07 +01:00
Kubernetes Prow Robot
86b99869cb Merge pull request #128299 from SergeyKanzhelev/updateDHS
Update Device Health fields description for KEP-4680
2024-10-28 22:19:01 +00:00
Kubernetes Prow Robot
3690cb7f9a Merge pull request #128101 from pohly/dra-api-cel-cost-limit
DRA API: implement CEL cost limit
2024-10-26 20:18:52 +01:00
Sergey Kanzhelev
aed81e5d47 regenerate files 2024-10-26 07:11:06 +00:00
Patrick Ohly
f548fc2264 DRA API: implement CEL cost limit
The main purpose is to protect against denial-of-service attacks.  Scheduling
time depends a lot on unpredictable factors and expected scheduling time also
varies, so no attempt is made to limit the overall time spent on evaluating CEL
expressions per claim.
2024-10-23 21:24:45 +02:00
Kubernetes Prow Robot
0e6961e898 Merge pull request #126955 from tallclair/cleanup
Remove corev1.Binding deprecation message
2024-10-23 02:21:19 +01:00
Kubernetes Prow Robot
b1b4e5d397 Merge pull request #128003 from pohly/dra-classic-dra-removal
DRA: remove "classic DRA"
2024-10-18 00:55:17 +01:00
Kubernetes Prow Robot
51f76febd7 Merge pull request #127402 from mimowo/managed-by-beta-update
Graduate JobManagedBy to Beta in 1.32
2024-10-17 19:27:14 +01:00
Kubernetes Prow Robot
c5a85abecb Merge pull request #122867 from oilbeater/patch-1
fix broken links
2024-10-17 19:27:06 +01:00
Kubernetes Prow Robot
f5b92902a3 Merge pull request #124434 from tu1h/fix-compute-resources-link
API docs: point outdate link to current link
2024-10-17 17:17:03 +01:00
Michal Wozniak
70a8ceb6f0 Graduate JobManagedBy to Beta in 1.32
# Conflicts:
#	pkg/features/kube_features.go
2024-10-17 09:01:54 +02:00
Patrick Ohly
f84eb5ecf8 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.
2024-10-16 23:09:50 +02:00
Eric Blake
fe5b74b1f8 docs: typo fix in VolumeAttachments
Fix typo and grammar in comments that get reflected through to the
generated documentation, regarding VolumeAttachments' use of
PersistentVolumes and PersistentVolumeClaims.

Signed-off-by: Eric Blake <eblake@redhat.com>
2024-09-30 08:37:10 -05:00
HirazawaUi
49058ee799 remove useless comments 2024-09-20 22:25:03 +08:00
Robert Cronin
67fc3798b6 Update TrafficDistribution comment to reflect graduated beta status in v1.31 2024-09-04 22:00:57 +10:00
Tim Allclair
adf6baa857 Remove corev1.Binding deprecation message 2024-08-27 16:52:28 -07:00
Jefftree
8a4ac01182 Update codegen for OpenAPI escape fix 2024-08-27 15:40:54 +00:00
Tim Hockin
1e8002cd03 fix v1a3 ResourceSliceList metadata field name
This field was incorrectly named "listMeta" and was missed in review.
2024-08-16 16:46:04 -07:00
Kubernetes Prow Robot
aa2938f15e Merge pull request #126482 from LionelJouin/fix-dra-comment
DRA: Fix ResourceClaimTemplateSpec comment
2024-08-14 00:21:07 -07:00
Kubernetes Prow Robot
6a478b4306 Merge pull request #126545 from yangjunmyfm192085/updatepersistentVolumeClaimRetentionPolicy
Update incorrect description of persistentVolumeClaimRetentionPolicy
2024-08-13 22:11:11 -07:00
Kubernetes Prow Robot
bb7411120a Merge pull request #126287 from devppratik/121793-update-node-monitor-grace-period
node: Update Node Monitor Grace Period default duration to 50s
2024-08-13 21:03:16 -07:00
杨军10092085
56bbae4807 Updated incorrect description of persistentVolumeClaimRetentionPolicy 2024-08-05 21:30:25 +08:00
Lionel Jouin
4532d90068 DRA: Fix ResourceClaimTemplateSpec comment
ObjectMeta for the ResourceClaimTemplateSpec are copied into
ResourceClaim not PVC.

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-07-31 17:53:47 +02:00
devppratik
f8bf6b97b8 Update Node Monitor Grace Period default duration to 50s
Update description

Improve flag comment

Update Test case value to be 50s by default

Update Description

Run make update

Minor description fix
2024-07-24 22:54:44 +05:30
Jefftree
919e7abe0f update codegen and openapi 2024-07-24 14:41:13 +00:00
Jefftree
42678f1553 regen clients 2024-07-24 14:38:12 +00:00
Jefftree
3999b98c88 Coordinated Leader Election Alpha API 2024-07-24 14:38:10 +00:00
Sergey Kanzhelev
2253b53b58 generated files 2024-07-24 00:29:35 +00:00
Kubernetes Prow Robot
f93fe412c7 Merge pull request #126281 from saschagrunert/oci-volume-docs
[KEP-4639] Mention that `fsGroupChangePolicy` has no effect
2024-07-23 14:40:14 -07:00
Kubernetes Prow Robot
c2fdeca4ab Merge pull request #126145 from carlory/kep-3751-api
[KEP-3751] Promote VolumeAttributesClass to beta
2024-07-23 13:31:05 -07:00
Kubernetes Prow Robot
107f621462 Merge pull request #126108 from gnufied/changes-volume-recovery
Reduce state changes when expansion fails and mark certain failures as infeasible
2024-07-23 13:30:56 -07:00
Kubernetes Prow Robot
fbdfb9d8d9 Merge pull request #126031 from harche/kubelet_cgroupv1_arg
KEP-4569: Kubelet option to disable cgroup v1 support
2024-07-23 09:21:11 -07:00
Kubernetes Prow Robot
1854839ff0 Merge pull request #126067 from tenzen-y/implement-job-success-policy-e2e
Graduate the JobSuccessPolicy to Beta
2024-07-23 06:14:23 -07:00
Sascha Grunert
479a7c34fe ImageVolumeSource: mention that fsGroupChangePolicy has no effect
A small documentation follow-up based on the review:
https://github.com/kubernetes/kubernetes/pull/125660#discussion_r1686859866

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-23 10:15:18 +02:00
carlory
0260c7d023 Promote VolumeAttributesClass to beta 2024-07-23 13:58:14 +08:00
Yuki Iwai
551931c6a8 Graduate the JobSuccessPolicy to beta
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-23 09:29:06 +09:00
Kubernetes Prow Robot
6e52e705d0 Merge pull request #125374 from pwschuurman/kep-3335-stable
Promote StatefulSetStartOrdinal to stable in 1.31
2024-07-22 14:25:49 -07:00
Patrick Ohly
91d7882e86 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.
2024-07-22 18:09:34 +02:00
tu1h
73e7dc65e1 API docs: point outdate link to current link
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-07-22 11:53:13 +08:00
Patrick Ohly
8a629b9f15 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.
2024-07-21 17:28:14 +02:00
Patrick Ohly
de5742ae83 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.
2024-07-21 17:28:14 +02:00
Patrick Ohly
b51d68bb87 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.
2024-07-21 17:28:13 +02:00
Kubernetes Prow Robot
8f265b6305 Merge pull request #126136 from cici37/removeFG
Remove feature gate CustomResourceValidationExpressions
2024-07-20 00:08:52 -07:00
David Eads
f5e5bef2e0 generate 2024-07-19 14:35:37 -04:00
Kubernetes Prow Robot
77e12aeca9 Merge pull request #126207 from thockin/ingress-backend-port-atomic
Make ServiceBackendPort an atomic struct
2024-07-18 19:24:26 -07:00
Kubernetes Prow Robot
25935965c5 Merge pull request #125782 from aborrero/master
procMount: fix default value documentation
2024-07-18 19:24:11 -07:00
Tim Hockin
7313990f61 Make ServiceBackendPort an atomic struct
This allows different actors to force ownership of it without having to
explicitly unset the other field.
2024-07-18 13:20:33 -07:00