Commit Graph

1497 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
158fce12ba Merge pull request #132236 from yongruilin/master_vg_ratcheting-default
feat(validation-gen): add default validation ratcheting support
2025-06-11 22:15:01 -07:00
Kubernetes Prow Robot
bf84dd0cc9 Merge pull request #132127 from danwinship/kep-3015-to-beta
KEP-3015: PreferSameTrafficDistribution to Beta
2025-06-11 22:14:54 -07:00
yongruilin
1574001a1c run update-codegen.sh 2025-06-11 23:44:52 +00:00
Dan Winship
dacafec88c KEP-3015: PreferSameTrafficDistribution to Beta 2025-06-10 08:46:34 -04:00
HirazawaUi
0ca9c380ad update all api files 2025-06-08 12:00:14 +08:00
Joe Betz
1d17ca9b7e generate code 2025-05-24 00:03:35 -04:00
Kubernetes Prow Robot
889cd833a2 Merge pull request #131844 from pohly/dra-no-static-pods
DRA node: reject static pods which reference ResourceClaims
2025-05-20 07:07:24 -07:00
Kubernetes Prow Robot
fbd474a286 Merge pull request #131644 from Uladzislau97/taint-time-added
Remove misleading comment from NodeTaint TimeAdded field
2025-05-13 15:53:26 -07:00
Vlad Vasilyeu
c4d6fcb197 Remove misleading comment from NodeTaint TimeAdded field 2025-05-13 15:35:21 +00:00
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
Joe Betz
d2fa246b06 Update codegen 2025-05-06 09:00:38 -04:00
Joe Betz
164fefa948 Update codegen 2025-05-05 22:06:59 -04:00
Patrick Ohly
1ec7231f63 DRA node: reject static pods which reference ResourceClaims
If someone gains the ability to create static pods, they might try to use that
ability to run code which gets access to the resources associated with some
existing claim which was previously allocated for some other pod. Such an
attempt already fails because the claim status tracks which pods are allowed to
use the claim, the static pod is not in that list, the node is not authorized
to add it, and the kubelet checks that list before starting the pod in
195803cde5/pkg/kubelet/cm/dra/manager.go (L218-L222).

Even if the pod were started, DRA drivers typically manage node-local resources
which can already be accessed via such an attack without involving DRA. DRA
drivers which manage non-node-local resources have to consider access by a
compromised node as part of their threat model.

Nonetheless, it is better to not accept static pods which reference
ResourceClaims or ResourceClaimTemplates in the first place because there
is no valid use case for it.

This is done at different levels for defense in depth:
- configuration validation in the kubelet
- admission checking of node restrictions
- API validation

Co-authored-by: Jordan Liggitt <liggitt@google.com>

Code changes by Jordan, with one small change (resourceClaims -> resourceclaims).
Unit tests by Patrick.
2025-05-05 14:21:25 +02:00
Kubernetes Prow Robot
595516a149 Merge pull request #130468 from jingyuanliang/PodAntiAffinity
fix: comment on preferred PodAntiAffinity
2025-04-24 12:00:34 -07:00
carlory
88fbccd698 Fix the allocatedResourceStatuses Field name mismatch in PVC status validation 2025-04-09 16:21:38 +08:00
Sreeram
d6d9a354d7 Generated files 2025-03-25 02:06:29 +05:30
Sreeram
0380f2c41c Validation 2025-03-25 01:58:04 +05:30
Sreeram
70540c9f43 API changes 2025-03-25 01:56:45 +05:30