metropolis/metroctl: implement cluster configure
This is a framework for simple ClusterConfiguration changes via
metroctl. We only have one mutable field for now
(kubernetes.node_labels_to_synchronize), but more fields can be
supported later.
This could also be extended to support operations like 'add' and
'remove' for repeated fields.
Finally, there could be another CLI command that would drop you into a
prototext editor, similar to `kubectl edit xxx`. But this solves the
simplest usecase for now.
Change-Id: I2fc588a2a2249a5c4f0cf52acb162cac9ed3d9a4
Reviewed-on: https://review.monogon.dev/c/monogon/+/3595
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/BUILD.bazel b/metropolis/cli/metroctl/BUILD.bazel
index 1a43336..10aaa9c 100644
--- a/metropolis/cli/metroctl/BUILD.bazel
+++ b/metropolis/cli/metroctl/BUILD.bazel
@@ -19,6 +19,7 @@
srcs = [
"cmd_certs.go",
"cmd_cluster.go",
+ "cmd_cluster_configure.go",
"cmd_cluster_takeownership.go",
"cmd_install.go",
"cmd_install_ssh.go",
@@ -60,6 +61,7 @@
"@io_k8s_client_go//pkg/apis/clientauthentication/v1:clientauthentication",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/known/fieldmaskpb",
"@org_golang_x_crypto//ssh",
"@org_golang_x_crypto//ssh/agent",
"@org_golang_x_crypto//ssh/terminal",