Commit Graph

159 Commits

Author SHA1 Message Date
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
AxeZhan
5cf64182aa codegen
Kubernetes-commit: 5c0618b848d9e0d7fbcb2d7a5c41e85735c173fd
2023-10-16 19:50:28 +08: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
Antonio Ojea
55f8f3ffa2 make update
Change-Id: I61be34cff942264acb2f45fe7e1c8538f807cb4e

Kubernetes-commit: e9957d79aae244d3a956d9f7634ad45a9a3364b4
2023-10-10 11:01:56 +00:00
SataQiu
def2075eac apf: remove v1alpha1 API
Kubernetes-commit: 2825519da2c176ac81d2ec6b1500ef8e68377db1
2023-08-30 17:20:29 +08: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
Patrick Ohly
86ae84acb9 generated files
Kubernetes-commit: c1eb18c00caaffa127ef554f3c0f693848a28d4a
2023-07-10 17:51:23 +02:00
Aohan Yang
4a487f61f6 Generated code for IP mode field
Kubernetes-commit: 29a6705dabc875b0f19b73016df16c50744ce99b
2023-08-14 12:32:25 +08: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
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
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
Alexander Zielenski
d7acd85d1b update codegen
Kubernetes-commit: d6479587445a5a6fa736ee7fb3012a29f4e6e5e7
2023-07-19 16:21:22 -07:00
Roman Bednar
dcfedbe450 make update
Kubernetes-commit: 294f5c9a42fead4a4cc75340a6b9171c9c657b3e
2023-07-21 17:16:05 +02:00
Alexander Zielenski
84505f7088 update-codegen
Kubernetes-commit: 9a595209bd28d6456f5f8cf5effe74944daf2105
2023-07-10 13:06:26 -07:00
kannon92
70917217ee add podReplacementPolicy and terminating field to job api
Kubernetes-commit: ce929520376417a9358067ad8576b10e734cb7a9
2023-07-18 17:25:15 +00:00
Michal Wozniak
ad08d15b30 Extend the Job API for BackoffLimitPerIndex
Kubernetes-commit: fcbfdc1710676ffd77ba4bbda384240293339db4
2023-07-13 09:36:07 +02:00
Hemant Kumar
fe95890e7f Update generated data
Kubernetes-commit: 6a780f57ce5e64002d96200be59dea881aad977c
2023-07-10 12:19:57 -04:00
Aohan Yang
950fa167a0 Generated code for IP mode field
Kubernetes-commit: 7c6e399b228199bed94219dcaf36cd3cb5eb68e5
2023-07-17 16:00:57 +08:00
Shiming Zhang
8c4503becd Regenerate
Kubernetes-commit: 3e2a1a7b9ce860dbe39a03014707c9bcdd333960
2023-07-12 15:02:44 +08: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
Patrick Ohly
4ddde4e3b5 dra: generated files
Kubernetes-commit: 0fc62d5ded07b01c6ffe9110f5c4991c34efb205
2023-04-14 09:51:07 +02:00
Gunju Kim
d63727d2cb Sidecar: Generated code
Kubernetes-commit: c187b38117379777b77656526a4f12da311c8341
2023-05-10 01:39:38 +09:00
Richa Banker
61c0de83db Add servedVersions info in StorageVersion API
Kubernetes-commit: 1c48b7ec144785b4b2493a01d82e40d6d34ce578
2023-06-01 18:07:56 -07:00
Ricardo Katz
224050a5b5 Generated files for NetworkPolicyStatus removal
Kubernetes-commit: ec997d5433afc09e79376e35936a027dc2ba8713
2023-02-16 14:31:49 -03: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
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
vinay kulkarni
2932f6b3c1 Restructure naming of resource resize restart policy - generated files
Kubernetes-commit: c5130fb0d6337436c405426468de47ae96717243
2023-02-28 08:13:36 +00:00
Antonio Ojea
568393e257 make update
Change-Id: I19e12ca05d977dca63043cb07ecf8a90e0e525c5

Kubernetes-commit: ba42ed9a49345f8a182829e72c7013ea3ff0d224
2023-03-12 13:50:02 +00:00