diff --git a/probe/kubernetes/client.go b/probe/kubernetes/client.go index 0545f64ac..7c869ad12 100644 --- a/probe/kubernetes/client.go +++ b/probe/kubernetes/client.go @@ -48,7 +48,6 @@ type Client interface { type client struct { quit chan struct{} - resyncPeriod time.Duration client *kubernetes.Clientset podStore cache.Store serviceStore cache.Store @@ -66,7 +65,6 @@ type client struct { // ClientConfig establishes the configuration for the kubernetes client type ClientConfig struct { - Interval time.Duration CertificateAuthority string ClientCertificate string ClientKey string @@ -129,9 +127,8 @@ func NewClient(config ClientConfig) (Client, error) { } result := &client{ - quit: make(chan struct{}), - resyncPeriod: config.Interval, - client: c, + quit: make(chan struct{}), + client: c, } result.podStore = NewEventStore(result.triggerPodWatches, cache.MetaNamespaceKeyFunc) @@ -225,7 +222,7 @@ func (c *client) runReflectorUntil(resource string, store cache.Store) { return true, nil } lw := cache.NewListWatchFromClient(kclient, resource, metav1.NamespaceAll, fields.Everything()) - r = cache.NewReflector(lw, itemType, store, c.resyncPeriod) + r = cache.NewReflector(lw, itemType, store, 0) } select { diff --git a/prog/main.go b/prog/main.go index 61ede6ab2..4bf027628 100644 --- a/prog/main.go +++ b/prog/main.go @@ -303,7 +303,6 @@ func setupFlags(flags *flags) { // K8s flag.BoolVar(&flags.probe.kubernetesEnabled, "probe.kubernetes", false, "collect kubernetes-related attributes for containers") - flag.DurationVar(&flags.probe.kubernetesClientConfig.Interval, "probe.kubernetes.interval", 10*time.Second, "how often to do a full resync of the kubernetes data") flag.StringVar(&flags.probe.kubernetesClientConfig.Server, "probe.kubernetes.api", "", "The address and port of the Kubernetes API server (deprecated in favor of equivalent probe.kubernetes.server)") flag.StringVar(&flags.probe.kubernetesClientConfig.CertificateAuthority, "probe.kubernetes.certificate-authority", "", "Path to a cert. file for the certificate authority") flag.StringVar(&flags.probe.kubernetesClientConfig.ClientCertificate, "probe.kubernetes.client-certificate", "", "Path to a client certificate file for TLS")