Make PodTemplateSpec for Job not a pointer, since it's a required field

This commit is contained in:
Maciej Szulik
2015-09-25 21:07:06 +02:00
parent 4f6ac7ec79
commit 98fa29adfd
16 changed files with 43 additions and 85 deletions

View File

@@ -89,10 +89,7 @@ func addDefaultingFuncs() {
}
},
func(obj *Job) {
var labels map[string]string
if obj.Spec.Template != nil {
labels = obj.Spec.Template.Labels
}
labels := obj.Spec.Template.Labels
// TODO: support templates defined elsewhere when we support them in the API
if labels != nil {
if len(obj.Spec.Selector) == 0 {