migrate pkg/scheduler/framework/plugins/volume to structured logs

Signed-off-by: chymy <chang.min1@zte.com.cn>
This commit is contained in:
chymy 2021-01-30 15:35:20 +08:00
parent 56bb207b94
commit 57fc5f67e7
2 changed files with 4 additions and 4 deletions

View File

@ -254,13 +254,13 @@ func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState,
if !ok {
return framework.AsStatus(fmt.Errorf("no pod volumes found for node %q", nodeName))
}
klog.V(5).Infof("Trying to bind volumes for pod \"%v/%v\"", pod.Namespace, pod.Name)
klog.V(5).InfoS("Trying to bind volumes for pod", "pod", klog.KObj(pod))
err = pl.Binder.BindPodVolumes(pod, podVolumes)
if err != nil {
klog.V(1).Infof("Failed to bind volumes for pod \"%v/%v\": %v", pod.Namespace, pod.Name, err)
klog.V(1).InfoS("Failed to bind volumes for pod", "pod", klog.KObj(pod), "err", err)
return framework.AsStatus(err)
}
klog.V(5).Infof("Success binding volumes for pod \"%v/%v\"", pod.Namespace, pod.Name)
klog.V(5).InfoS("Success binding volumes for pod", "pod", klog.KObj(pod))
return nil
}

View File

@ -158,7 +158,7 @@ func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod *
nodeV, _ := nodeConstraints[k]
volumeVSet, err := volumehelpers.LabelZonesToSet(v)
if err != nil {
klog.Warningf("Failed to parse label for %q: %q. Ignoring the label. err=%v. ", k, v, err)
klog.InfoS("Failed to parse label, ignoring the label", "label", fmt.Sprintf("%s:%s", k, v), "err", err)
continue
}