Commit Graph

694 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
814e2c89a8 Merge pull request #128792 from vivzbansal/sidecar-3
Added unit test for resize policy validation check of sidecar containers
2025-01-29 18:23:22 -08:00
Davanum Srinivas
4e05bc20db Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-24 20:49:14 -05:00
Kubernetes Prow Robot
7a504aa97b Merge pull request #129174 from RyanAoh/fix-115896
Remove the limitation on exposing port 10250 externally
2024-12-13 01:48:32 +01:00
Aohan Yang
e8087b3f6a Remove the limitation on exposing port 10250 externally 2024-12-12 19:45:19 +08:00
Kubernetes Prow Robot
3bec2450ef Merge pull request #128212 from AxeZhan/selecor_validation
Add validation for NodeSelectorRequirement's values
2024-12-12 11:14:26 +01:00
AxeZhan
ae11c7deb1 DisallowInvalidLabelValueInNodeSelector 2024-12-12 15:06:14 +08: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
AxeZhan
3075a9ae96 DRA API: validate node selector labels
Previously, ValidateNodeSelector did not check that labels are valid. Now it
does for resource.k8s.io, regardless whether an object already was created with
invalid labels in an earlier Kubernetes release. Theoretically this is a
breaking change and could cause problems during an upgrade, but that is highly
unlikely in practice.

In contrast to node affinity, DRA does not ignore parse errors
(= uses NewNodeSelector, not NewLazyErrorNodeSelector), so invalid labels would
have been found instead of being silently ignored.

Even if some object has invalid labels, this only affects an alpha -> beta
upgrade which isn't guaranteed to work seamlessly.
2024-11-22 09:10:02 +01:00
vivzbansal
22c3db6f7f Added unit test for validation check of sidecar containers 2024-11-14 02:44:01 +00:00
vivzbansal
95591abd02 Add AllowSidecarResizePolicy to relax resize policy validation check of sidecar containers 2024-11-12 05:08:51 +00: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
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
Anish Shah
7680f0f293 api: reject removing requsets & limits for Burstable pods. 2024-11-07 21:06:54 -08: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
Kubernetes Prow Robot
46b3d9b320 Merge pull request #128186 from sreeram-venkitesh/117767-in-place-pod-vertical-scaling-version-skew
Updated version skew strategy for InPlacePodVerticalScaling
2024-11-08 02:21:14 +00:00
Sreeram Venkitesh
851dbf25e5 Added unit tests 2024-11-08 01:17:05 +05:30
Kubernetes Prow Robot
9660e5c4cd Merge pull request #127360 from knight42/feat/split-stdout-stderr-server-side
API: add a new `Stream` field to `PodLogOptions`
2024-11-07 19:44:45 +00:00
Sreeram Venkitesh
8f1e69bbb0 Fix verify-gofmt.sh 2024-11-07 13:28:40 +05:30
Lan Liang
6e5a3cde50 Remove PodHostIPs feature gates.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-11-06 23:10:36 -08:00
Sreeram Venkitesh
1739ee2ba9 Removed duplicated tests after rebase 2024-11-07 11:38:54 +05:30
Sreeram Venkitesh
385d2b198c Fixes from review, updated tests cases 2024-11-07 11:34:58 +05:30
Sreeram Venkitesh
7d1d7182f3 Update function name and remove feature gate check 2024-11-07 11:29:11 +05:30
Sreeram Venkitesh
4dae42a796 Updated version skew strategy for InPlacePodVerticalScaling 2024-11-07 11:29:07 +05:30
Anish Shah
207842d3e0 drop InPlacePodVerticalScaling support in windows 2024-11-06 12:57:55 -08:00
Kubernetes Prow Robot
96250d4411 Merge pull request #124918 from SergeyKanzhelev/commentIgnoringBadStatuses
added a comment that statuses lists are not being validated
2024-11-06 20:09:29 +00:00
Jian Zeng
b9228836e1 feat: update validation helpers
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2024-11-06 21:27:12 +08:00
Kubernetes Prow Robot
648717cc74 Merge pull request #128266 from AnishShah/resize-subresource
[FG:InPlacePodVerticalScaling] Introduce  /resize subresource to request pod resource resizing
2024-11-06 06:59:29 +00:00
Kubernetes Prow Robot
a50b4e52a9 Merge pull request #128553 from thockin/master
Validation: merge TooLong and TooLongMaxLen
2024-11-06 04:19:43 +00:00
Anish Shah
332d794559 remove redundant validation check for pod resize 2024-11-06 01:33:15 +00:00
Anish Shah
832d7f7dc2 apply feedback 2024-11-06 01:33:15 +00:00
Anish Shah
0a80c5ecb7 better variable names 2024-11-06 01:33:15 +00:00
Anish Shah
7ac302b47a test: cleanup validation tests 2024-11-06 01:33:15 +00:00
Anish Shah
ce0f4597d3 fix error message for pod resize validation failure 2024-11-06 01:33:14 +00:00
Anish Shah
2bf1f2349c validate resize request
We validate resize request by ensuring that pod QoS is unchanged and
only cpu and memory resources and resize policies are mutated.
2024-11-06 01:33:14 +00:00
Tim Hockin
c8eeb486f4 Call-site comments: the "" arg to TooLong is unused 2024-11-05 15:10:24 -08:00
Tim Hockin
8a7af90300 Clarify that value arg to field.TooLong is unused 2024-11-05 15:10:23 -08:00
Tim Hockin
4d0e1c8fd4 Kill TooLongMaxLength() in favor of TooLong() 2024-11-05 15:10:22 -08:00
Kubernetes Prow Robot
5572688cef Merge pull request #128342 from gnufied/recovery-expansion-beta
Move RecoverVolumeExpansionFailure feature to beta
2024-11-04 23:15:36 +00:00
Kubernetes Prow Robot
97c79df18f Merge pull request #127981 from jsafrane/selinux-changepolicy
1710: Implement SELinuxChangePolicy
2024-11-04 22:09:29 +00:00
Sergey Kanzhelev
01851b89f4 added a comment that statuses lists are not being validated 2024-11-03 06:28:42 +00:00
Kubernetes Prow Robot
6bc0768c62 Merge pull request #127744 from carlory/fix-126662
Tighten validation on the qosClass field of pod status
2024-11-01 22:33:27 +00:00
Jan Safranek
6ca7b959e4 Add SELinuxChangePolicy validation 2024-11-01 12:46:34 +01:00
carlory
9cb7d58b3c Tighten validation on the qosClass field of pod status 2024-11-01 10:36:03 +08:00
Kubernetes Prow Robot
b337f048db Merge pull request #127094 from sreeram-venkitesh/4818-allow-zero-for-prestop-hook
KEP-4818: Relaxed validation for allowing zero in PreStop hook sleep action
2024-10-31 20:25:26 +00:00
Kubernetes Prow Robot
86b99869cb Merge pull request #128299 from SergeyKanzhelev/updateDHS
Update Device Health fields description for KEP-4680
2024-10-28 22:19:01 +00:00
Sergey Kanzhelev
5cfaf47448 update allocated resources status validation to account for claims 2024-10-26 07:11:06 +00:00
Hemant Kumar
a9d71bd6e6 Move RecoverVolumeExpansionFailure feature to beta 2024-10-25 13:39:43 -04:00
Kubernetes Prow Robot
0a62f0fd7b Merge pull request #128139 from Jefftree/revert-allowservicelb
Revert removal of feature AllowServiceLBStatusOnNonLB and LockToDefault first
2024-10-24 15:20:54 +01:00
Kubernetes Prow Robot
5f3316fe23 Merge pull request #128119 from saschagrunert/api-validation-err
Clarify API validation error for toleration if `operator` is `Exists` and `value` is not empty
2024-10-21 19:44:59 +01:00