113 Commits

Author SHA1 Message Date
Sunyanan Choochotkaew
59bba92717 KEP-5075: generated codes from make update
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com>
2025-07-30 09:26:52 +09:00
Sunyanan Choochotkaew
5ad969588d KEP-5075: API updates
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com>
2025-07-30 09:26:40 +09:00
yliao
34a64db2c7 extended resource backed by DRA: implementation 2025-07-29 18:55:21 +00:00
yliao
3068b60b83 extended resource backed by DRA: codegen 2025-07-29 17:17:20 +00:00
yliao
1f2fd18ac8 extended resource backed by DRA: API types.go 2025-07-29 17:17:19 +00:00
Kobayashi,Daisuke
ac81b829e4 KEP-5007 DRA Device Binding Conditions: Run make update 2025-07-29 11:34:03 +00:00
Kobayashi,Daisuke
987ad39516 KEP-5007 DRA Device Binding Conditions: API Related code Update 2025-07-29 11:32:47 +00:00
Kobayashi,Daisuke
34c3b09383 KEP-5007 DRA Device Binding Conditions: API Update 2025-07-29 11:31:48 +00:00
Patrick Ohly
b768c1d1d5 DRA API: bump storage version to v1beta2
This avoids the overhead for the more complex conversion to v1beta1 and might
make it a bit more realistic to get rid of the v1beta1 eventually.

The expected GVK must be set explicitly because when emulating 1.33,
v1beta1 is the default although the fixed storage version is v1beta2.
2025-07-24 08:33:56 +02:00
Patrick Ohly
cff91579e8 DRA API: v1 registration + tests 2025-07-24 08:30:25 +02:00
Patrick Ohly
4e592f6c14 DRA API: s/v1beta2/v1/ and generated files 2025-07-24 08:30:24 +02:00
Patrick Ohly
1f2f433f76 DRA API: verbatim copy v1beta2 -> v1 2025-07-24 08:30:24 +02:00
xiaoweim
61542e7a98 Cleanup: Remove field name from invalid field detail message 2025-07-14 18:13:00 +00:00
PatrickLaabs
1ae1964e88 chore: depr. pointer pkg replacement for pkg/apis 2025-07-07 16:19:01 +02:00
Kubernetes Prow Robot
bb639c3dc7 Merge pull request #132313 from thockin/jp_invalid_ne_type_invalid
Use "Invalid" errors rather than "TypeInvalid"
2025-06-15 04:23:03 -07:00
Tim Hockin
384240b4d9 Use "Invalid" errors rather than "TypeInvalid" 2025-06-14 17:50:38 -07:00
Patrick Ohly
10de6780cf DRA API: remove obsolete types from v1alpha3
The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the
types and most structs became obsolete in v1.32 when we introduced v1beta1 and
bumped the storage version to v1beta1.

Removing them now simplifies adding new features because new fields don't need
to be added to these obsolete types. This could have been done already in 1.33,
but wasn't to minimize disrupting on-going work.
2025-06-06 12:06:28 +02:00
Rita Zhang
5058e385b0 DRAAdminAccess: update label key
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2025-05-27 21:19:25 -07:00
Morten Torkildsen
e761be47a4 Run make update 2025-03-26 14:52:36 +00:00
Morten Torkildsen
39507d911f Add resource v1beta2 API 2025-03-26 14:41:09 +00:00
Cici Huang
ea2f888109 Auto gen 2025-03-19 22:10:48 +00:00
Cici Huang
ece1d76e80 API manual changes
Co-authored-by: Morten Torkildsen <mortent@google.com>
2025-03-19 22:10:48 +00:00
Kubernetes Prow Robot
ab3cec0701 Merge pull request #130447 from pohly/dra-device-taints
device taints and tolerations (KEP 5055)
2025-03-19 13:00:32 -07:00
Rita Zhang
0301e5a9f8 DRA: AdminAccess validate based on namespace label
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2025-03-18 22:56:54 -07:00
Patrick Ohly
99dbd85c45 DRA: generated files for device taints API 2025-03-18 20:52:54 +01:00
Patrick Ohly
797475e113 DRA: add device taints API
This adds the "DeviceTaint" top-level type to v1alpha3 and related fields to
ResourceSlice and ResourceClaim. It's complete enough bring up an API server
and generate files.
2025-03-18 20:52:54 +01:00
Dan Winship
fc4bb4fdb9 Add validation.IsValidInterfaceAddress
Split "ifaddr"-style ("192.168.1.5/24") validation out of IsValidCIDR.
Since there is currently only one field that uses this format, and it
already requires canonical form, IsValidInterfaceAddress requires
canonical form unconditionally.
2025-03-12 09:37:39 -04:00
Paco Xu
ce163947aa fix a flake of TestRoundTripTypes: for FirstAvailable[].AllocationMode 2025-03-10 14:03:55 +08:00
Tim Hockin
e54719bb66 Use randfill, do API renames 2025-03-08 15:18:00 -08:00
Kubernetes Prow Robot
9d45ea8b9d Merge pull request #128586 from mortent/DRAPrioritizedList
Prioritized Alternatives in Device Requests
2025-03-06 21:01:44 -08:00
Kubernetes Prow Robot
0556b20d3d Merge pull request #129435 from googs1025/dra/validation
chore: add more error info for validateResourceSliceSpec
2025-03-01 02:16:55 -08:00
Morten Torkildsen
e2d1fcc162 Addressed comments 2025-02-28 20:47:35 +00:00
Morten Torkildsen
a716095a8a DRA: Update validation for Prioritized Alternatives in Device Requests 2025-02-28 19:28:50 +00:00
Morten Torkildsen
68040a3173 Run make update 2025-02-28 19:28:26 +00:00
Morten Torkildsen
8f7b43b6fd DRA: Update types and defaults for Prioritized Alternatives in Device Requests 2025-02-28 19:13:48 +00:00
Kubernetes Prow Robot
803e9d6495 Merge pull request #130355 from yongruilin/validation_origin
validation: Add Origin field to field.Error for more precise error tracking
2025-02-28 00:04:23 -08:00
yongruilin
a488509197 test: Improve error comparison in resource validation tests
Replace manual error logging with cmp.Diff for more precise error comparisons, using cmpopts to ignore Origin field and support UniqueString comparison.
2025-02-27 05:20:54 +00:00
Kubernetes Prow Robot
a18b4a8d97 Merge pull request #129158 from LionelJouin/fix-128831
Fix ResourceClaim status API inconsistency
2025-02-26 20:32:30 -08:00
googs1025
f540197768 chore: add more error info for validateResourceSliceSpec 2025-02-22 08:47:58 +08:00
Kubernetes Prow Robot
9bf60d06e0 Merge pull request #129219 from danwinship/networkdevicedata-validation
Require canonicalization of NetworkDeviceData IPs
2025-02-20 16:14:26 -08:00
Dan Winship
2636aa35e3 Require canonicalization of NetworkDeviceData IPs
There's no reason to allow non-standard or non-canonical IP values in
new APIs.
2025-02-20 12:49:03 -05:00
Kubernetes Prow Robot
481cc1a392 Merge pull request #129560 from bart0sh/PR168-DRA-fix-All-allocation-mode
DRA: fix allocation mode `All`
2025-02-05 00:38:16 -08:00
Ed Bartosh
829fa63b5b DRA: fix allocation mode All
`All` allocation mode should mean 'at least one' for DRA.
Allocation should fail if `All` devices requested and none found.
2025-01-30 16:34:25 +02:00
Patrick Ohly
2cc3dbf225 DRA CEL: add missing size estimator
Not implementing a size estimator had the effect that strings retrieved from
the attributes were treated as "unknown size", leading to wildly overestimating
the cost and validation errors even for even simple expressions like this:

    device.attributes["qat.intel.com"].services.matches("[^a]?sym")

Maximum number of elements in maps and the maximum length of the driver name
string were also ignored resp. missing. Pre-defined types like
apiservercel.StringType must be avoided because they are defined as having
a zero maximum size.
2025-01-16 16:36:43 +01:00
Patrick Ohly
1cee3682da DRA API: bump maximum size of ReservedFor to 256
The original limit of 32 seemed sufficient for a single GPU on a node. But for
shared non-local resources it is too low. For example, a ResourceClaim might be
used to allocate an interconnect channel that connects all pods of a workload
running on several different nodes, in which case the number of pods can be
considerably larger.

256 is high enough for currently planned systems. If we need something even
higher in the future, an alternative approach might be needed to avoid
scalability problems.

Normally, increasing such a limit would have to be done incrementally over two
releases. In this case we decided on
Slack (https://kubernetes.slack.com/archives/CJUQN3E4T/p1734593174791519) to
make an exception and apply this change to current master for 1.33 and backport
it to the next 1.32.x patch release for production usage.

This breaks downgrades to a 1.32 release without this change if there are
ResourceClaims with a number of consumers > 32 in ReservedFor. In practice,
this breakage is very unlikely because there are no workloads yet which need so
many consumers and such downgrades to a previous patch release are also
unlikely. Downgrades to 1.31 already weren't supported when using DRA v1beta1.
2025-01-09 14:26:01 +01:00
Lionel Jouin
5f4d646ea3 Add Device status const comments
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-12-29 12:29:58 +01:00
Lionel Jouin
1d13ff2a05 make update
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-12-14 19:00:06 +01:00
Lionel Jouin
11d68ecc4e ResourceClaim.Status.Devices.Data as pointer
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-12-14 18:59:59 +01:00
Lionel Jouin
ca5f1deed4 Fix ResourceClaim status API inconsistency
* Add constant for limits
* Fix comments in API

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-12-13 14:44:09 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00