Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Fixed the code to work with the new deps
Browse files Browse the repository at this point in the history
  • Loading branch information
piosz committed May 15, 2016
1 parent 86189b6 commit d22e01c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/kubernetes/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strconv"

"k8s.io/kubernetes/pkg/api/unversioned"
kube_client "k8s.io/kubernetes/pkg/client/unversioned"
kube_client "k8s.io/kubernetes/pkg/client/restclient"
kubeClientCmd "k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
kubeClientCmdApi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
)
Expand Down
6 changes: 4 additions & 2 deletions metrics/processors/pod_based_enricher.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ func NewPodBasedEnricher(url *url.URL) (*PodBasedEnricher, error) {

// watch nodes
lw := cache.NewListWatchFromClient(kubeClient, "pods", kube_api.NamespaceAll, fields.Everything())
podLister := &cache.StoreToPodLister{Store: cache.NewStore(cache.MetaNamespaceKeyFunc)}
reflector := cache.NewReflector(lw, &kube_api.Pod{}, podLister.Store, time.Hour)

store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
podLister := &cache.StoreToPodLister{Indexer: store}
reflector := cache.NewReflector(lw, &kube_api.Pod{}, store, time.Hour)
reflector.Run()

return &PodBasedEnricher{
Expand Down
3 changes: 2 additions & 1 deletion metrics/processors/pod_based_enricher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func TestPodEnricher(t *testing.T) {
},
}

podLister := &cache.StoreToPodLister{Store: cache.NewStore(cache.MetaNamespaceKeyFunc)}
store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
podLister := &cache.StoreToPodLister{Indexer: store}
podLister.Add(&pod)
podBasedEnricher := PodBasedEnricher{podLister: podLister}

Expand Down
2 changes: 1 addition & 1 deletion metrics/sinks/hawkular/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/hawkular/hawkular-client-go/metrics"

"k8s.io/heapster/metrics/core"
kube_client "k8s.io/kubernetes/pkg/client/unversioned"
kube_client "k8s.io/kubernetes/pkg/client/restclient"
kubeClientCmd "k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
)

Expand Down
2 changes: 1 addition & 1 deletion metrics/sources/kubelet/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/golang/glog"
kube_config "k8s.io/heapster/common/kubernetes"
kube_client "k8s.io/kubernetes/pkg/client/unversioned"
kube_client "k8s.io/kubernetes/pkg/client/restclient"
kubelet_client "k8s.io/kubernetes/pkg/kubelet/client"
)

Expand Down

0 comments on commit d22e01c

Please sign in to comment.