Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Change the default value of CleanPodPolicy to None and fix golangci-l…
Browse files Browse the repository at this point in the history
…int staticcheck.

Signed-off-by: Syulin7 <735122171@qq.com>
  • Loading branch information
Syulin7 committed Feb 13, 2023
1 parent 9ec55d1 commit 43e3a2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/common/v1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/common/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const (
// active.
type RunPolicy struct {
// CleanPodPolicy defines the policy to kill pods after the job completes.
// Default to Running.
// Default to None.
CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty"`

// TTLSecondsAfterFinished is the TTL to clean up jobs.
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller.v1/common/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func TestCleanupJobIfTTL(T *testing.T) {
}
oneDayAgo := time.Now()
// one day ago
oneDayAgo.AddDate(0, 0, -1)
_ = oneDayAgo.AddDate(0, 0, -1)
jobStatus := apiv1.JobStatus{
CompletionTime: &metav1.Time{
Time: oneDayAgo,
Expand Down

0 comments on commit 43e3a2e

Please sign in to comment.