Merge pull request #62744 from liggitt/describe-cronjob
Automatic merge from submit-queue (batch tested with PRs 60201, 62744). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix kubectl describe cronjob CronJob describer was attempting to use the internal batch clientset, which speaks to the batch/v1 API group. CronJobs do not exist in that API group.
This commit is contained in:
@@ -4034,6 +4034,8 @@ run_job_tests() {
|
||||
kubectl run pi --schedule="59 23 31 2 *" --namespace=test-jobs --generator=cronjob/v1beta1 "--image=$IMAGE_PERL" --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(20)' "${kube_flags[@]}"
|
||||
# Post-Condition: assertion object exists
|
||||
kube::test::get_object_assert 'cronjob/pi --namespace=test-jobs' "{{$id_field}}" 'pi'
|
||||
kubectl get cronjob/pi --namespace=test-jobs
|
||||
kubectl describe cronjob/pi --namespace=test-jobs
|
||||
|
||||
### Create a job in dry-run mode
|
||||
output_message=$(kubectl create job test-job --from=cronjob/pi --dry-run=true --namespace=test-jobs -o name)
|
||||
@@ -4046,6 +4048,8 @@ run_job_tests() {
|
||||
kubectl create job test-job --from=cronjob/pi --namespace=test-jobs
|
||||
# Post-Condition: assertion object exists
|
||||
kube::test::get_object_assert 'job/test-job --namespace=test-jobs' "{{$id_field}}" 'test-job'
|
||||
kubectl get job/test-job --namespace=test-jobs
|
||||
kubectl describe job/test-job --namespace=test-jobs
|
||||
#Clean up
|
||||
kubectl delete job test-job --namespace=test-jobs
|
||||
kubectl delete cronjob pi --namespace=test-jobs
|
||||
|
Reference in New Issue
Block a user