Commit Graph

47021 Commits

Author SHA1 Message Date
Harshal Patil
1972dd1005 Do not log entire pod struct while attaching the volume
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2023-04-05 20:24:12 -04:00
Michal Wozniak
b5dd5f1f3a Investigate and fix the handling of Succeeded pods in DaemonSet 2023-04-04 19:21:15 +02:00
Kubernetes Prow Robot
0c62b122c0
Merge pull request #116857 from vinaykul/restart-free-pod-vertical-scaling-fixes
Call function that validates resize policy for in-place pod resize feature
2023-03-24 10:42:21 -07:00
Paco Xu
b83600de01 fix nil pointer dereference panic for deprecated metrics 2023-03-24 18:50:43 +08:00
Lior Lieberman
6843c52060 remove kubernetes.io/grpc standard protocol 2023-03-22 18:33:49 +00:00
vinay kulkarni
0e9dd5c51d Call function that validates in-place vpa resize policy 2023-03-22 16:19:19 +00:00
Kubernetes Prow Robot
3cf9f66e90
Merge pull request #116743 from thockin/docs-clarify-publish-not-ready-endpoints
Clarify EPSlice docs wrt the Ready conditions
2023-03-21 23:14:35 -07:00
Kubernetes Prow Robot
c7cc7886e2
Merge pull request #116702 from vinaykul/restart-free-pod-vertical-scaling-podmutation-fix
Fix pod object update that may cause data race
2023-03-21 19:26:36 -07:00
Kubernetes Prow Robot
9c6414cdfe
Merge pull request #116792 from pacoxu/fix-safe-sysctl-windows
safe-sysctl: skip checking for windows
2023-03-21 17:39:59 -07:00
vinay kulkarni
f41702b8d2 Return updatedPod if resize upon successful checkpointing of allocated resources 2023-03-22 00:24:00 +00:00
Paco Xu
e154b73535 safe-sysctl: skip checking for windows 2023-03-22 07:40:29 +08:00
Kubernetes Prow Robot
b2b9395c51
Merge pull request #116800 from claudiubelu/windows-remove-dns-check
kubelet: Read DNS Config options from file for Windows
2023-03-21 16:36:00 -07:00
Claudiu Belu
c68bc27f73 kubelet: Read DNS Config options from file for Windows
A previous commit added the capability to read the DNS configuration options
from a Windows host, while removing the capability to read from a resolv.conf-like
file.

This commit addresses this issue: if the given ``--resolv-conf`` option is not set to
``Host``, it will consider it as a file, preserving the previous behavior.
2023-03-21 22:21:57 +00:00
Kubernetes Prow Robot
94daf7f4b2
Merge pull request #116806 from sourcelliu/improvemap
Improve the performance of map usage
2023-03-21 11:30:24 -07:00
Kubernetes Prow Robot
956fa9b9ce
Merge pull request #116785 from enj/enj/i/clean_front_proxy_headers
Clear front proxy headers after authentication is complete
2023-03-21 11:30:11 -07:00
Monis Khan
e9866d2794
Clear front proxy headers after authentication is complete
This matches the logic we have for the Authorization header as well
as the impersonation headers.

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-21 10:51:22 -04:00
mantuliu
0567c93b2a Improve the performance of map usage
Signed-off-by: mantuliu <240951888@qq.com>
2023-03-21 20:37:53 +08:00
Jiahui Feng
33c3fe3f74 differentiate kinds of expressions. 2023-03-20 12:13:21 -07:00
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
Tim Hockin
78530ec0a8
Clarify EPSlice docs wrt the Ready conditions
`publishNotReadyAddresses` is an explicit override, so this makes it
clear that is OK.
2023-03-19 09:28:58 -07:00
vinay kulkarni
d753893260 Do not modify original pod object when processing pod resource resize 2023-03-18 17:57:25 +00: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
vinay kulkarni
358474b71d Explicitly return from checkpoint update failures. SyncPod will retry 2023-03-17 18:00:04 +00: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
vinay kulkarni
f66e8848ee Fix pod object update that may cause data race 2023-03-17 08:50:52 +00: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