mirror of https://github.com/linkerd/linkerd2.git
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> |
||
---|---|---|
.. | ||
testdata | ||
api.go | ||
api_test.go | ||
authz.go | ||
authz_test.go | ||
fake.go | ||
fake_test.go | ||
k8s.go | ||
k8s_test.go | ||
kubectl.go | ||
kubectl_test.go | ||
labels.go | ||
labels_test.go | ||
portforward.go | ||
portforward_test.go | ||
version.go | ||
version_test.go |