Commit Graph

4293 Commits

Author SHA1 Message Date
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
Filip Křepinský
28437797b5 update generated files and feature gates 2025-01-23 22:26:34 +01:00
Filip Křepinský
14783b8a9b add validation, field disablement and tests 2025-01-23 22:26:34 +01:00
Filip Křepinský
f7c46df665 api: add terminatingReplicas field to ReplicaSet and Deployment statuses
- update internal ReplicaSet and Deployment type documentation to match with
  versioned API
- made Replicaset and Deployment type documentation more consistent
2025-01-23 22:26:34 +01:00
Antonio Ojea
3606d52cd6 make update 2025-01-20 13:01:54 +00:00
Tom Walker
1d4acfb882 Update EnvFromSource.Prefix doc to mention Secret as well as ConfigMap
Signed-off-by: Tom Walker <walker.thomas.p@gmail.com>
2025-01-17 15:20:15 +00:00
Patrick Ohly
2cc3dbf225 DRA CEL: add missing size estimator
Not implementing a size estimator had the effect that strings retrieved from
the attributes were treated as "unknown size", leading to wildly overestimating
the cost and validation errors even for even simple expressions like this:

    device.attributes["qat.intel.com"].services.matches("[^a]?sym")

Maximum number of elements in maps and the maximum length of the driver name
string were also ignored resp. missing. Pre-defined types like
apiservercel.StringType must be avoided because they are defined as having
a zero maximum size.
2025-01-16 16:36:43 +01:00
Patrick Ohly
1cee3682da DRA API: bump maximum size of ReservedFor to 256
The original limit of 32 seemed sufficient for a single GPU on a node. But for
shared non-local resources it is too low. For example, a ResourceClaim might be
used to allocate an interconnect channel that connects all pods of a workload
running on several different nodes, in which case the number of pods can be
considerably larger.

256 is high enough for currently planned systems. If we need something even
higher in the future, an alternative approach might be needed to avoid
scalability problems.

Normally, increasing such a limit would have to be done incrementally over two
releases. In this case we decided on
Slack (https://kubernetes.slack.com/archives/CJUQN3E4T/p1734593174791519) to
make an exception and apply this change to current master for 1.33 and backport
it to the next 1.32.x patch release for production usage.

This breaks downgrades to a 1.32 release without this change if there are
ResourceClaims with a number of consumers > 32 in ReservedFor. In practice,
this breakage is very unlikely because there are no workloads yet which need so
many consumers and such downgrades to a previous patch release are also
unlikely. Downgrades to 1.31 already weren't supported when using DRA v1beta1.
2025-01-09 14:26:01 +01:00
carlory
75131475fd Remove general available feature-gate PDBUnhealthyPodEvictionPolicy 2025-01-07 15:24:16 +08:00
Arda Güçlü
7c887412c8 Add validation for revisionHistoryLimit in sts to prevent negative value (#129017)
* Add validation for revisionHistoryLimit in sts to prevent negative value

* Add unit tests to verify warning messages
2025-01-06 20:04:31 +01:00
Kubernetes Prow Robot
46f0b3fc13 Merge pull request #128920 from tallclair/ippr-defaults
[FG:InPlacePodVerticalScaling] Remove ResizePolicy defaulting
2024-12-14 03:04:25 +01: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
Kubernetes Prow Robot
e4c1f980b7 Merge pull request #128932 from pohly/dra-node-selector-validation
DRA API: validate node selector labels
2024-11-22 20:22:55 +00: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
Tim Allclair
da4dc0aec7 Stop defaulting container ResizePolicy 2024-11-21 09:51:31 -08:00
Paco Xu
03a15fa65d Revert "[FG:InPlacePodVerticalScaling] Graduate to Beta" 2024-11-20 14:55:29 +08:00
Kubernetes Prow Robot
252e9cbb23 Merge pull request #128754 from vivzbansal/sidecar-3
Add AllowSidecarResizePolicy to relax resize policy validation check of sidecar containers
2024-11-12 20:28:48 +00:00
vivzbansal
95591abd02 Add AllowSidecarResizePolicy to relax resize policy validation check of sidecar containers 2024-11-12 05:08:51 +00:00
Tim Allclair
2935b106dc Set default ResizePolicy in fuzzer for roundtrip tests 2024-11-11 12:44:33 -08: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
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
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
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
26f11c4586 QOS changes for Pod Level resources 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
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
Jefftree
e86c38b249 generated 2024-11-08 02:27:20 +00:00
Jefftree
0ce7b688a6 v1alpha2 LeaseCandidate API 2024-11-08 02:27:19 +00:00
Kubernetes Prow Robot
4cf2818f96 Merge pull request #128240 from LionelJouin/KEP-4817
DRA: Implementation of ResourceClaim.Status.Devices (KEP-4817)
2024-11-08 02:21:24 +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
Tim Allclair
8661f743a3 Fix AllocatedResources feature gate annotation 2024-11-07 16:31:25 -08:00
Kubernetes Prow Robot
3300aa1783 Merge pull request #128247 from mattcary/autodelete-ga
Promote StatefulSetAutoDeletePVC to stable in 1.32
2024-11-07 22:20:43 +00:00
Lionel Jouin
118356175d [KEP-4817] Add limits on conditions and IPs + fix documentation
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 22:18:53 +01: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
Kubernetes Prow Robot
50362ac7d0 Promote StatefulSetAutoDeletePVC to stable for 1.32. 2024-11-07 09:43:49 -08:00
Kubernetes Prow Robot
ef37cb503b Merge pull request #128634 from thockin/remove_PodHostIPs_gate_for_1.32
Remove PodHostIPs feature gates
2024-11-07 13:47:54 +00:00
Lionel Jouin
d28b50e0a0 [KEP-4817] make update
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 10:36:09 +01:00
Lionel Jouin
39f55e1cd0 [KEP-4817] Add data length limit (from #128601)
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 10:35:29 +01:00
Lionel Jouin
4b76ba1a87 [KEP-4817] Rename Addresses to IPs
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 09:59:56 +01:00
Lionel Jouin
43d23b8994 [KEP-4817] Use structured.MakeDeviceID
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 09:59:56 +01:00
Lionel Jouin
8ab33b8413 [KEP-4817] Improve NetworkData Validation
* Add max length for InterfaceName and HardwareAddress
* Prevent duplicated Addresses

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-11-07 09:59:56 +01:00