Commit Graph

46999 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
15894cfc85
Merge pull request #116550 from alculquicondor/fix-bind-uid
Preserve UID and ResourceVersion in BindingREST
2023-03-20 08:49:20 -07:00
Aldo Culquicondor
62889f416c
Preserve UID/ResourceVersion in the BindingREST endpoint
Change-Id: If4023da10c455963a320fdb9fc2a73c099bea3db
2023-03-20 10:29:25 -04:00
Kubernetes Prow Robot
fe91bc257b
Merge pull request #116554 from atiratree/eviction-resource-version-fix
API-initiated eviction: handle deleteOptions correctly
2023-03-17 16:59:15 -07:00
Kubernetes Prow Robot
c14e0983fb
Merge pull request #116684 from vinaykul/restart-free-pod-vertical-scaling-fixes
Add missing unit test for resource resize policy defaulting
2023-03-17 15:13:17 -07:00
Filip Křepinský
51c0e2374f API-initiated eviction: handle deleteOptions correctly
when adding a DisruptionTarget condition into a pod that will be deleted

- handle ResourceVersion and Preconditions correctly
- handle DryRun option correctly

Co-authored-by: Jordan Liggitt jordan@liggitt.net
2023-03-17 22:18:07 +01:00
Paco Xu
5134520a3b add lock in volume manager reconciler to avoid data race
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-17 21:29:10 +08:00
Paco Xu
7afcfe1826 kubelet: use filepath.Clean before init, validate it in setupDataDirs 2023-03-17 15:45:39 +08:00
vinay kulkarni
0ee5d43d74 Add unit tests covering ephemeral storage resource combinations 2023-03-17 05:43:30 +00:00
vinay kulkarni
07c567a848 Add missing unit test for resource resize policy defaulting 2023-03-17 05:43:30 +00:00
Michal Wozniak
3d68f362c3 Give terminal phase correctly to all pods that will not be restarted 2023-03-16 21:25:29 +01:00
Clayton Coleman
58d1dc669f kubelet: Remove status manager channel
The status manager channel forces all container status to be
processed, even if multiple updates are generated in succession.
Instead of queueing the updates, just remember which ones changed
and process them in a batch. This should reduce QPS load from
the Kubelet for status, reduce latency of status propagation to
the API in general, and is easier to reason about.

This also prevents status from being lost when the channel is
full - all updates sent by SetPodStatus are guaranteed to be
recorded. Changing to remove the channel allows us to set a
marker flag when the pod worker state machine completes that
avoids the status manager having to call into the pod worker
directly.
2023-03-16 21:22:43 +01:00
Kubernetes Prow Robot
a34e37c996
Merge pull request #113218 from ahmedtd/kep-3257
Add certificates.k8s.io/v1alpha1 ClusterTrustBundle
2023-03-16 11:13:20 -07:00
Sathyanarayanan Saravanamuthu
c84c8add70
Decouple batch/job back-off logic from workqueues (#114768)
* batch/job: decouple backoff from workqueue

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

* Resolving review comments

* Resolving more review comments

* Resolving review comments

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

* Computing finish time to now when FinishedAt is unix epoch

* Addressing review comments

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

---------

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2023-03-16 10:15:21 -07:00
Taahir Ahmed
2e4b637bf8 ClusterTrustBundles: make update 2023-03-15 20:10:59 -07:00
Taahir Ahmed
6a75e7c40c ClusterTrustBundles: Define types
This commit is the main API piece of KEP-3257 (ClusterTrustBundles).

This commit:

* Adds the certificates.k8s.io/v1alpha1 API group
* Adds the ClusterTrustBundle type.
* Registers the new type in kube-apiserver.
* Implements the type-specfic validation specified for
  ClusterTrustBundles:
  - spec.pemTrustAnchors must always be non-empty.
  - spec.signerName must be either empty or a valid signer name.
  - Changing spec.signerName is disallowed.
* Implements the "attest" admission check to restrict actions on
  ClusterTrustBundles that include a signer name.

Because it wasn't specified in the KEP, I chose to make attempts to
update the signer name be validation errors, rather than silently
ignored.

I have tested this out by launching these changes in kind and
manipulating ClusterTrustBundle objects in the resulting cluster using
kubectl.
2023-03-15 20:10:18 -07:00
Kubernetes Prow Robot
a4302915c9
Merge pull request #116305 from danwinship/cloud-node-ips
KEP-3705 cloud dual-stack --node-ip
2023-03-15 18:27:14 -07:00
Max Smythe
e5fd204c33
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>
2023-03-15 17:23:15 -07:00
Dan Winship
068ee321bc Add CloudDualStackNodeIPs feature gate(s)
Add CloudDualStackNodeIPs feature gates for kubelet and
cloud-controller-manager and use as appropriate.
2023-03-15 17:15:51 -04:00
Kubernetes Prow Robot
39c01ded6a
Merge pull request #116612 from robscott/topology-annotation-validation
Adding validation for Topology annotations
2023-03-15 13:47:05 -07:00
Kubernetes Prow Robot
51471fa350
Merge pull request #116326 from sanposhiho/sanposhiho/hpa-metrics-container-baed
HPA: expose the metrics "metric_computation_duration_seconds" and "metric_computation_total" from HPA controller
2023-03-15 12:20:18 -07:00
Dan Winship
7605163620 Split up PreferNodeIP into legacy and non-legacy versions
Though not obvious as currently written, PreferNodeIP() has different
semantics with legacy and external cloud providers, since one kind of
node IP value never gets passed in the external cloud provider case.
Split it into two functions to make this clearer (and to prepare for
adding new external-cloud-only semantics, and to make it clearer that
some of the code can be deleted when legacy cloud providers go away).
2023-03-15 14:50:17 -04:00
Rob Scott
9e571c0424
Adding validation for topology annotations
Change-Id: I50b3b05b859c69e98daca7c8fca0d3a76024eb80
2023-03-15 18:37:02 +00:00
Kubernetes Prow Robot
d3a7b5920f
Merge pull request #116046 from sanposhiho/sanposhiho/beta-graduation-container-metric
feature(hpa): beta graduation for the container resource metrics
2023-03-15 11:10:15 -07:00
Maciej Borsz
0ba519fee0 Add missing trace dependency to kubemark 2023-03-15 13:01:42 +00:00
Kubernetes Prow Robot
8decaf3ae7
Merge pull request #115447 from kidddddddddddddddddddddd/ingress
[ingress] Create with ingressClass annotation and IngressClassName both set
2023-03-15 02:02:16 -07:00
Kubernetes Prow Robot
37937bb227
Merge pull request #110566 from claudiubelu/unittests-5
Adds Pod DNS Policies support for Windows pods
2023-03-14 23:54:14 -07:00
Igor Velichkovich
5e5b3029f3
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
2023-03-14 20:28:26 -07:00
Kubernetes Prow Robot
c072cae4d0
Merge pull request #108838 from nckturner/webhook-framework
Webhook framework for cloud controller manager
2023-03-14 20:28:14 -07:00
Kubernetes Prow Robot
74123a7341
Merge pull request #116621 from moshe010/dra-lock
kubelet dra: add lock to addCDIDevices
2023-03-14 19:27:28 -07:00
Kubernetes Prow Robot
815b1bf0d8
Merge pull request #116558 from klueska/update-dra-kubeletplugin-v1alpha2
Update kubeletplugin API for DRA to v1alpha2
2023-03-14 19:27:06 -07:00
Kubernetes Prow Robot
9ddf1a02bd
Merge pull request #116504 from vinaykul/restart-free-pod-vertical-scaling-kubeletonly-fix
Fix null pointer access in doPodResizeAction for kubeletonly mode
2023-03-14 19:26:59 -07:00
Kubernetes Prow Robot
ae36991498
Merge pull request #116332 from klueska/extend-resourceclaimstatus
Update resource.AllocationResult with a slice of ResourceHandlers
2023-03-14 19:26:50 -07:00
Kubernetes Prow Robot
9053b5dc2c
Merge pull request #116119 from vinaykul/restart-free-pod-vertical-scaling-fixes
Restructure resize policy naming and set default resize policy values
2023-03-14 19:26:42 -07:00
Lior Lieberman
812d55d230
Updated: Redefine AppProtocol field description and add new standard values (#115433)
* redefine app protocol and add standard values

* change k8s.io/http2 to k8s.io/h2c

* address feedback

* Update staging/src/k8s.io/api/discovery/v1/types.go

Co-authored-by: Rob Scott <rob.scott87@gmail.com>

* remove kubernetes.io/tcp and change wording

---------

Co-authored-by: Rob Scott <rob.scott87@gmail.com>
2023-03-14 19:26:33 -07:00
Kubernetes Prow Robot
f44d561c1f
Merge pull request #115075 from aojea/ipaddress
IPAddress allocator
2023-03-14 19:26:13 -07:00
kidddddddddddddddddddddd
ac626f8abc remove test in strategy_test 2023-03-15 09:47:10 +08:00
Kubernetes Prow Robot
f3aebc85b9
Merge pull request #114930 from kannon92/add-new-labels
Add batch.kubernetes.io to labels created in the Job controller.
2023-03-14 17:44:13 -07:00
Kubernetes Prow Robot
9c1d73bfd6
Merge pull request #116581 from humblec/csiNodeExpand
Update NodeExpandSecretRef comment for beta
2023-03-14 16:34:56 -07:00
Kubernetes Prow Robot
f315a4669a
Merge pull request #116576 from pohly/dra-core-validation
api: extend validation of dynamic resource allocation fields in PodSpec
2023-03-14 16:34:48 -07:00
Kubernetes Prow Robot
f7bcff44cd
Merge pull request #116425 from jsafrane/flip-selinux
Flip SELinuxMountReadWriteOncePod to Beta
2023-03-14 16:34:41 -07:00
Kubernetes Prow Robot
1586138519
Merge pull request #115750 from saschagrunert/otel-beta
Graduate `KubeletTracing` feature to beta
2023-03-14 16:34:33 -07:00
Nick Turner
86f4136003 Webhook framework for cloud controller manager
Provides framework for CCMs to host webhooks.
2023-03-14 23:28:05 +00:00
Kevin Klues
579295e727 Update kubeletplugin API for DynamicResourceAllocation to v1alpha2
This PR makes the NodePrepareResources() and NodeUnprepareResource()
calls of the kubeletplugin API for DynamicResourceAllocation
symmetrical. It wasn't clear how one would use the set of CDIDevices
passed back in the NodeUnprepareResource() of the v1alpha1 API, and the
new API now passes back the full ResourceHandle that was originally
passed to the Prepare() call. Passing the ResourceHandle is strictly
more informative and a plugin could always (re)derive the set of
CDIDevice from it.

This is a breaking change, but this release is scheduled to break
multiple APIs for DynamicResourceAllocation, so it makes sense to do
this now instead of later.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 23:09:44 +00:00
Antonio Ojea
ba42ed9a49 make update
Change-Id: I19e12ca05d977dca63043cb07ecf8a90e0e525c5
2023-03-14 22:58:12 +00:00
Antonio Ojea
756f1bfe99 add repair loop
Change-Id: I63464bdd5db706ddf7dc5d828b8d03ad532d7981
2023-03-14 22:58:11 +00:00
Antonio Ojea
b2c8190ee7 allow to set the service reference on the allocator 2023-03-14 22:58:11 +00:00
Antonio Ojea
e6f197a991 plumb new ipallocators in the apiserver
plumb the new allocators from the control-plane instance to the
registry_core

Change-Id: I240cc91942260f725492597f1b599f7480560b1e
2023-03-14 22:58:11 +00:00
Antonio Ojea
b022475448 clusterip allocator based on IPAddress API
add a new ClusterIP allocator that uses the new IPAddress API resource
and an informer as the backend, instead a bitmap snapshotted on etcd.

Change-Id: Ia891a2900acd2682d4d169abab65cdd9270a8445
2023-03-14 22:58:11 +00:00
Antonio Ojea
aa18a0cd3f enable IPAddress on storage
Change-Id: Iaeac050223bb7db6acba601aa9b7254c74f2b5d2
2023-03-14 22:58:11 +00:00
Antonio Ojea
a2dfbd6117 Add IPAddress API to the REST registry
ipaddress registry storage

don't generate names for ipaddress
2023-03-14 22:58:11 +00:00