-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for CronJob generator #38929
Conversation
@@ -368,6 +368,9 @@ func (CronJobV2Alpha1) Generate(genericParams map[string]interface{}) (runtime.O | |||
Schedule: params["schedule"], | |||
ConcurrencyPolicy: batch.AllowConcurrent, | |||
JobTemplate: batch.JobTemplateSpec{ | |||
ObjectMeta: api.ObjectMeta{ | |||
Labels: labels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this change? Note that by default cronjob controller doesn't set jobTemplate.labels
, and it will be copied from jobTemplate.spec.template.labels
upon job creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check that, in that case this is not needed, indeed. Will remove.
27b0012
to
4855ae2
Compare
@janetkuo updated, ptal |
Jenkins Bazel Build failed for commit 4855ae2. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE etcd3 e2e failed for commit 4855ae2. Full PR test history. The magic incantation to run this job again is |
/lgtm |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Per @janetkuo request this was split from #38614, it adds test for
CronJob
generator, and additionally copy labels toJobTemplate
, to be consistent with howJob
generator works.