444 Commits

Author SHA1 Message Date
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
Tim Hockin
03f0110b95 Use +default for now deprecated RBD volume
THis leaves us less hand-written code and a better schema.
2024-06-19 11:58:26 -07:00
Michal Wozniak
551464fe53 Improve the Job API comment for ready field 2024-05-29 14:01:28 +02:00
Michal Wozniak
a517b4dcdf Fix the comment for the Job managedBy field 2024-05-13 13:31:58 +02:00
wen.rui
af2a43f0ab Use ptr.Equal to compare the value 2024-05-08 09:21:22 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Michal Wozniak
79fe37537c Adjust the validation to the current state 2024-03-08 17:43:24 +01:00
Michal Wozniak
1163c7ed9c Adjust the API comments to the current state 2024-03-08 17:29:49 +01:00
Yuki Iwai
e216742672 Job: Support for the JobSuccessPolicy (alpha)
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-03-08 05:49:09 +09:00
Michał Woźniak
e568a77a93 Support for the Job managedBy field (alpha) (#123273)
* support for the managed-by label in Job

* Use managedBy field instead of managed-by label

* Additional review remarks

* Review remarks 2

* review remarks 3

* Skip cleanup of finalizers for job with custom managedBy

* Drop the performance optimization

* imrpove logs
2024-03-05 09:25:15 -08:00