move deployment PodTemplate to be not a pointer

This commit is contained in:
Mike Danese
2015-10-26 16:20:43 -07:00
parent d5e680afbb
commit b0a41108af
13 changed files with 38 additions and 35 deletions

View File

@@ -45,10 +45,8 @@ func addDefaultingFuncs() {
},
func(obj *Deployment) {
// Default labels and selector to labels from pod template spec.
var labels map[string]string
if obj.Spec.Template != nil {
labels = obj.Spec.Template.Labels
}
labels := obj.Spec.Template.Labels
if labels != nil {
if len(obj.Spec.Selector) == 0 {
obj.Spec.Selector = labels