fix golint failures of pkg/kubelet/pod

k3s-v1.15.3
SataQiu 2019-04-25 11:54:14 +08:00
parent 20b76a2b4a
commit 1581055c3a
2 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,6 @@ pkg/kubelet/events
pkg/kubelet/lifecycle
pkg/kubelet/metrics
pkg/kubelet/oom
pkg/kubelet/pod
pkg/kubelet/pod/testing
pkg/kubelet/preemption
pkg/kubelet/prober

View File

@ -90,11 +90,13 @@ func (mc *basicMirrorClient) DeleteMirrorPod(podFullName string) error {
return nil
}
// IsStaticPod returns true if the pod is a static pod.
func IsStaticPod(pod *v1.Pod) bool {
source, err := kubetypes.GetPodSource(pod)
return err == nil && source != kubetypes.ApiserverSource
}
// IsMirrorPod returns true if the pod is a mirror pod.
func IsMirrorPod(pod *v1.Pod) bool {
_, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey]
return ok