Skip to content

Commit e94befa

Browse files
authored
Merge pull request kubernetes#71844 from soltysh/describe_cronjob
Add failed and successful history limits to cronjob describe
2 parents 611c351 + 14aa4b8 commit e94befa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/kubectl/describe/versioned/describe.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,16 @@ func describeCronJob(cronJob *batchv1beta1.CronJob, events *corev1.EventList) (s
20732073
w.Write(LEVEL_0, "Schedule:\t%s\n", cronJob.Spec.Schedule)
20742074
w.Write(LEVEL_0, "Concurrency Policy:\t%s\n", cronJob.Spec.ConcurrencyPolicy)
20752075
w.Write(LEVEL_0, "Suspend:\t%s\n", printBoolPtr(cronJob.Spec.Suspend))
2076+
if cronJob.Spec.SuccessfulJobsHistoryLimit != nil {
2077+
w.Write(LEVEL_0, "Successful Job History Limit:\t%d\n", cronJob.Spec.SuccessfulJobsHistoryLimit)
2078+
} else {
2079+
w.Write(LEVEL_0, "Successful Job History Limit:\t<unset>\n")
2080+
}
2081+
if cronJob.Spec.FailedJobsHistoryLimit != nil {
2082+
w.Write(LEVEL_0, "Failed Job History Limit:\t%d\n", *cronJob.Spec.FailedJobsHistoryLimit)
2083+
} else {
2084+
w.Write(LEVEL_0, "Failed Job History Limit:\t<unset>\n")
2085+
}
20762086
if cronJob.Spec.StartingDeadlineSeconds != nil {
20772087
w.Write(LEVEL_0, "Starting Deadline Seconds:\t%ds\n", *cronJob.Spec.StartingDeadlineSeconds)
20782088
} else {

0 commit comments

Comments
 (0)