Commit Graph

127016 Commits

Author SHA1 Message Date
Tim Allclair
479b300227 Fix unit tests 2024-11-09 14:29:02 -08:00
Tim Allclair
7378b5e690 Graduate InPlacePodVerticalScaling to Beta 2024-11-09 14:29:02 -08:00
Kubernetes Prow Robot
8fe10dc378
Merge pull request #128691 from sanposhiho/flaky-candidate
fix: flaky TestPrepareCandidate
2024-11-09 19:38:44 +00:00
Kubernetes Prow Robot
1b08de5f7f
Merge pull request #128722 from dims/possible-fix-for-alpha-feature-breaking-tests
Fix for alpha CI jobs failing with AllowUnsafeMalformedObjectDeletion switched on
2024-11-09 16:28:43 +00:00
Davanum Srinivas
9c6126e29c
Possible fix for alpha CI jobs failing with AllowUnsafeMalformedObjectDeletion switched on
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-11-09 08:58:03 -05:00
Kubernetes Prow Robot
feb3f92bc4
Merge pull request #128712 from kannon92/fix-stream-test-failures
fix PodLogsQuerySplitStream if feature is enabled and using defaults
2024-11-09 06:24:44 +00:00
Kevin Hannon
3d08c10c8a fix PodLogsQuerySplitStream if feature is enabled and using defaults 2024-11-08 22:32:30 -05:00
Kensei Nakada
00f7b95b7b fix: flaky TestPrepareCandidate 2024-11-09 12:07:16 +09:00
lauralorenz
7fe41da522
KEP-4603: Node specific kubelet config for maximum backoff down to 1 second (#128374)
* Add feature gate, API, and conflict validation tests for enablecrashloopbackoffmax

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Handle when current base is longer than node max

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Update pkg/features/kube_features.go

Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>

* Fix indentation

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Follow convention for success test

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Normalize casing, and change field to Duration

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Fix json name and some other casing errors

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Another one I missed before

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Don't clobber global max function

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Change to flat value in defaults.go

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Streamline validation and defaults

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Fix typecheck

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Lint

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Tighten up validation for subsecond values

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Rename field from MaxBackOffPeriod to MaxContainerRestartPeriod

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* A few missed references to renames

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Only compare flags in flags test

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Don't mess with SetDefault signature

Nobody messes with SetDefault signature

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Fix stale signature change, and update test data

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Inspect current feature gates at defaulting time

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Don't use the global feature gate for temp usage

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Expose default error, and some comments

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

* Hint fuzzer for less arbitrary values to FeatureGates

Signed-off-by: Laura Lorenz <lauralorenz@google.com>

---------

Signed-off-by: Laura Lorenz <lauralorenz@google.com>
Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>
2024-11-09 01:44:43 +00:00
Kubernetes Prow Robot
591c75e40b
Merge pull request #128694 from tallclair/revert-127300-error-propagation
Revert "[FG:InPlacePodVerticalScaling] kubelet: Propagate error in doPodResizeAction() to the caller"
2024-11-08 19:14:43 +00:00
Kubernetes Prow Robot
fd66693104
Merge pull request #128701 from pohly/prune-junit-xml-trailing-semicolon
prune-junit-xml: avoid appending semicolon
2024-11-08 17:54:50 +00:00
Kubernetes Prow Robot
31970d418c
Merge pull request #126503 from skitt/generic-fake-client
Use generics to share code in fake client-go implementations
2024-11-08 17:54:43 +00:00
Kubernetes Prow Robot
2012060312
Merge pull request #128692 from dinhxuanvu/extra-dir
Remove deprecated extra-dirs flag
2024-11-08 16:38:57 +00:00
Kubernetes Prow Robot
469524442f
Merge pull request #126621 from my-git9/node-deadcode-remove
Remove deadcode in pkg/util/node
2024-11-08 16:38:45 +00:00
Patrick Ohly
dd6ad66f5f prune-junit-xml: avoid appending semicolon
Appending a semicolon after some text is unnecessary if it's the last
entry. This led to visually distracting extra semicolons in Spyglass which
looked like a bug in Spyglass.

Now the code checks if a semicolon is necessary before inserting it.
2024-11-08 16:12:47 +01:00
Tim Allclair
1d822f1dc8 Fix linter errors 2024-11-08 06:48:50 -08:00
Kubernetes Prow Robot
da215bf06a
Merge pull request #128697 from carlory/fix-node-test
Make fake node as ready but unschedulable
2024-11-08 14:36:43 +00:00
carlory
f0f319c6af Make fake node as ready but unschedulable 2024-11-08 18:12:18 +08:00
Stephen Kitt
736e5560ba
Align fake client-go clients with the main interface
"Real" clients use objectWithMeta to enforce support for meta.Object;
strictly speaking, fakes don't need this, but it's best to align them
with the real clients to ensure that fakes don't end up allowing types
that can't be used with the real clients.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-11-08 10:44:22 +01:00
Kubernetes Prow Robot
2691a29eac
Merge pull request #128683 from AnishShah/validation
[FG:InPlacePodVerticalScaling] Disallow removing requests & limits for Burstable pods.
2024-11-08 09:08:43 +00:00
Stephen Kitt
be03bcf324
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-11-08 09:48:59 +01:00
Stephen Kitt
b0ce65df9b
Generify fake clientsets
This adds a generic implementation of a fake clientset, and uses it to
replace the template code in generated fake clientsets for the default
methods. The templates are preserved as-is (or as close as they can
be) for use in extensions, whether for resources or subresources.

Fake clientsets with no extensions are reduced to their main getter,
their specific struct, and their constructor. All method
implementations are provided by the generic implementation. The
dedicated struct is preserved to allow extensions and expansions to be
defined where necessary.

Instead of handling the variants (with/without list, apply) with a
complex sequence of if statements, build up an index into an array
containing the various declarations.

Similarly, instead of calling different action constructors for
namespaced and non-namespaced clientsets, assume the current behaviour
of non-namespaced action creation (equivalent to creating a namespaced
action with an empty namespace) and document that assumption in the
action implementation.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-11-08 09:33:28 +01:00
Kubernetes Prow Robot
c25f5eefe4
Merge pull request #128407 from ndixita/pod-level-resources
[PodLevelResources] Pod Level Resources Feature Alpha
2024-11-08 07:10:50 +00:00
Kubernetes Prow Robot
45260fd76a
Merge pull request #127857 from Jefftree/cle-v1alpha2
Coordinated Leader Election add v1alpha2
2024-11-08 07:10:43 +00:00
Tim Allclair
bf8354d460
Revert "[FG:InPlacePodVerticalScaling] kubelet: Propagate error in doPodResizeAction() to the caller" 2024-11-07 22:43:59 -08:00
Vu Dinh
917aa9a8c4 Remove deprecated extra-dirs flag
The extra-dirs input is no longer in use. The extra-dirs flag, however, is still present
even though it is not wired in conversion code. As a result, any extra dirs inputs are provided
via extra-dirs flag are not taken in consideration for conversion-gen. This flag should be removed
from args options to avoid confusion.

Signed-off-by: Vu Dinh <vudinh@outlook.com>
2024-11-08 00:58:39 -05:00
Kubernetes Prow Robot
6db94779e4
Merge pull request #128686 from thockin/take_over_pr-125233
Add missing comments in k8s.io/api/core/v1
2024-11-08 05:24:59 +00:00
Kubernetes Prow Robot
0fff5bbe7d
Merge pull request #128680 from tallclair/min-cpu
[FG:InPlacePodVerticalScaling] Handle edge cases around CPU MinShares
2024-11-08 05:24:51 +00:00
Kubernetes Prow Robot
81dc4538db
Merge pull request #128287 from Nordix/esotsal/128068
[FG:InPlacePodVerticalScaling] Gate Disallow in-place resize for guaranteed pods on nodes with a static topology policy
2024-11-08 05:24:44 +00:00
Anish Shah
7680f0f293 api: reject removing requsets & limits for Burstable pods. 2024-11-07 21:06:54 -08:00
Kubernetes Prow Robot
3232e2ffc0
Merge pull request #128687 from tallclair/allocated-status
[FG:InPlacePodVerticalScaling] Fix AllocatedResources feature gate annotation
2024-11-08 04:12:49 +00:00
Kubernetes Prow Robot
4d91d50283
Merge pull request #127581 from richabanker/flagz-apiserver
Add flagz endpoint for apiserver
2024-11-08 04:12:42 +00:00
ndixita
b30e6c8b0e keeping the qos code as-is for the existing case when pod-level resources are not set
Signed-off-by: ndixita <ndixita@google.com>
2024-11-08 03:00:55 +00:00
ndixita
b78f6e2fcc Allowlisting k8s.io/components-helpers/resource import in ./pkg/apis/core 2024-11-08 03:00:55 +00:00
ndixita
9813d85071 Fixing linter failures 2024-11-08 03:00:55 +00:00
ndixita
777221421a Resource Quota enforcement changes for Pod Level Resources 2024-11-08 03:00:55 +00:00
ndixita
28dea49c04 Limit Range changes to validate against Pod Level Resources 2024-11-08 03:00:54 +00:00
ndixita
99a6153a4f e2e tests
Signed-off-by: ndixita <ndixita@google.com>
2024-11-08 03:00:54 +00:00
ndixita
5a64597d2e Adding OOM Score adjustment formula changes that takes pod level resources into account
Signed-off-by: ndixita <ndixita@google.com>
2024-11-08 03:00:54 +00:00
ndixita
5ea57fb3b4 cgroup configuration changes:
1. Pod cgrooup configured to use resources from pod spec if feature is enabled and resources are set at pod-level
2. Container cgroup limits defaulted to pod-level limits is container limits are not set
2024-11-08 03:00:54 +00:00
ndixita
26f11c4586 QOS changes for Pod Level resources 2024-11-08 03:00:54 +00:00
ndixita
6db40446de Scheduler changes:
1. Use pod-level resource when feature is enabled and resources are set at pod-level
2. Edge case handling: When a pod defines only CPU or memory limits at pod-level (but not both), and container-level requests/limits are unset, the pod-level requests stay empty for the resource without a pod-limit. The container's request for that resource is then set to the default request value from schedutil.
2024-11-08 03:00:54 +00:00
ndixita
8a8dc27b4e Adding the logic to validate pod-level resources as following:
1. The effective container requests cannot be greater than pod-level requests
2. Inidividual container limits cannot be greater than pod-level limits
3. Only CPU & Memory are supported at pod-level
4. Inplace container resources updates are not supported if pod-level resources are set
Note: effective container requests cannot be greater than pod-level limits is supported by transitivity. Effective container requests <= pod-level requests && pod-level requests <= pod-level limits; Therefore effective container requests <= pod-level limits

Signed-off-by: ndixita <ndixita@google.com>
2024-11-08 03:00:54 +00:00
ndixita
a2ddde877c Adding the logic to set default pod-level request as following:
1. If pod-level limit is set, pod-level request is unset and container-level request is set: derive pod-level request from container-level requests
2. If pod-level limit is set, pod-level request is unset and container-level request is unset: set pod-level request equal to pod-level limit
2024-11-08 03:00:54 +00:00
ndixita
502e0f55c4 Adding support for pod level resources in kubectl
1. Add support for pod level resources in kubectl
2. Reuse the existing method to describe container resources and generalize it to describe both pod and container level resources
2024-11-08 03:00:53 +00:00
ndixita
85488b5f10 Generated files and compatability data from API changes 2024-11-08 03:00:50 +00:00
ndixita
d7f488b5e3 API changes for Pod Level Resources
1. Add Resources struct to PodSpec struct in both external and internal API packages
2. Adding feature gate and logic for dropping disabled fields for Pod Level Resources
KEP: enhancements/keps/sig-node/2837-pod-level-resource-spec
2024-11-08 02:45:04 +00:00
Bo Wang
495af2a3d4
Add missing comments in k8s.io/api/core/v1
Signed-off-by: Bo Wang <wangbob@uniontech.com>
2024-11-07 18:42:33 -08:00
Jefftree
e86c38b249 generated 2024-11-08 02:27:20 +00:00
Jefftree
0ce7b688a6 v1alpha2 LeaseCandidate API 2024-11-08 02:27:19 +00:00