Add minimal functionality test for k8s control plane
Basic functionality test that sends the bootstrap RPC call,
waits for the k8s control plane to come up and runs a simple
kubectl command (that is expected to fail).
Adds reflection to the server to make grpc_cli easier to use.
Test Plan:
Ran `:launch` (because we modified its config) and `:test_boot`,
saw a nicely booted k8s cluster:
{P90}
X-Origin-Diff: phab/D275
GitOrigin-RevId: fe01e3f3ed09877aa76c15946664c9d9bdc4751b
diff --git a/core/cmd/init/main.go b/core/cmd/init/main.go
index 1d068d4..902008d 100644
--- a/core/cmd/init/main.go
+++ b/core/cmd/init/main.go
@@ -29,6 +29,11 @@
"golang.org/x/sys/unix"
)
+const (
+ apiPort = 7833
+ consensusPort = 7834
+)
+
func main() {
defer func() {
if r := recover(); r != nil {
@@ -79,7 +84,7 @@
logger.Panic("Failed to start network service", zap.Error(err))
}
- nodeInstance, err := node.NewSmalltownNode(logger, 7833, 7834)
+ nodeInstance, err := node.NewSmalltownNode(logger, apiPort, consensusPort)
if err != nil {
panic(err)
}