Move operator to go 1.14 (#882)

* update go modules march 2020
* update to GO 1.14
* reflect k8s client API changes
This commit is contained in:
Felix Kunde
2020-03-30 15:50:17 +02:00
committed by GitHub
parent ba9cf68650
commit 66f2cda87f
26 changed files with 319 additions and 273 deletions
+5 -3
View File
@@ -1,7 +1,9 @@
package controller
import (
"k8s.io/api/core/v1"
"context"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
@@ -19,7 +21,7 @@ func (c *Controller) podListFunc(options metav1.ListOptions) (runtime.Object, er
TimeoutSeconds: options.TimeoutSeconds,
}
return c.KubeClient.Pods(c.opConfig.WatchedNamespace).List(opts)
return c.KubeClient.Pods(c.opConfig.WatchedNamespace).List(context.TODO(), opts)
}
func (c *Controller) podWatchFunc(options metav1.ListOptions) (watch.Interface, error) {
@@ -29,7 +31,7 @@ func (c *Controller) podWatchFunc(options metav1.ListOptions) (watch.Interface,
TimeoutSeconds: options.TimeoutSeconds,
}
return c.KubeClient.Pods(c.opConfig.WatchedNamespace).Watch(opts)
return c.KubeClient.Pods(c.opConfig.WatchedNamespace).Watch(context.TODO(), opts)
}
func (c *Controller) dispatchPodEvent(clusterName spec.NamespacedName, event cluster.PodEvent) {