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

Commit 2e0df9d

Browse files
committed
pkg/bootkube: make update clientset usage
1 parent 66e399c commit 2e0df9d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/bootkube/status.go

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

99
"github.com/golang/glog"
1010
"k8s.io/kubernetes/pkg/api"
11+
"k8s.io/kubernetes/pkg/api/v1"
1112
"k8s.io/kubernetes/pkg/client/cache"
1213
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_3"
1314
"k8s.io/kubernetes/pkg/client/restclient"
@@ -67,7 +68,7 @@ func (s *statusController) Run() {
6768
return s.client.Core().Pods(api.NamespaceSystem).Watch(options)
6869
},
6970
},
70-
&api.Pod{},
71+
&v1.Pod{},
7172
30*time.Minute,
7273
framework.ResourceEventHandlerFuncs{},
7374
)
@@ -85,15 +86,15 @@ func (s *statusController) AllRunning() (bool, error) {
8586
running := true
8687
for p, s := range ps {
8788
glog.Infof("Pod status %s: %s", p, s)
88-
if s != api.PodRunning {
89+
if s != v1.PodRunning {
8990
running = false
9091
}
9192
}
9293
return running, nil
9394
}
9495

95-
func (s *statusController) PodStatus() (map[string]api.PodPhase, error) {
96-
status := make(map[string]api.PodPhase)
96+
func (s *statusController) PodStatus() (map[string]v1.PodPhase, error) {
97+
status := make(map[string]v1.PodPhase)
9798

9899
podNames := s.podStore.ListKeys()
99100
for _, pod := range s.watchPods {
@@ -112,7 +113,7 @@ func (s *statusController) PodStatus() (map[string]api.PodPhase, error) {
112113
status[pod] = doesNotExist
113114
continue
114115
}
115-
if p, ok := p.(*api.Pod); ok {
116+
if p, ok := p.(*v1.Pod); ok {
116117
status[pod] = p.Status.Phase
117118
}
118119
}

0 commit comments

Comments
 (0)