This repository was archived by the owner on Jul 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 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
2322const (
24- appKey = "k8s-app"
2523 doesNotExist = "DoesNotExist"
2624)
2725
@@ -56,13 +54,11 @@ func NewStatusController(pods []string) (*statusController, error) {
5654}
5755
5856func (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 ) {
You can’t perform that action at this time.
0 commit comments