m/n/kubernetes: introduce feature gate infra
This introduces centralized infrastructure to control feature gates in K8s.
It includes a test to make sure that we do not keep outdated flags in there.
Change-Id: Ife251cbd5210bc8b3757bb3829e91bcdb2e6fdfb
Reviewed-on: https://review.monogon.dev/c/monogon/+/3664
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/kubernetes/scheduler.go b/metropolis/node/kubernetes/scheduler.go
index cfa338a..d058970 100644
--- a/metropolis/node/kubernetes/scheduler.go
+++ b/metropolis/node/kubernetes/scheduler.go
@@ -67,6 +67,7 @@
pem.EncodeToMemory(&pem.Block{Type: "PRIVATE KEY", Bytes: config.serverKey})),
args.FileOpt("--client-ca-file", "root-ca.pem",
pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: config.rootCA})),
+ extraFeatureGates.AsFlag(),
)
if args.Error() != nil {
return fmt.Errorf("failed to use fileargs: %w", err)