diff --git a/docs/source-configuration.md b/docs/source-configuration.md index c484d96257..2c25c9d172 100644 --- a/docs/source-configuration.md +++ b/docs/source-configuration.md @@ -30,7 +30,7 @@ To run without auth file, use the following config: The following options are available: -* `apiVersion` - API version to use to talk to Kubernetes (default: `v1beta1`) +* `apiVersion` - API version to use to talk to Kubernetes (default: `v1beta3`) * `insecure` - whether to trust kubernetes certificates (default: `false`) * `kubeletPort` - kubelet port to use (default: `10255`) * `kubeletHttps` - whether to use https to connect to kubelets (default: `false`) diff --git a/integration/framework.go b/integration/framework.go index 0272d92a74..2f2f836445 100644 --- a/integration/framework.go +++ b/integration/framework.go @@ -26,7 +26,7 @@ import ( "time" "github.com/GoogleCloudPlatform/kubernetes/pkg/api" - "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2" + "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3" kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" kclientcmd "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd" kclientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api" @@ -214,7 +214,7 @@ func getKubeClient() (string, *kclient.Client, error) { *c, &kclientcmd.ConfigOverrides{ ClusterInfo: kclientcmdapi.Cluster{ - APIVersion: "v1beta1", + APIVersion: "v1beta3", }, }).ClientConfig() if err != nil { @@ -354,7 +354,7 @@ func (self *realKubeFramework) loadObject(filePath string) (runtime.Object, erro if err != nil { return nil, fmt.Errorf("failed to read object: %v", err) } - return v1beta2.Codec.Decode(data) + return v1beta3.Codec.Decode(data) } func (self *realKubeFramework) ParseRC(filePath string) (*api.ReplicationController, error) { @@ -423,7 +423,7 @@ func (self *realKubeFramework) DestroyCluster() { } func (self *realKubeFramework) GetProxyUrlForService(serviceName string) string { - return fmt.Sprintf("%s/api/v1beta1/proxy/services/%s/", self.masterIP, serviceName) + return fmt.Sprintf("%s/api/v1beta3/proxy/namespaces/default/services/%s/", self.masterIP, serviceName) } func (self *realKubeFramework) GetNodes() ([]string, error) { diff --git a/sources/kube_factory.go b/sources/kube_factory.go index ed2877cfee..ecf39301e9 100644 --- a/sources/kube_factory.go +++ b/sources/kube_factory.go @@ -31,7 +31,7 @@ import ( ) const ( - defaultApiVersion = "v1beta1" + defaultApiVersion = "v1beta3" defaultInsecure = false defaultKubeletPort = 10255 defaultKubeConfigFile = "/etc/kubernetes/kubeconfig/kubeconfig" diff --git a/sources/nodes/kube.go b/sources/nodes/kube.go index 7ac180b7c2..1886b3b9d2 100644 --- a/sources/nodes/kube.go +++ b/sources/nodes/kube.go @@ -134,7 +134,7 @@ func NewKubeNodes(client *client.Client) (NodesApi, error) { return nil, fmt.Errorf("client is nil") } - lw := cache.NewListWatchFromClient(client, "minions", api.NamespaceAll, fields.Everything()) + lw := cache.NewListWatchFromClient(client, "nodes", api.NamespaceAll, fields.Everything()) nodeLister := &cache.StoreToNodeLister{Store: cache.NewStore(cache.MetaNamespaceKeyFunc)} reflector := cache.NewReflector(lw, &api.Node{}, nodeLister.Store, 0) stopChan := make(chan struct{}) diff --git a/sources/pods.go b/sources/pods.go index ae219657bd..c7d9ebece6 100644 --- a/sources/pods.go +++ b/sources/pods.go @@ -93,7 +93,7 @@ func (self *realPodsApi) parseAllPods(podNodePairs []podNodePair) []api.Pod { func (self *realPodsApi) getNodeSelector(nodeList *nodes.NodeList) (labels.Selector, error) { nodeLabels := []string{} for host := range nodeList.Items { - nodeLabels = append(nodeLabels, fmt.Sprintf("DesiredState.Host==%s", host)) + nodeLabels = append(nodeLabels, fmt.Sprintf("spec.host==%s", host)) } glog.V(2).Infof("using labels %v to find pods", nodeLabels) return labels.Parse(strings.Join(nodeLabels, ",")) @@ -127,7 +127,7 @@ func (self *realPodsApi) DebugInfo() string { func newPodsApi(client *client.Client) podsApi { // Extend the selector to include specific nodes to monitor // or provide an API to update the nodes to monitor. - selector, err := fields.ParseSelector("DesiredState.Host!=") + selector, err := fields.ParseSelector("spec.host!=") if err != nil { panic(err) }