Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 74af00c

Browse files
author
Yifan Gu
committed
pkg/bootkube/status.go: Remove label selector in list options.
This matches the change in the templates.go
1 parent b079433 commit 74af00c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

pkg/bootkube/status.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/golang/glog"
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12-
"k8s.io/apimachinery/pkg/labels"
1312
"k8s.io/apimachinery/pkg/runtime"
1413
"k8s.io/apimachinery/pkg/util/wait"
1514
"k8s.io/apimachinery/pkg/watch"
@@ -21,7 +20,6 @@ import (
2120
)
2221

2322
const (
24-
appKey = "k8s-app"
2523
doesNotExist = "DoesNotExist"
2624
)
2725

@@ -56,13 +54,11 @@ func NewStatusController(pods []string) (*statusController, error) {
5654
}
5755

5856
func (s *statusController) Run() {
59-
// TODO(aaron): statically define the selector so we can skip this
60-
ls, err := labels.Parse(appKey)
61-
if err != nil {
62-
panic(err)
63-
}
64-
65-
options := metav1.ListOptions{LabelSelector: ls.String()}
57+
// TODO(yifan): Be more explicit about the labels so that we don't just
58+
// reply on the prefix of the pod name when looking for the pods we are interested.
59+
// E.g. For a scheduler pod, we will look for pods that has label `tier=control-plane`
60+
// and `component=kube-scheduler`.
61+
options := metav1.ListOptions{}
6662
podStore, podController := cache.NewInformer(
6763
&cache.ListWatch{
6864
ListFunc: func(lo metav1.ListOptions) (runtime.Object, error) {

0 commit comments

Comments
 (0)