Commit Graph

4525 Commits

Author SHA1 Message Date
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
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
3d13f39f24 Merge pull request #132788 from ylink-lfs/chore/strptr_removal
chore: remove strPtr usage with ptr.To
2025-07-08 00:35:36 -07: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
830a088d1b chore: remove strPtr usage with ptr.To instead 2025-07-08 09:03:38 +08:00
Kubernetes Prow Robot
41477c9748 Merge pull request #132361 from yongruilin/master_vg_enable-csr
Enable Declarative Validation for CertificateSigningRequest
2025-07-07 17:05:25 -07:00
Kubernetes Prow Robot
f41b45838d Merge pull request #132779 from PatrickLaabs/132086-pkg-api-2
chore: depr. pointer pkg replacement for pkg/apis (2/2)
2025-07-07 12:32:17 -07:00
ylink-lfs
d9de37d931 chore: typo invaILd occurrence replacement 2025-07-08 00:08:34 +08:00
PatrickLaabs
1ae1964e88 chore: depr. pointer pkg replacement for pkg/apis 2025-07-07 16:19:01 +02:00
PatrickLaabs
f966647b4d chore: depr. pointer pkg replacement for pkg/apis 2025-07-07 12:54:05 +02:00
ylink-lfs
ca1d7fff7f chore: remove utilpointer usage in pkg/apis/autoscaling 2025-07-05 11:45:52 +08:00
Kubernetes Prow Robot
3fdc11cbe0 Merge pull request #130230 from carlory/cleanup-CSIDriverRegistry
clean up CSIDriverRegistry
2025-07-04 15:25:31 -07:00
ylink-lfs
9016f9cb1b chore: remove utilpointer usage in conversion package 2025-07-04 09:29:47 +08:00
Kubernetes Prow Robot
8947e2fae0 Merge pull request #132115 from liangyuanpeng/drop-ptr-wrappers-pkg-apps
pkg/appis/apps: use utils/ptr package instead of utils/pointer
2025-07-03 14:43:25 -07:00
Kubernetes Prow Robot
2a4b5f6476 Merge pull request #132314 from thockin/jp_nicer_api_errors
Nicer value rendering in API errors
2025-07-03 01:33:33 -07:00
Adrian Moisey
19e7e38af2 Add unit test for Ingress service ref relaxed validation
Test the behaviour of feature gate RelaxedServiceNameValidation.
2025-07-02 12:57:32 +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
b430159c86 Allow Ingress service refs to be validated with apimachineryvalidation.NameIsDNSLabel
Only validate when feature gate RelaxedServiceNameValidation is enabled
or when the Ingess resource contains a service ref that already
validates with apimachineryvalidation.NameIsDNSLabel
2025-07-02 12:57:28 +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
Kubernetes Prow Robot
77b5304f60 Merge pull request #132638 from ylink-lfs/chore/admissionregistration_utilpointer_removal
chore: remove utilpointer usage in package pkg/apis/admissionregistration
2025-07-01 11:35:31 -07:00
Kubernetes Prow Robot
a9841ca3b3 Merge pull request #131790 from chengjoey/fix/sts-validation
fix pod template spec validation missing in sts
2025-07-01 09:21:31 -07:00
yongruilin
eecba765de Enable validation-gen on certificates/v1,v1alpha1&v1beta1
This enables generation but does not activate the strategy calling of
declarative.
2025-07-01 16:13:56 +00:00
Kubernetes Prow Robot
eb1b603cda Merge pull request #132472 from xiaoweim/validation-cleanup
Cleanup: Remove redundant detail messages in field.Required
2025-07-01 01:33:25 -07:00
ylink-lfs
764a8bc8b6 chore: remove utilpointer usage in package pkg/apis/admissionregistration 2025-07-01 09:10:58 +08:00
joey
dfd34a5b18 fix pod template spec validation missing in sts
Signed-off-by: joey <zchengjoey@gmail.com>
2025-06-27 16:30:51 +08:00
xiaoweim
8632257c93 Cleanup: Remove redundant detail messages in field.Required 2025-06-26 21:24:43 +00:00
Kubernetes Prow Robot
49c20d6f44 Merge pull request #132173 from dejanzele/feat/promote-job-pod-replacement-policy-ga
KEP-3939: Job Pod Replacement Policy; promote to GA
2025-06-24 07:04:28 -07:00
Tim Hockin
4ca91a0305 WIP: Fix tests
Notes:
* For types that define String() - should we prefer that or JSON?
* metav1.Time has a MarshalJSON() and inhereits a String() and they are
  different
* Since validation runs on internal types, we still get some GoNames
  instead of goNames.
2025-06-19 10:11:17 +09:00
Kubernetes Prow Robot
3e39d1074f Merge pull request #132221 from dims/new-cmp-diff-impl
New implementation for `Diff` (drop in replacement for `cmp.Diff`)
2025-06-16 18:02:58 -07: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
354520cd9b Merge pull request #131354 from tomoish/fix-netpol-podselector-doc
Fix: Clarify optional podSelector in NetworkPolicy docs and schema
2025-06-16 10:12:59 -07:00
Dejan Zele Pejchev
bccc9fe470 KEP-3939: Job Pod Replacement Policy; promote to GA
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
2025-06-16 16:26:03 +02:00
tomoish
7a95f3e478 Fix NetworkPolicy podSelector comments
Clarify that podSelector is optional and defaults to an empty selector,
matching all pods.
Replace “ingress rules” with “rules” to reflect both directions.

Update podSelector descriptions in NetworkPolicy documentation for clarity
2025-06-16 00:11:48 +09:00
Kubernetes Prow Robot
bb639c3dc7 Merge pull request #132313 from thockin/jp_invalid_ne_type_invalid
Use "Invalid" errors rather than "TypeInvalid"
2025-06-15 04:23:03 -07:00
Tim Hockin
384240b4d9 Use "Invalid" errors rather than "TypeInvalid" 2025-06-14 17:50:38 -07:00
Kubernetes Prow Robot
7e94ec9eac Merge pull request #132000 from pohly/dra-api-alpha3-removal
DRA API: remove obsolete types from v1alpha3
2025-06-12 09:39:12 -07:00
Kubernetes Prow Robot
d2af3329e9 Merge pull request #131214 from carlory/remove-unneeded-code
cleanup unneeded code
2025-06-12 09:39:04 -07: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
Kubernetes Prow Robot
4db16edaa8 Merge pull request #132054 from HirazawaUi/promote-4369-to-ga
[KEP-4369]: Graduate RelaxedEnvironmentVariableValidation to GA
2025-06-10 11:19:02 -07: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
Patrick Ohly
10de6780cf DRA API: remove obsolete types from v1alpha3
The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the
types and most structs became obsolete in v1.32 when we introduced v1beta1 and
bumped the storage version to v1beta1.

Removing them now simplifies adding new features because new fields don't need
to be added to these obsolete types. This could have been done already in 1.33,
but wasn't to minimize disrupting on-going work.
2025-06-06 12:06:28 +02:00
Lan Liang
258961cb35 pkg/appis/apps: use utils/ptr package instead of utils/pointer
The new k8s.io/utils/ptr package provides generic wrapper functions,
which can be used instead of type-specific pointer wrapper functions.
This replaces the latter with the former, and migrates other uses of
the deprecated pointer package to ptr in affacted files.

See kubernetes/utils#283 for details.

Signed-off-by: Lan Liang <gcslyp@gmail.com>
2025-06-05 05:30:59 +00:00
Rita Zhang
5058e385b0 DRAAdminAccess: update label key
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2025-05-27 21:19:25 -07:00
Joe Betz
1d17ca9b7e generate code 2025-05-24 00:03:35 -04:00