Commit Graph

135624 Commits

Author SHA1 Message Date
vladikkuzn
70165283df Automate adding kind/* labels to cherry-pick PRs 2026-02-18 02:31:18 +02:00
Kubernetes Prow Robot
31bf3ed48b Merge pull request #137019 from olamilekan000/add-a-show-secret-flag-in-diff-command
add show-secret flag to the diff command
2026-02-16 19:44:10 +05:30
Kubernetes Prow Robot
c99adcec1a Merge pull request #136799 from omerap12/external-metrics-e2e
Add e2e test for external metrics
2026-02-16 19:44:02 +05:30
Kubernetes Prow Robot
18865bef41 Merge pull request #136411 from olamilekan000/fix-cli-throwing-an-error-when-tailing-logs
fix cli throwing an error when trying to tail the logs for a Pod
2026-02-16 18:00:00 +05:30
olalekan odukoya
5b3b05921f fix cli throwing an error when trying to follow logs for pod while still initializing
Signed-off-by: olalekan odukoya <odukoyaonline@gmail.com>
2026-02-16 12:34:43 +01:00
Kubernetes Prow Robot
f067ad1e8f Merge pull request #135715 from darshansreenivas/dtumkur-pr-network-tag-cidr
networkpolicy: migrate ipBlock.cidr validation to DV
2026-02-16 07:01:58 +05:30
darshansreenivas
bc17031d19 network: migrate CIDR validation to DV
Co-authored-by: Abhishek Srivastava <abhishek@asrivas.me>
2026-02-15 16:00:41 -08:00
Kubernetes Prow Robot
8d835ffd33 Merge pull request #137037 from atombrella/feature/proxy_utils_net_joinhost
proxy/utils: Use net.JoinHostPort to format address.
2026-02-16 04:19:59 +05:30
Kubernetes Prow Robot
9210644161 Merge pull request #136501 from adrianmoisey/remove-CustomMetricsAutoscaling
Remove unused variable CustomMetricsAutoscaling
2026-02-15 21:23:58 +05:30
Mads Jensen
bbbc09fb11 proxy/utils: Use net.JoinHostPort to format address. 2026-02-15 16:53:17 +01:00
Kubernetes Prow Robot
4811b20170 Merge pull request #136588 from abel-von/split-slices
dra: split slices to "shared" and "on node"
2026-02-14 08:35:59 +05:30
Kubernetes Prow Robot
574b3aad0f Merge pull request #136998 from yongruilin/master-vg_hpa-ifenable
Migrate HPA MinReplicas to Declarative Validation with Feature Gate Support
2026-02-14 06:59:58 +05:30
yongruilin
8dd711ea80 address feedback: pass HPAScaleToZero option when already in use 2026-02-13 22:50:16 +00:00
olalekan odukoya
03060174b8 add show-secret flag to the diff command
Signed-off-by: olalekan odukoya <odukoyaonline@gmail.com>
2026-02-13 22:48:51 +01:00
Kubernetes Prow Robot
18c8b8c4d3 Merge pull request #136896 from aaron-prindle/modal-validation-upstream
Implement declarative modal validation (+k8s:discriminator and +k8s:member)
2026-02-14 03:08:00 +05:30
Aaron Prindle
5f3bb4a434 feedback: Remove disallowed tags logic from discriminator validator 2026-02-13 20:34:12 +00:00
Kubernetes Prow Robot
638bdc9df6 Merge pull request #136993 from hdp617/patch-1
Update cloud-controller-manager image version to v35.0.2
2026-02-14 00:44:00 +05:30
Aaron Prindle
70b90d9898 feedback: Address review comments
- Rename type params to Tstruct/Tfield/Tdisc for Subfield consistency
- Make DiscriminatedRule.Value generic over Tdisc and emit typed literals
- Move discriminator assignment adjacent to value assignment
- Fix mockEqual to test value equivalence and add pointer test
- Add test for value changed with discriminator unchanged
- Add regex validation for discriminator group names
- Disallow "default" as an explicit discriminator group name
- Add directComparable cross-reference comment for ratcheting
- Rename mode/modal terminology to discriminator/member
2026-02-13 18:18:52 +00:00
Aaron Prindle
98c52ccfd7 Update staging/src/k8s.io/code-generator/cmd/validation-gen/validators/mode.go
Co-authored-by: Joe Betz <jpbetz@google.com>
2026-02-13 18:18:35 +00:00
Aaron Prindle
7e5cd910a4 Fix compilation errors from cherry-picks 2026-02-13 18:18:28 +00:00
Aaron Prindle
c04c60f408 Implement declarative modal validation (+k8s:discriminator and +k8s:member)
This introduces state-based validation to declarative validation via the +k8s:discriminator and +k8s:member tags.

Key changes:
- Added validate.Modal runtime function to handle state-based logic, including full ratcheting support (skipping validation on Update if discriminator and value are unchanged).
- Implemented +k8s:discriminator to identify the controlling field (supports string, int, and bool).
- Implemented +k8s:member to map discriminator values to validation rules.
- Added implicit "forbidden-by-default" logic for unhandled modes, with support for pointer, slice, and map types.
2026-02-13 18:16:25 +00:00
Aaron Prindle
d59cfc969d Add MultiWrapperFunction to support bundling multiple validations
This introduces MultiWrapperFunction to the generator AST, allowing multiple validation functions to be bundled into a single emitted closure. It correctly handles short-circuiting logic for the wrapped functions.
2026-02-13 09:15:17 -08:00
Kubernetes Prow Robot
23ea1ec286 Merge pull request #135769 from vshkrabkov/cleanup/unsch-pods-remove-recorder-nil-check
Remove nil checks for unschedulable pods metrics recorder
2026-02-13 18:03:59 +05:30
Kubernetes Prow Robot
5467a9f9e2 Merge pull request #135028 from itzPranshul/master-vg-enable-clusterRole
rbac: migrate PolicyRule.verbs to Declarative Validation
2026-02-13 10:27:59 +05:30
Kubernetes Prow Robot
ec2c7739bc Merge pull request #135808 from tico88612/cleanup/SeparateCacheWatchRPC
SeparateCacheWatchRPC LockToDefault set true
2026-02-13 08:53:59 +05:30
Kubernetes Prow Robot
1132395d4a Merge pull request #136793 from yongruilin/master_vg-strategy-alpha
KEP-5073:  Declarative Validation Lifecycle Update
2026-02-13 07:16:00 +05:30
yongruilin
33dec2246f address feedback: refactor declarative validation migration checks
- Extract HV error filtering into filterHandwrittenErrors for readability.
- Simplify errOutputMatcherByStability initialization in testing helpers.
2026-02-13 00:54:18 +00:00
yongruilin
d1b805f41e Mark scheduling Workload validation as Alpha in test 2026-02-13 00:54:18 +00:00
yongruilin
93b901d177 Enhance validation testing: add support for all declarative rules enforcement 2026-02-13 00:54:18 +00:00
yongruilin
3470dbd96e address feedback: add IsAlpha/IsBeta helpers for ValidationStabilityLevel
Introduce IsAlpha() and IsBeta() helper methods on field.Error to
encapsulate stability level checks. Unexport the underlying
ValidationStabilityLevel constants to keep the API surface minimal.
Update the apiserver's validation logic to use these helpers.
2026-02-13 00:54:18 +00:00
yongruilin
4d2a2abdee scheduling/workload: fix tests requiring RequestInfo for declarative validation
- Update resttest and genericregistrytest to support RequestInfo injection.
- Inject RequestInfo in Workload storage and strategy tests to resolve context-related failures.
- Refine validate.go log messages and error deduplication logic.
2026-02-13 00:54:18 +00:00
yongruilin
4f56a298cc Enforce zero mismatches in validation equivalence testing 2026-02-13 00:54:18 +00:00
yongruilin
2ef358870a Update validation equivalence testing for lifecycle enforcement
- Test scenarios: Beta Enabled, Beta Disabled, and Legacy (emulated 1.35).
- Remove deprecated Takeover gate references and redundant coverage checks.
- Add TODO to remove legacy emulation in 1.39.
- Update documentation to match the new Validation Lifecycle strategy.
2026-02-13 00:54:18 +00:00
yongruilin
a972411936 opt-in Workload v1alpha1 to explicit declarative enforcement
Mark Workload v1alpha1 validations as +k8s:alpha(since:"1.35") and
configure the registry strategy to use WithDeclarativeEnforcement().
This transitions the resource to the stability-based validation lifecycle,
where enforcement is determined by tag stability and feature gates.
Includes generated code updates.
2026-02-13 00:54:18 +00:00
yongruilin
069f913681 Update mismatch checking to support Validation Lifecycle stages
- Rename takeover to enforced in mismatch checking logic and comments.
- Update recommendation messages to refer to DeclarativeValidationBeta.
- Ensure Alpha-level mismatches always recommend "HV authoritative" (shadowed).
- Filter mismatch candidates by lifecycle stage when explicit enforcement is active.
- Refactor mismatch tests to cover Alpha/Beta scenarios and remove redundancy.
2026-02-13 00:54:18 +00:00
yongruilin
eceed007d3 Implement DeclarativeValidationBeta and Validation Lifecycle strategy
- Introduce WithDeclarativeEnforcement to opt-in to the lifecycle model.
- Update ValidateDeclarativelyWithMigrationChecks to:
    - Enforce Beta-level validations when DeclarativeValidationBeta is enabled.
    - Shadow Alpha-level validations.
    - Filter handwritten errors only for Beta-level validations (when enabled).
    - Limit mismatch checking to Alpha and Beta stages when enforcement is enabled.
- Deprecate WithDeclarativeNative and DeclarativeNative field in field.Error.
- Add comprehensive lifecycle tests and clean up redundant test cases.
2026-02-13 00:54:17 +00:00
yongruilin
0c679cea68 Introduce DeclarativeValidationBeta and deprecate Takeover gate
This change introduces the DeclarativeValidationBeta feature gate in v1.36
as the global safety switch for Beta-stage validation rules and marks
DeclarativeValidationTakeover as deprecated.

Following KEP-5073.
2026-02-13 00:54:11 +00:00
Kubernetes Prow Robot
fb78de873a Merge pull request #136824 from cnuss/issues/136823
client-go: Replace deprecated BackoffManager with DelayFunc in Reflector
2026-02-13 06:10:07 +05:30
Kubernetes Prow Robot
9571e19da9 Merge pull request #134675 from JoelSpeed/enable-kal-optionalorrequired-apiserver-internal
Enforce either optional or required tag on apiserverinternal API group
2026-02-13 06:10:00 +05:30
Kubernetes Prow Robot
b72e248c25 Merge pull request #136953 from lalitc375/revert-dv-native
Revert dv native in the validation-gen framework
2026-02-13 04:44:10 +05:30
Kubernetes Prow Robot
47e2318e85 Merge pull request #136952 from dgrisonnet/kubelet-metrics-provider
Add kubelet_metrics_provider metric
2026-02-13 04:44:00 +05:30
Kubernetes Prow Robot
7f13600dad Merge pull request #136400 from vinayakankugoyal/gitrepo
KEP:5040 Lock gitRepo Volume Driver to disabled.
2026-02-13 03:58:10 +05:30
Kubernetes Prow Robot
03da245585 Merge pull request #134827 from michaelasp/rvStore
Add Resource Version query and Bookmarks to thread safe store
2026-02-13 03:58:00 +05:30
Christian Nuss
33ebd41b2c client-go: Replace deprecated BackoffManager with DelayFunc in Reflector
Move backoff documentation comments to var block for better discoverability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 17:18:14 -05:00
yongruilin
c9c926a96c test: add ratcheting test case for HPA MinReplicas 2026-02-12 21:57:39 +00:00
yongruilin
36fcbaef23 test: add declarative validation tests for HPA MinReplicas 2026-02-12 21:23:41 +00:00
yongruilin
09681e23a2 feat: migrate HorizontalPodAutoscalerSpec.MinReplicas to declarative validation 2026-02-12 21:23:41 +00:00
Kubernetes Prow Robot
d7f6f91dae Merge pull request #135820 from pohly/dra-sharing-claim-sequentially-test
DRA: sharing claim sequentially test
2026-02-13 01:50:09 +05:30
Kubernetes Prow Robot
0ba7bf5716 Merge pull request #135503 from aojea/externalname_repairip
repairip externalname to cluster ip type
2026-02-13 01:50:01 +05:30
Joel Speed
82a9a99a44 Restore omitempty on ServerStorageVersion fields 2026-02-12 18:55:47 +00:00