Skip to content

Commit

Permalink
Update call to k8s API
Browse files Browse the repository at this point in the history
  • Loading branch information
tmjd committed Feb 28, 2017
1 parent 160dce3 commit dae0741
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"encoding/json"

"k8s.io/client-go/kubernetes"
metav1 "k8s.io/client-go/pkg/apis/meta/v1"
"k8s.io/client-go/tools/clientcmd"

log "github.com/Sirupsen/logrus"
Expand Down Expand Up @@ -366,7 +367,7 @@ func newK8sClient(conf utils.NetConf, logger *log.Entry) (*kubernetes.Clientset,
}

func getK8sLabelsAnnotations(client *kubernetes.Clientset, k8sargs utils.K8sArgs) (map[string]string, map[string]string, error) {
pod, err := client.Pods(string(k8sargs.K8S_POD_NAMESPACE)).Get(fmt.Sprintf("%s", k8sargs.K8S_POD_NAME))
pod, err := client.Pods(string(k8sargs.K8S_POD_NAMESPACE)).Get(fmt.Sprintf("%s", k8sargs.K8S_POD_NAME), metav1.GetOptions{})
if err != nil {
return nil, nil, err
}
Expand All @@ -388,7 +389,7 @@ func getPodCidr(client *kubernetes.Clientset, conf utils.NetConf, hostname strin
nodeName = conf.Kubernetes.NodeName
}

node, err := client.Nodes().Get(nodeName)
node, err := client.Nodes().Get(nodeName, metav1.GetOptions{})
if err != nil {
return "", err
}
Expand Down

0 comments on commit dae0741

Please sign in to comment.