Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golint failures of pkg/kubelet/pod #76884

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pkg/kubelet/pod/mirror_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down