Commit graph

453 commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
c9525d3865
Merge pull request #120629 from Rei1010/pointerClean
Use ptr.Equal to compare the value
2024-10-23 01:17:07 +01:00
Michal Wozniak
70a8ceb6f0 Graduate JobManagedBy to Beta in 1.32
# Conflicts:
#	pkg/features/kube_features.go
2024-10-17 09:01:54 +02:00
Stephen Kitt
ff3e9ea79f
pkg/api(s): drop pointer wrapper functions
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.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-09-23 23:00:34 +02:00
Joe Betz
2595aa1309 generate 2024-09-03 14:26:26 -04:00
Yuki Iwai
551931c6a8 Graduate the JobSuccessPolicy to beta
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-23 09:29:06 +09:00
Michal Wozniak
f1233ac5e0 JobPodFailurePolicy to GA
# Conflicts:
#	pkg/controller/job/job_controller_test.go
2024-07-12 17:21:32 +02:00
Michal Wozniak
70c4965270 Add more test cases for SuccessCriteriaMet
Cleanup error messages in the new code

Add validation for the Job controller fields
2024-07-12 11:22:26 +02:00
Michal Wozniak
fb7704ba03 Delay setting terminal Job conditions until all pods are terminal
Fix the integration test typecheck

Fix after rebase

# Conflicts:
#	pkg/controller/job/job_controller_test.go
2024-07-11 20:54:09 +02:00
Kubernetes Prow Robot
cdcaea687c
Merge pull request #125751 from ahg-g/elastic-job
Graduate ElasticIndexedJob to GA
2024-07-11 11:08:24 -07:00
Michael Fraenkel
cd949bafa4
use MakePodSpec consistently (#125805)
cleaning up some tests after MakePod/MakePodSpec were introduced
2024-06-30 10:28:36 -07:00
Michael Fraenkel
a7264f95ff
pod terminationGracePeriodSeconds is always valid (#124461)
* Pod terminationGracePeriodSeconds is always valid

Validation of a pod spec will always use the pod's
TerminationGracePeriodSeconds value.

A set of pod test-helpers have been created to help construct Pods.

* remove unused func

* reduction

* reduce 2

* simplify test

* report invalid grace period

* update SupplementalGroupPolicy tests
2024-06-29 18:09:29 -07:00
ahg-g
be410c0dae Graduate ElasticIndexedJob to GA 2024-06-28 17:00:29 +00:00
Tim Hockin
a074dd6f2e
Use +default for now deprecated ScaleIO volume 2024-06-19 12:18:33 -07:00
Tim Hockin
0f5ab4beec
Use +default for now deprecated AzureDisk volume 2024-06-19 11:59:52 -07:00
Tim Hockin
333c02cf28
Use +default for now deprecated ISCSI volume 2024-06-19 11:59:20 -07:00