Commit Graph

128952 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
be32ca61a6
Merge pull request #127612 from carlory/make-scheduler-test-independent
make each scheduler test independent
2025-03-13 00:47:47 -07:00
carlory
aab7a079fa make each scheduler test independent
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-13 14:39:50 +08:00
carlory
27706a0b54 Add quota support for PVC with VolumeAttributesClass
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-13 13:50:44 +08:00
Kubernetes Prow Robot
9acdca64e0
Merge pull request #130724 from jpbetz/replication-controller-to-declarative
Enable Declarative Validation for ReplicationController
2025-03-12 22:41:53 -07:00
Kubernetes Prow Robot
7f818e9f02
Merge pull request #130602 from tallclair/allocation-checkpoint-optimization
Allocation checkpoint cleanup
2025-03-12 22:41:46 -07:00
Kubernetes Prow Robot
92d7e55abd
Merge pull request #129886 from danwinship/endpointslice-api-notes
Try to clarify EndpointSlice semantics some more
2025-03-12 21:19:53 -07:00
Kubernetes Prow Robot
96dd5508f6
Merge pull request #129714 from esotsal/fix-reset-injector-because-cri-proxy-undefined
testing: Skip test if cri proxy is disabled or undefined
2025-03-12 21:19:46 -07:00
Kubernetes Prow Robot
6549f52b97
Merge pull request #130757 from BenTheElder/delete-dead-script
delete hack/test-integration.sh
2025-03-12 20:13:59 -07:00
Kubernetes Prow Robot
761f5646be
Merge pull request #130138 from rata/userns-enabled-by-default
features: Enable user namespaces by default
2025-03-12 20:13:48 -07:00
zhangzhifei16
2db729cfa4 Add flatz to kubelet auth.
Fix: Move flagz to InstallDebuggingHandlers.

Move flagz  to the lower switch statemen

Fix linter

Drop the function parameter for the read-only server.
2025-03-13 10:11:59 +08:00
Kubernetes Prow Robot
7b6c56e5fb
Merge pull request #130135 from saschagrunert/image-volume-beta
[KEP-4639] Graduate image volume sources to beta
2025-03-12 18:03:58 -07:00
Kubernetes Prow Robot
05bfdbc6dd
Merge pull request #129950 from ffromani/alignment-error-detail-metrics
node: metrics for alignment failures
2025-03-12 18:03:46 -07:00
Joe Betz
ed08387663 Enable versioned validation fuzz testing for core v1 group 2025-03-12 19:53:47 -04:00
Joe Betz
b5bc283808 ReplicationController: Add declarative validation test suite
Introduce a test suite that ensures declarative test cases
are fully tested and that validation errors are compared
with handwritten validation to ensure consistency.

Co-authored-by: Tim Hockin <thockin@google.com>
Co-authored-by: Aaron Prindle <aprindle@google.com>
Co-authored-by: Yongrui Lin <yongrlin@google.com>
2025-03-12 19:53:44 -04:00
Joe Betz
5a5ed81e1f ReplicationController: Enable declarative validation
After declarative validation is enabled in the ReplicationController
strategy in this way, the generated declarative validation code
in pkg/apis/core/v1/zz.generated.validations.go will be run
when the strategy validates ReplicationController.

Co-authored-by: Tim Hockin <thockin@google.com>
Co-authored-by: Aaron Prindle <aprindle@google.com>
Co-authored-by: Yongrui Lin <yongrlin@google.com>
Co-authored-by: David Eads <deads@redhat.com>
2025-03-12 19:51:31 -04:00
lauralorenz
256a576651 Add featuregate, feature and unit and e2e tests
Signed-off-by: lauralorenz <lauralorenz@google.com>
Signed-off-by: Laura Lorenz <lauralorenz@google.com>
2025-03-12 23:43:16 +00:00
Kubernetes Prow Robot
2261137135
Merge pull request #122550 from danwinship/tighten-ip-validation
Tighten IP/CIDR validation
2025-03-12 15:57:46 -07:00
Tim Allclair
e8547d8a54 Cleanup unused container parameter from allocation state Delete 2025-03-12 15:19:38 -07:00
Tim Allclair
05a9c06212 Don't update checkpoint file for deletion 2025-03-12 15:19:14 -07:00
Tim Allclair
30bca329c5 Don't re-write the checkpoint file when the content is unchanged 2025-03-12 15:11:39 -07:00
Tim Hockin
e856356225 Enable validation-gen on core/v1
This enables generation but does not activate the strategy calling of
declarative.
2025-03-12 18:05:20 -04:00
Kubernetes Prow Robot
c79d3ce434
Merge pull request #130758 from BenTheElder/integration-concur
stop overriding max concurrency in CI, let automax procs handle it
2025-03-12 14:51:48 -07:00
Benjamin Elder
9e42056a0d stop overriding max concurrency in CI, let automax procs handle it 2025-03-12 13:45:48 -07:00
Benjamin Elder
cb7afbccf6 delete hack/test-integration.sh
this script has exited non-zero after telling the user to call make test-integration for 5+ years now

we should just drop it
2025-03-12 13:41:45 -07:00
Kubernetes Prow Robot
8456726952
Merge pull request #130749 from aramase/aramase/c/kep_4412_typedef_get_sa
Define type alias for getServiceAccount function
2025-03-12 13:36:20 -07:00
Kubernetes Prow Robot
6c3332e870
Merge pull request #130747 from soltysh/exec_context
kubectl: expose context parameter in DefaultRemoteExecutor
2025-03-12 13:36:10 -07:00
Kubernetes Prow Robot
69467d3547
Merge pull request #130648 from jpbetz/semver-tolerant
Enable Semver CEL library, add normalization support
2025-03-12 13:36:01 -07:00
Kubernetes Prow Robot
d70bfc8e86
Merge pull request #130636 from serathius/watchcache-integration-test
Move setup in TestListOptions before we start API server
2025-03-12 13:35:54 -07:00
Kubernetes Prow Robot
9693eea5c3
Merge pull request #128824 from yongruilin/flagz-controller-manager
feat: Add flagz endpoint for kube-controller-manager
2025-03-12 13:35:47 -07:00
Aaron Prindle
08745086e2 chore: change Info->Error log level related to declarative validation runtime tests and refactor panic wrapper names 2025-03-12 20:27:47 +00:00
Jefftree
3b88db4f23 Promote CLE to beta 2025-03-12 19:25:30 +00:00
Jefftree
a7505f0262 generated 2025-03-12 19:25:30 +00:00
Kubernetes Prow Robot
21f7eaa8e2
Merge pull request #130705 from aaron-prindle/validation-gen-add-metric-and-runtime-verification-upstream
[Declarative Validation] feat: add declarative validation metrics and associated runtime verification tests
2025-03-12 11:29:54 -07: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
Jefftree
5ba4a90fda Add LeaseCandidate v1beta1 2025-03-12 17:52:10 +00:00
Marek Siarkowicz
a0cc02e264 Simplify shouldDelegateList
When ResourceVersionMatch is set to NotOlderThan, there is no need to handle continue or resourceVersion="".
The validation in apimachinery will not pass and return:
* "resourceVersionMatch is forbidden when continue is provided"
* "resourceVersionMatch is forbidden unless resourceVersion is provided"
2025-03-12 18:24:01 +01:00
Anish Ramasekar
b27735be2e
Define type alias for getServiceAccount function
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-03-12 10:08:46 -07:00
Kubernetes Prow Robot
fb98a599a6
Merge pull request #130748 from jpbetz/revert-125102
Revert PR 125102: Add unit tests to client-go/tools/cache/listers.go
2025-03-12 09:49:47 -07:00
Dan Winship
ad22c0d495 Fix IP/CIDR validation to allow updates to existing invalid objects
Ignore pre-existing bad IP/CIDR values in:
  - pod.spec.podIP(s)
  - pod.spec.hostIP(s)
  - service.spec.externalIPs
  - service.spec.clusterIP(s)
  - service.spec.loadBalancerSourceRanges (and corresponding annotation)
  - service.status.loadBalancer.ingress[].ip
  - endpoints.subsets
  - endpointslice.endpoints
  - networkpolicy.spec.{ingress[].from[],egress[].to[]}.ipBlock
  - ingress.status.loadBalancer.ingress[].ip

In the Endpoints and EndpointSlice case, if *any* endpoint IP is
changed, then the entire object must be valid; invalid IPs are only
allowed to remain in place for updates that don't change any IPs.
(e.g., changing the labels or annotations).

In most of the other cases, when the invalid IP is part of an array,
it can be moved around within the array without triggering
revalidation.
2025-03-12 12:41:32 -04:00
Maciej Szulik
78e58b8c49
kubectl: expose context parameter in DefaultRemoteExecutor
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-03-12 17:02:00 +01:00
Joe Betz
37ddc637f5 Revert PR 125102: Add unit tests to client-go/tools/cache/listers.go 2025-03-12 11:43:34 -04:00
Kubernetes Prow Robot
caf541857f
Merge pull request #130673 from gauravkghildiyal/kep-4444-ga
Promote ServiceTrafficDistribution feature-gate to GA and update docs with latest descriptions
2025-03-12 08:23:47 -07:00
Kubernetes Prow Robot
1c756849d6
Merge pull request #130591 from fmuyassarov/devel/logging
Refine logging levels in job, IPAM, and replicaSet
2025-03-12 07:13:47 -07:00
Dan Winship
692785d25b Add legacy versions of IsValidIP/IsValidCIDR
Add validation.IsValidIPForLegacyField and
validation.IsValidCIDRForLegacyField, which validate "legacy" IP/CIDR
fields correctly. Use them for all such fields (indirectly, via a
wrapper in pkg/apis/core/validation that handles the
StrictIPCIDRValidation feature gate correctly).

Change IsValidIP and IsValidCIDR to require strict parsing and
canonical form, and update the IPAddr, ServiceCIDR, and
NetworkDeviceData validation to make use of them.
2025-03-12 09:58:04 -04:00
Marek Siarkowicz
ac6790450a Move TestListOptions setup before we start API server
This PR changes the TestListOptions setup to execute compaction before
we start apiserver allowing the test work with cache snapshots from
KEP-4988 by preventing creation of snapshots for compacted revisions.

While etcd compaction removes access to old revision, with KEP-4988
those revisions will be still available in watch cache. Implementing
compaction for watch cache doesn't make sense as it would only be
used for testing, making it unreliable.

To properly test how etcd and watch cache behaves on
compacted revisions we need to compact etcd before we start apiserver.
2025-03-12 14:52:34 +01:00
Dan Winship
ba189de78f Slightly improve EndpointSlice address validation
Because it used both IsValidIPv4Address and ValidateEndpointIP,
EndpointSlice validation produced duplicate error messages when given
an invalid IP. Fix this by calling IsValidIP first, and only doing the
other checks if that one fails.

Also, since no one else was using the IsValidIPv4Address and
IsValidIPv6Address methods anyway, just inline them into the
EndpointSlice validation, so we don't have to worry about "should they
do legacy or strict validation" later.
2025-03-12 09:37:39 -04:00
Dan Winship
fc4bb4fdb9 Add validation.IsValidInterfaceAddress
Split "ifaddr"-style ("192.168.1.5/24") validation out of IsValidCIDR.
Since there is currently only one field that uses this format, and it
already requires canonical form, IsValidInterfaceAddress requires
canonical form unconditionally.
2025-03-12 09:37:39 -04:00
Dan Winship
f79bccf4d9 validation unit test cleanups
Fix some incorrect test case names.

Use t.Run() in a few more places (to facilitate using
SetFeatureGateDuringTest later).

Clarify TestPodIPsValidation/TestHostIPsValidation (and fix
weird indentation).
2025-03-12 09:37:39 -04:00
Dan Winship
76f1684117 Rename ValidateNonSpecialIP to ValidateEndpointIP
There is not a single definition of "non-special IP" that makes sense
in all contexts. Rename ValidateNonSpecialIP to ValidateEndpointIP and
clarify that it shouldn't be used for other validations.

Also add a few more unit tests.
2025-03-12 09:37:39 -04:00
Kubernetes Prow Robot
e0ab1a16ad
Merge pull request #128372 from aramase/aramase/f/kep_4412_alpha_impl
KSA token for Kubelet image credential providers alpha
2025-03-12 00:39:50 -07:00