mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #76884 from SataQiu/fix-golint-pkg/kubelet/pod
Fix golint failures of pkg/kubelet/pod
This commit is contained in:
commit
5b43333291
@ -184,7 +184,6 @@ pkg/kubelet/events
|
|||||||
pkg/kubelet/lifecycle
|
pkg/kubelet/lifecycle
|
||||||
pkg/kubelet/metrics
|
pkg/kubelet/metrics
|
||||||
pkg/kubelet/oom
|
pkg/kubelet/oom
|
||||||
pkg/kubelet/pod
|
|
||||||
pkg/kubelet/pod/testing
|
pkg/kubelet/pod/testing
|
||||||
pkg/kubelet/preemption
|
pkg/kubelet/preemption
|
||||||
pkg/kubelet/prober
|
pkg/kubelet/prober
|
||||||
|
@ -90,11 +90,13 @@ func (mc *basicMirrorClient) DeleteMirrorPod(podFullName string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsStaticPod returns true if the pod is a static pod.
|
||||||
func IsStaticPod(pod *v1.Pod) bool {
|
func IsStaticPod(pod *v1.Pod) bool {
|
||||||
source, err := kubetypes.GetPodSource(pod)
|
source, err := kubetypes.GetPodSource(pod)
|
||||||
return err == nil && source != kubetypes.ApiserverSource
|
return err == nil && source != kubetypes.ApiserverSource
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsMirrorPod returns true if the pod is a mirror pod.
|
||||||
func IsMirrorPod(pod *v1.Pod) bool {
|
func IsMirrorPod(pod *v1.Pod) bool {
|
||||||
_, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey]
|
_, ok := pod.Annotations[kubetypes.ConfigMirrorAnnotationKey]
|
||||||
return ok
|
return ok
|
||||||
|
Loading…
Reference in New Issue
Block a user