Merge pull request #76884 from SataQiu/fix-golint-pkg/kubelet/pod

Fix golint failures of pkg/kubelet/pod
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-25 13:37:06 -07:00 committed by GitHub
commit 5b43333291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -184,7 +184,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