File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
modules/api/pkg/resource/cronjob Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -114,16 +114,11 @@ func TriggerCronJob(client client.Interface,
114
114
115
115
jobToCreate := & batch.Job {
116
116
ObjectMeta : meta.ObjectMeta {
117
- Name : newJobName ,
118
- Namespace : namespace ,
119
- Annotations : annotations ,
120
- Labels : labels ,
121
- OwnerReferences : []meta.OwnerReference {{
122
- APIVersion : CronJobAPIVersion ,
123
- Kind : CronJobKindName ,
124
- Name : cronJob .Name ,
125
- UID : cronJob .UID ,
126
- }},
117
+ Name : newJobName ,
118
+ Namespace : namespace ,
119
+ Annotations : annotations ,
120
+ Labels : labels ,
121
+ OwnerReferences : []meta.OwnerReference {* meta .NewControllerRef (cronJob , batch .SchemeGroupVersion .WithKind ("CronJob" ))},
127
122
},
128
123
Spec : cronJob .Spec .JobTemplate .Spec ,
129
124
}
You can’t perform that action at this time.
0 commit comments