use glog.V().Infof() for formatting output; return nil when err's nil

This commit is contained in:
Weibin Lin 2018-08-15 11:47:59 +08:00
parent 1f86c1cf26
commit c702a24182

View File

@ -244,7 +244,7 @@ func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolum
}
// Populate NodeAffinity with requirements if there are no conflicting keys found
if v1helper.NodeSelectorRequirementKeysExistInNodeSelectorTerms(requirements, newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms) {
glog.V(4).Info("NodeSelectorRequirements for cloud labels %v conflict with existing NodeAffinity %v. Skipping addition of NodeSelectorRequirements for cloud labels.",
glog.V(4).Infof("NodeSelectorRequirements for cloud labels %v conflict with existing NodeAffinity %v. Skipping addition of NodeSelectorRequirements for cloud labels.",
requirements, newVolume.Spec.NodeAffinity)
} else {
for _, req := range requirements {
@ -288,7 +288,7 @@ func (pvlc *PersistentVolumeLabelController) updateVolume(vol *v1.PersistentVolu
}
glog.V(4).Infof("updated PersistentVolume %s", volName)
return err
return nil
}
func removeInitializer(initializers *metav1.Initializers, name string) *metav1.Initializers {