1515 Commits

Author SHA1 Message Date
yliao
34a64db2c7 extended resource backed by DRA: implementation 2025-07-29 18:55:21 +00:00
yliao
3068b60b83 extended resource backed by DRA: codegen 2025-07-29 17:17:20 +00:00
yliao
1f2fd18ac8 extended resource backed by DRA: API types.go 2025-07-29 17:17:19 +00:00
Kubernetes Prow Robot
fd3c879a5b Merge pull request #132443 from utam0k/clearn-nnn-bind-api
Clear pod.Status.NominatedNodeName when pod is bound
2025-07-29 10:12:26 -07:00
utam0k
60fa65db88 Clear pod.Status.NominatedNodeName when pod is bound
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-29 23:48:11 +09:00
Rodrigo Campos
48f8458c41 validation: Fix user-namespaces test case name
hostPath is a supported volume since Kubernetes 1.28. Let's update it.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-07-28 16:54:08 +02:00
Rodrigo Campos
50a7a8af4d validation: Align usage of hostUsers in error messages
Other validation errors, like using hostNetwork, don't put
pod.spec.HostNetwork in the error message.

Let's remove align with that.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-07-28 16:54:08 +02:00
Rodrigo Campos
5f7e611f73 validation: Return error if hostUsers=false && volumeDevices
Now if a pod tries to use user namespaces (hostUsers: false) and a
volume device, it will see this error:
	$ kubectl apply -f pod.yaml
	...
	* spec.ephemeralContainers[0].volumeDevices: Forbidden: when `pod.Spec.HostUsers` is false
	* spec.initContainers[0].volumeDevices: Forbidden: when `pod.Spec.HostUsers` is false
	* spec.containers[0].volumeDevices: Forbidden: when `pod.Spec.HostUsers` is false

Note that if a pod is already created with volumeDevices and userns,
then we allow modifications to that object.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-07-28 16:54:08 +02:00
Kubernetes Prow Robot
b93bcbfba1 Merge pull request #133195 from nojnhuh/dra-ga-comment
Update DRA Pod spec comments
2025-07-25 00:32:35 -07:00
Kubernetes Prow Robot
3fd1251165 Merge pull request #131089 from KevinTMtz/pod-level-hugepage-cgroups
[PodLevelResources] Propagate Pod level hugepage cgroup to containers
2025-07-24 19:08:26 -07:00
Jon Huhn
f1737db166 Update DRA Pod spec comments 2025-07-24 18:58:24 -05:00
Kubernetes Prow Robot
26045b2fab Merge pull request #132642 from yuanwang04/restart-rules
Implement container restart policy rules
2025-07-24 16:44:51 -07:00
Kubernetes Prow Robot
7912e5fd67 Merge pull request #131549 from carlory/KEP-3751-GA
[Kep-3751] Promote VolumeAttributesClass to GA
2025-07-24 16:44:27 -07:00
Kevin Torres
9f5b09eb7b Unit test pod level hugepage Default and Validation logic 2025-07-24 21:29:04 +00:00
Kevin Torres
845e94d370 Validation logic and Defaulting update for pod level hugepages
The hugepage aggregated container limits cannot be greater than pod-level limits.

This was already enforced with the defaulted requests from the specfied
limits, however it did not make it clear about both hugepage requests and limits.
2025-07-24 21:29:01 +00:00
carlory
94bf8fc8a9 Promoted API VolumeAttributesClass and VolumeAttributesClassList to storage.k8s.io/v1.
Promoted feature-gate `VolumeAttributesClass` to GA (on by default)

Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-07-25 01:53:59 +08:00
Kevin Torres
52b457421a Pod level hugepage cgroup when unset in container 2025-07-24 17:13:39 +00:00
Yuan Wang
af595a44ae Add container restart rules to API 2025-07-24 16:49:52 +00:00
Kubernetes Prow Robot
9adc49ffd4 Merge pull request #133046 from toVersus/reject-windows-in-api-server
[PodLevelResources] Add validation for Windows OS
2025-07-23 19:56:33 -07:00
Kubernetes Prow Robot
6ef2215eb7 Merge pull request #132558 from HirazawaUi/Implement-4762
KEP-4762: Allows setting any FQDN as the pod's hostname
2025-07-23 16:26:27 -07:00
Kubernetes Prow Robot
041974709c Merge pull request #132106 from AndrewSirenko/vac-valid
[KEP-3751] Allow PVC VACName to go from non-nil to nil
2025-07-23 12:52:30 -07:00
Drew Sirenko
f7109ed281 [KEP-3751] Allow PVC VACName to update to nil or empty when status.currentVAC is nil 2025-07-23 10:59:18 -04:00
HirazawaUi
88b7621434 Add validation for the HostnameOverride field. 2025-07-23 22:57:08 +08:00
HirazawaUi
8b3814c4ab Add the HostnameOverride field to the Pod API 2025-07-23 20:28:12 +08:00
Tsubasa Nagasawa
88af8b6060 Add PodLevelResources to the Windows OS limitations in the API doc 2025-07-23 07:08:21 +09:00
Anna Song
e2c308aff9 Check OS for PodLevelResources in API server
Reject Pod with PodLevelResources in spec if Pod targets Windows OS.
2025-07-23 07:08:14 +09:00
Bing Hongtao
6f3b6b91f0 KEP-3721: Support for env files (#132626)
* Add FileKeyRef field and struct to the Pod API

* Add the implementation code in the kubelet.

* Add validation code

* Add basic functionality e2e tests

* add codes for drop disabled pod fields

* update go.mod
2025-07-22 13:40:42 -07:00
Taahir Ahmed
6d4000f844 Pod Certificates: make update
Change-Id: Ib258c1f3bf238f41cfa1d6de8e8d0de5b8379a06
2025-07-21 21:49:57 +00:00
Taahir Ahmed
4624cb9bb9 Pod Certificates: Basic implementation
* Define feature gate
* Define and serve PodCertificateRequest
* Implement Kubelet projected volume source
* kube-controller-manager GCs PodCertificateRequests
* Add agnhost subcommand that implements a toy signer for testing

Change-Id: Id7ed030d449806410a4fa28aab0f2ce4e01d3b10
2025-07-21 21:49:57 +00:00
Kubernetes Prow Robot
4a80270b30 Merge pull request #133012 from tallclair/mem-lim-decrease
[FG:InPlacePodVerticalScaling] Support reducing memory limits
2025-07-17 17:10:39 -07:00
Kubernetes Prow Robot
99f55ae4ef Merge pull request #132662 from gnufied/bump-recovery-feature-ga
Bump recovery feature ga
2025-07-17 17:10:25 -07:00
Tim Allclair
c7a78185c2 Remove the restriction on memory limit decrease 2025-07-17 13:17:35 -07:00
Sunny Song
1745094c40 Update VolumeAttributesClass API Description 2025-07-17 18:40:01 +00:00
Kubernetes Prow Robot
190b3cca2b Merge pull request #132212 from astraw99/fix-sts-validation
Add validation of `volumeClaimTemplates` in StatefulSet
2025-07-16 11:04:23 -07:00
astraw99
6e93244532 Add validation of volumeClaimTemplates in StatefulSet 2025-07-16 12:24:35 +08:00
Kubernetes Prow Robot
bdb7a01946 Merge pull request #132890 from atiratree/replicaset-conversion
add Replicaset -> ReplicationController conversion test
2025-07-14 22:32:29 -07:00
yongruilin
419e70b763 run update-codegen
Co-authored-by: Tim Hockin <thockin@google.com>
Co-authored-by: Aaron Prindle <aprindle@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>
2025-07-12 21:18:59 +00:00
Filip Křepinský
65e0cff3c5 add Replicaset -> ReplicationController conversion test
and ensure we account for fields that are only supported by ReplicaSet
2025-07-11 14:55:15 +02:00
Hemant Kumar
c126870ebc Bump RecoverVolumeExpansionFailure to GA 2025-07-10 12:19:31 -04:00
Kubernetes Prow Robot
b8450dc451 Merge pull request #132806 from PatrickLaabs/132749-toPtr
chore: replacement of toPtr helper functions with ptr packge
2025-07-08 14:33:40 -07:00
colg
c6fef9752c fix: improve the pod level request validation (#132551)
* fix: improve the pod level request validation

The pod level request should be larger than the aggregated container
requests. The fix is to skip those resources not supported at the pod
level for better efficiency.

A minor unit test is also added.

* Align with the limit check section using the pod spec to check
existence.
2025-07-08 13:25:26 -07:00
Kubernetes Prow Robot
9fbd2dae14 Merge pull request #132339 from adrianmoisey/relaxed-validation-for-services-names
KEP-5311 Relaxed validation for Services names
2025-07-08 09:03:26 -07:00
PatrickLaabs
e909e0cf73 chore: replacement of toPtr helper functions with ptr packge 2025-07-08 09:48:56 +02:00
Kubernetes Prow Robot
7948fec34b Merge pull request #132792 from ylink-lfs/chore/typo_invaILd
chore: typo 'invaILd' occurrence replacement
2025-07-07 21:45:25 -07:00
ylink-lfs
d9de37d931 chore: typo invaILd occurrence replacement 2025-07-08 00:08:34 +08:00
PatrickLaabs
f966647b4d chore: depr. pointer pkg replacement for pkg/apis 2025-07-07 12:54:05 +02:00
Adrian Moisey
37a90b7c24 Add unit test for Service relaxed validation
Test the behaviour of feature gate RelaxedServiceNameValidation.
2025-07-02 12:57:32 +02:00
Adrian Moisey
487eb8a9e4 Allow Service names to be validated with apimachineryvalidation.NameIsDNSLabel
Only validate when feature gate RelaxedServiceNameValidation is enabled.
Also remove name validation on Service updates, as the name is
immutable.

Move ValidateObjectMeta out of ValidateService
Put it into ValidateServiceCreate(), making the code path as such:
```
pkg/registry/core/service/strategy.go
Validate       -> validation.ValidateServiceCreate -> ValidateObjectMeta
                                                   -> ValidateService

ValidateUpdate -> validation.ValidateServiceUpdate -> ValidateObjectMetaUpdate
                                                   -> ValidateService
```

Other resources I checked pass the update objects through
ValidateObjectMeta and ValidateObjectMetaUpdate, so this breaks the
pattern, but it seems to be how the
ValidateObjectMeta/ValidateObjectMetaUpdate functions are designed to
operate.
2025-07-02 12:55:53 +02:00
xiaoweim
8632257c93 Cleanup: Remove redundant detail messages in field.Required 2025-06-26 21:24:43 +00:00
Davanum Srinivas
03afe6471b Add a replacement for cmp.Diff using json+go-difflib
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-16 17:10:42 -04:00