Commit graph

468 commits

Author SHA1 Message Date
Yongrui Lin
d1c82cbeb2 Regenerate validation code and protobuf for toleration migration
Output of hack/update-codegen.sh.
2026-06-11 06:35:28 +00:00
Yongrui Lin
724809a4bc Regenerate batch generated code 2026-06-08 21:58:29 +00:00
Yongrui Lin
a9b594be6a Mark MaxFailedIndexes dependency error as covered by declarative
Adds .WithOrigin("dependentRequired").MarkCoveredByDeclarative() so the
parity matcher (ByType+ByOrigin) identifies the declarative counterpart.
2026-06-08 21:58:29 +00:00
Lalit Chauhan
0c84f84ec8 Fix wrong marking of errors 2026-06-03 19:33:53 +00:00
Maciej Szulik
c35fd21a6b
Drop JobPodReplacementPolicy after the feature GA-ed in 1.34
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-07 12:05:44 +02:00
Lalit Chauhan
89fb0b9b3e Generate validation code 2026-05-02 00:09:53 +00:00
zak905
04286814e7 clean up: remove loop variable capture 2026-04-28 23:53:27 +02:00
Tim Hockin
685199b229
Add whitespace in DV ratcheting 2026-04-28 12:08:35 -07:00
Tim Hockin
a557aa7e80
Add whitespace in DV func bodies 2026-04-28 09:19:24 -07:00
Tim Hockin
edf080f056
Add whitespace in DV func signatures 2026-04-28 09:12:24 -07:00
Tim Hockin
8950aac006
Add whitespace in DV register func 2026-04-28 09:12:19 -07:00
Joe Betz
1fafa91da4
Consolidate DeclarativeValidationStrategy interface 2026-04-27 19:26:25 -04:00
Kubernetes Prow Robot
5edd1a9741
Merge pull request #136585 from zhzhuang-zju/job-validation
Improve error message for immutable job.status.startTime
2026-03-06 22:22:19 +05:30
zhzhuang-zju
8cd55303b1 fix the misleading error msg when updating job.status.startTime
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2026-03-04 10:52:59 +08:00
Your Name
701db6b6a6 validation-gen: Fix all stable api violations by prefixing +k8s:alpha(since:"1.36") and exclude output_tests from linting 2026-02-25 00:50:31 +00:00
Dan Roach
5b5cc2d498 Adding declarative validations to CronJob 2026-01-15 14:05:15 -07:00
Kubernetes Prow Robot
36622966a8
Merge pull request #132441 from kannon92/poc-job-relax-pod-template
[KEP-5440]: MutablePodResourcesForSuspendedJobs
2025-11-05 11:26:50 -08:00
Kevin Hannon
7db5311952 feat: Add MutablePodResourcesForSuspendedJobs feature gate
- Add feature gate to control mutable pod resources for suspended jobs
- Implement validatePodResourceUpdatesOnly function to allow only container resource updates
- Allow resource updates for suspended jobs regardless of whether they have started
- Add comprehensive unit and integration tests for all scenarios including started-then-suspended
- Ensure backward compatibility when feature gate is disabled

This enables users to update container resources on suspended jobs, including jobs that
have previously started and been suspended, while maintaining immutability for all other
pod template fields.
2025-11-05 10:38:05 -05:00
Kubernetes Prow Robot
97cb47a913
Merge pull request #135080 from dejanzele/feat/promote-job-managedby-to-ga
KEP-4368: Job Managed By; Promote to GA
2025-11-04 13:42:12 -08:00
Dejan Zele Pejchev
3dabd4417d
KEP-4368: Job Managed By; Promote to GA
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
2025-11-04 10:59:45 +01:00
Dejan Zele Pejchev
bbd44717c1
fix: allow job startTime updates on resume from suspended state
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
2025-10-26 18:26:30 +01:00
PersistentJZH
b738e8c3ca fix panic in cron.ParseStandard
Signed-off-by: PersistentJZH <zhihao.kan17@gmail.com>

fix

optimize logic

fix unit test
2025-10-10 23:51:05 +08:00
Tim Hockin
2d48dae391 Eliminate public ValidateReplicationControllerName
Everyone who referenced it now uses the underlying function.  Clearer
and frees me up to change objectMeta validation without impacting anyone
else.
2025-10-01 19:45:37 +00:00
Harry Li
f1ceec70a6
feat(apis/batch): PodFailurePolicyOnPodConditionsPattern.Status can be omitted (#133479)
* feat(apis/batch): PodFailurePolicyOnPodConditionsPattern.Status can be omitted

Signed-off-by: Harry Li <bertram_li@163.com>

* chore: update generated files after API changes

---------

Signed-off-by: Harry Li <bertram_li@163.com>
Co-authored-by: Harry Li <bertram_li@163.com>
2025-08-27 18:30:08 -07:00
Kubernetes Prow Robot
3e211097c7
Merge pull request #132810 from PatrickLaabs/132790-2
chore: removing redundant type conversion
2025-07-22 15:06:26 -07: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
xiaoweim
740e568468 address review comments 2025-07-14 18:13:00 +00:00
xiaoweim
61542e7a98 Cleanup: Remove field name from invalid field detail message 2025-07-14 18:13:00 +00:00
PatrickLaabs
54f86a22e8 chore: removing redundant type conversion 2025-07-08 15:45:46 +02:00
PatrickLaabs
1ae1964e88 chore: depr. pointer pkg replacement for pkg/apis 2025-07-07 16:19:01 +02: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
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
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
carlory
c6f652d5fe Refactor pod failure policy defaults 2025-04-29 14:58:57 +08:00
Kubernetes Prow Robot
93cc525932
Merge pull request #131333 from tenzen-y/fix-successpolicy-api-comment
Job: Fix API comments for SuccessCriteriaMet
2025-04-23 18:20:58 -07:00
Yuki Iwai
db1e107150 Job: Fix API comments for SuccessCriteriaMet
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2025-04-17 00:42:26 +09:00
Michal Wozniak
8f1326251c Improve Job API comment for the backoffLimit 2025-04-14 09:51:51 +02:00
Kubernetes Prow Robot
04fb7ac18b
Merge pull request #130536 from tenzen-y/promote-successpolicy-to-ga
KEP-3998: Promote JobSuccessPolicy to Stable
2025-03-13 13:27:54 -07:00
Tim Hockin
e54719bb66
Use randfill, do API renames 2025-03-08 15:18:00 -08:00
Yuki Iwai
749f03a49f Gradeate Job SuccessPolicy to Stable
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2025-03-07 07:21:12 +09:00
Kubernetes Prow Robot
aad87f2ee9
Merge pull request #130388 from thockin/error_matcher_and_origin
Add an error matcher, convert 2 tests
2025-02-28 17:14:55 -08:00
Tim Hockin
c8111709e5
Add an error matcher, convert 2 tests
I fixed up the TestValidateEndpointsCreate path to show the matcher
instead of manual origin checking.

I picked TestValidateTopologySpreadConstraints because it was the last
failing test on my screen when I changed on of the commonly hard-coded
error strings. I fixed exactly those validation errors that were needed
to make this test pass.  Some of the Origin values can be debated.

The `field/testing.Matcher` interface allows tests to configure the
criteria by which they want to match expected and actual errors.  The
hope is that everyone will use Origin for Invalid errors.

There's some collateral impact for tests which use exact-comparisons and
don't expect origins.  These are all candidates for using the matcher.
2025-02-28 08:36:26 -08:00
Michal Wozniak
a91ed902fe Graduate Backoff Limit Per Index as stable
Reenable the JobBackoffLimitPerIndex_Reenabling integration test
2025-02-26 17:06:37 +01:00
Michal Wozniak
523ed5498e Fix comment for FailIndex as JobBackoffLimitPerIndex is beta 2025-02-10 09:17:18 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
ndixita
85488b5f10 Generated files and compatability data from API changes 2024-11-08 03:00:50 +00:00
Tim Hockin
c8eeb486f4
Call-site comments: the "" arg to TooLong is unused 2024-11-05 15:10:24 -08:00
Tim Hockin
8a7af90300
Clarify that value arg to field.TooLong is unused 2024-11-05 15:10:23 -08:00
Tim Hockin
4d0e1c8fd4
Kill TooLongMaxLength() in favor of TooLong() 2024-11-05 15:10:22 -08:00
Michal Wozniak
cad648035a Job Pod Failure policy - cover testing of negative exit codes 2024-10-28 07:24:26 +01:00