linkerd2/pkg/k8s
Andrew Seigner ec540a882e
Consolidate k8s APIs (#2747)
Numerous codepaths have emerged that create k8s configs, k8s clients,
and make k8s api requests.

This branch consolidates k8s client creation and APIs. The primary
change migrates most codepaths to call `k8s.NewAPI` to instantiate a
`KubernetesAPI` struct from `pkg`. `KubernetesAPI` implements the
`kubernetes.Interface` (clientset) interface, and also persists a
`client-go` `rest.Config`.

Specific list of changes:
- removes manual GET requests from `k8s.KubernetesAPI`, in favor of
  clientsets
- replaces most calls to `k8s.GetConfig`+`kubernetes.NewForConfig` with
  a single `k8s.NewAPI`
- introduces a `timeout` param to `k8s.NewAPI`, currently only used by
  healthchecks
- removes `NewClientSet` in `controller/k8s/clientset.go` in favor of
  `k8s.NewAPI`
- removes `httpClient` and `clientset` from `HealthChecker`, use
  `KubernetesAPI` instead

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-25 11:31:38 -07:00
..
testdata Fix handling of kubeconfig server urls that include paths (#2305) 2019-02-18 17:57:27 -08:00
api.go Consolidate k8s APIs (#2747) 2019-04-25 11:31:38 -07:00
api_test.go Consolidate k8s APIs (#2747) 2019-04-25 11:31:38 -07:00
authz.go Remove single namespace functionality (#2474) 2019-03-12 00:17:22 -07:00
authz_test.go Remove single namespace functionality (#2474) 2019-03-12 00:17:22 -07:00
fake.go Introduce upgrade --from-manifests flag (#2697) 2019-04-17 13:32:21 -07:00
fake_test.go Introduce upgrade --from-manifests flag (#2697) 2019-04-17 13:32:21 -07:00
k8s.go Wire up stats for Jobs (#2416) 2019-03-01 17:16:54 -08:00
k8s_test.go Introduce upgrade --from-manifests flag (#2697) 2019-04-17 13:32:21 -07:00
kubectl.go Check kubectl version as part of checks (#2358) 2019-03-01 10:03:59 -08:00
kubectl_test.go Check kubectl version as part of checks (#2358) 2019-03-01 10:03:59 -08:00
labels.go Add the ability to inject a debug sidecar (#2726) 2019-04-22 16:53:12 -07:00
labels_test.go Provide peer Identities via the Destination API (#2537) 2019-03-22 09:19:14 -07:00
portforward.go Consolidate k8s APIs (#2747) 2019-04-25 11:31:38 -07:00
portforward_test.go Consolidate k8s APIs (#2747) 2019-04-25 11:31:38 -07:00
version.go Remove kubectl dependency, validate k8s server version via api (#396) 2018-02-20 12:14:11 -08:00
version_test.go Remove kubectl dependency, validate k8s server version via api (#396) 2018-02-20 12:14:11 -08:00