m/c/metroctl: add k8s credentials plugin
This adds a command implementing the K8s client-go credentials
interface. It provides Metropolis credentials to Kubernetes clients
like kubectl for use with an authenticating proxy being added later.
Change-Id: I11d29f80134c2ec0839f0619eaebc4a4bb2aa3e0
Reviewed-on: https://review.monogon.dev/c/monogon/+/508
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/cli/metroctl/BUILD.bazel b/metropolis/cli/metroctl/BUILD.bazel
index b73b418..de0278b 100644
--- a/metropolis/cli/metroctl/BUILD.bazel
+++ b/metropolis/cli/metroctl/BUILD.bazel
@@ -3,7 +3,9 @@
go_library(
name = "go_default_library",
srcs = [
+ "credentials.go",
"install.go",
+ "k8scredplugin.go",
"main.go",
"takeownership.go",
],
@@ -22,6 +24,8 @@
"//metropolis/proto/api:go_default_library",
"@com_github_adrg_xdg//:go_default_library",
"@com_github_spf13_cobra//:go_default_library",
+ "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
+ "@io_k8s_client_go//pkg/apis/clientauthentication/v1beta1:go_default_library",
],
)