Skip to content

Commit

Permalink
Add missing label selector.
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Miguel Custódio <[email protected]>
  • Loading branch information
bmcustodio committed Apr 8, 2020
1 parent 7200a36 commit 92afa31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/utils/cilium/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"

"github.com/bmcstdio/kubectl-cilium/internal/constants"
)

func DiscoverCiliumPodInNode(kubeClient kubernetes.Interface, ciliumNamespace, nodeName string) (string, error) {
p, err := kubeClient.CoreV1().Pods(ciliumNamespace).List(metav1.ListOptions{
FieldSelector: fmt.Sprintf("spec.nodeName==%s", nodeName),
LabelSelector: constants.CiliumLabelSelector,
Limit: 1,
})
if err != nil {
Expand Down

0 comments on commit 92afa31

Please sign in to comment.