184 Commits

Author SHA1 Message Date
yliao
34a64db2c7 extended resource backed by DRA: implementation 2025-07-29 18:55:21 +00: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
Yuan Wang
af595a44ae Add container restart rules to API 2025-07-24 16:49:52 +00:00
HirazawaUi
c35e4ad2b2 add codes for drop disabled pod fields 2025-07-23 22:57:12 +08: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
Kubernetes Prow Robot
cc674e7470 Merge pull request #128010 from ahmedtd/pod-certificates-types
Pod Certificates: Preliminary implementation of KEP-4317
2025-07-21 19:26:30 -07: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
e0f20a38ed Merge pull request #132912 from natasha41575/obsgen-beta
Graduate PodObservedGenerationTracking to beta
2025-07-21 14:14:40 -07:00
Natasha Sarkar
8996e81fc8 fix unit tests 2025-07-21 16:46:07 +00:00
Kubernetes Prow Robot
ade9b7746a Merge pull request #132595 from AxeZhan/ga3960
Graduate PodLifecycleSleepAction to GA
2025-07-19 13:22:39 -07:00
sreeram-venkitesh
00bf3b37a7 Graduate PodLifecycleSleepActionAllowZero to GA 2025-07-18 21:35:58 +05:30
Tim Allclair
3ecb3d230f Remove unused appArmor*InUse functions 2025-07-17 14:07:35 -07:00
ylink-lfs
995a7872c5 chore: remove utilpointer usage in pkg/api/pod 2025-07-06 11:34:27 +08:00
AxeZhan
dcbed2fbdc Graduate PodLifecycleSleepAction to GA 2025-07-02 09:37:14 +08:00
sreeram-venkitesh
f9a5aec318 Added unit tests 2025-06-25 23:59:44 +05:30
Keita Mochizuki
a3097010fa Change the implementation design of matchLabelKeys in PodTopologySpread to be aligned with PodAffinity (#129874)
* Change the implementation design of matchLabelKeys in PodTopologySpread to be aligned with PodAffinity

* fix1
2025-05-07 13:01:15 -07:00
Tim Allclair
5928fc0e60 Add ContainerIter utility for ranging over pod containers 2025-04-11 13:36:37 -07:00
Sreeram
0380f2c41c Validation 2025-03-25 01:58:04 +05:30
Kubernetes Prow Robot
2546557012 Merge pull request #130621 from sreeram-venkitesh/4818-sleep-action-zero-value-beta-graduation
KEP 4818: PodLifecycleSleepActionAllowZero to Beta
2025-03-20 13:08:39 -07:00
Sreeram
3043fbc3da Added feature gate to unit test 2025-03-20 19:36:10 +05:30
Sreeram
c0a1489bc8 Fix unit tests 2025-03-20 19:36:10 +05:30
kerthcet
1a34095f75 KEP-3094 Promote NodeInclusionPolicyInPodTopologySpread to Stable
Signed-off-by: kerthcet <kerthcet@gmail.com>
2025-03-20 14:54:42 +08:00
Tim Allclair
aba588cd14 Deprecate IPPVSAllocatedStatus: always set allocatedResources with InPlacePodVerticalScaling 2025-03-19 16:00:02 -07:00
Kubernetes Prow Robot
f1c634f93e Merge pull request #130463 from sanposhiho/ga-mlk
feat: graduate MatchLabelKeysInPodAffinity to GA
2025-03-19 09:06:31 -07:00
Kensei Nakada
10c6a4258f feat: graduate MatchLabelKeysInPodAffinity to GA 2025-03-19 23:06:04 +09:00
Tim Allclair
cd1a5c6d5c Fix Kubelet unit tests 2025-03-18 15:51:09 -07:00
Natasha Sarkar
a15520fbea Move pod resize status to pod conditions 2025-03-17 22:01:05 +00:00
Kubernetes Prow Robot
6b8341fc2e Merge pull request #130544 from jsafrane/selinux-beta
selinux: Promote SELinuxChangePolicy and SELinuxMount to beta
2025-03-12 11:29:47 -07:00
Kubernetes Prow Robot
07d66d9c26 Merge pull request #130574 from natasha41575/drop_proposed_resize_status
[FG:InPlacePodVerticalScaling] Drop `Proposed` resize status
2025-03-11 09:49:46 -07:00
Natasha Sarkar
8a20e90839 [FG:InPlacePodVerticalScaling] Drop 'Proposed' resize status 2025-03-10 20:46:02 +00:00
Natasha Sarkar
12d34624ba add observedGeneration to pod's dropDisabledStatusFields 2025-03-06 20:14:32 +00:00
Jan Safranek
96bae53a37 Promote SELinuxChangePolicy and SELinuxMount to beta
SELinuxMount stays off by default, because it changes the default
kubelet behavior. SELinuxChangePolicy is on by default and notifies users
on Pods that could get broken by SELinuxMount feature gate.
2025-03-04 11:03:54 +01:00
Alex Petrov
f63359efb0 fix(pod/util): typos in getting pod validation options
Before, containers with the PostStart sleep lifecycle hook would cause
null pointer panics due to a typo in the field name being checked. This
commit fixes that.

The check also needs to be done on the oldPodSpec, rather than the
podSpec, so that existing workloads which use the zero value continue
functioning in the same way.
2025-02-27 19:25:14 -05:00
Kubernetes Prow Robot
0634e21fb5 Merge pull request #128367 from vivzbansal/sidecar-2
[FG:InPlacePodVerticalScaling] Implement resize for sidecar containers
2025-02-05 14:38:15 -08:00
Gunju Kim
0bee0bcaa7 Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
vivzbansal
6c5cf68722 Resolved latest review comments 2025-01-27 19:46:33 +00:00
vivzbansal
d1fac494f4 resolve merge conflicts 2025-01-27 19:42:13 +00:00
AxeZhan
ae11c7deb1 DisallowInvalidLabelValueInNodeSelector 2024-12-12 15:06:14 +08:00
vivzbansal
95591abd02 Add AllowSidecarResizePolicy to relax resize policy validation check of sidecar containers 2024-11-12 05:08:51 +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
Kevin Hannon
350b0d2b93 Revert "Graduate PodLifecycleSleepAction to GA" 2024-11-06 16:29:19 -05:00
Kubernetes Prow Robot
f81a68f488 Merge pull request #128377 from tallclair/allocated-status-2
[FG:InPlacePodVerticalScaling] Implement AllocatedResources status changes for Beta
2024-11-05 23:21:49 +00:00
Kubernetes Prow Robot
9fe41b6198 Merge pull request #128046 from AxeZhan/ga3960
Graduate PodLifecycleSleepAction to GA
2024-11-04 22:09:35 +00:00
AxeZhan
200a61b6b9 Graduate PodLifecycleSleepAction to GA 2024-11-02 11:05:36 +08:00
Tim Allclair
99dcf07e21 If ResourceRequirements changed, always mark a proposed resize 2024-11-01 14:10:12 -07:00
Tim Allclair
0f0e27d226 Move container status AllocatedResources behind a separate feature gate 2024-11-01 14:02:58 -07:00
Jan Safranek
6ca7b959e4 Add SELinuxChangePolicy validation 2024-11-01 12:46:34 +01:00
zhifei92
5c01709387 Fix the apiserver panic caused by adding a container when updating a pod
add unit test

refactor:  Merge the test cases into TestMarkPodProposedForResize.

chore:  Add the comment and fix the test names
2024-10-29 10:52:46 +08:00
Kubernetes Prow Robot
7590cb7adf Merge pull request #125257 from vinayakankugoyal/armor
KEP-24: Update AppArmor feature gates to GA stage.
2024-07-23 09:20:52 -07:00
Sascha Grunert
f7ca3131e0 Add ImageVolumeSource API
Adding the required Kubernetes API so that the kubelet can start using
it. This patch also adds the corresponding alpha feature gate as
outlined in KEP 4639.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-18 17:25:54 +02:00