ClusterManager: Implements support of remote clusters.
After this change users will be able to:
* Create cluster and add/remove servers to it
* Install apps on remote cluster
* Move already installed apps between clusters
* Apps running on server being removed will auto-migrate
to another server from that same cluster
This is achieved by:
* Installing and running minimal version of dodo on remote cluster
* Ingress-nginx is installed automatically on new clusters
* Next to nginx we run VPN client in the same pod, so that
default cluster can establish secure communication with it
* Multiple reverse proxies are configured to get to the
remote cluster service from ingress installed on default cluster.
Next steps:
* Support remote clusters in dodo apps (prototype ready)
* Clean up old cluster when moving app to the new one. Currently
old cluster keeps running app pods even though no ingress can
reach it anymore.
Change-Id: Iffc908c93416d4126a8e1c2832eae7b659cb8044
diff --git a/core/installer/derived_test.go b/core/installer/derived_test.go
index 83e07ec..d9a873b 100644
--- a/core/installer/derived_test.go
+++ b/core/installer/derived_test.go
@@ -1,6 +1,7 @@
package installer
import (
+ "net"
"testing"
)
@@ -22,6 +23,10 @@
return nil
}
+func (g testKeyGen) GetNodeIP(username, node string) (net.IP, error) {
+ return nil, nil
+}
+
func TestDeriveVPNAuthKey(t *testing.T) {
schema := structSchema{
"input",
@@ -36,7 +41,7 @@
input := map[string]any{
"username": "foo",
}
- v, err := deriveValues(input, input, schema, nil, testKeyGen{})
+ v, err := deriveValues(input, input, schema, nil, nil, testKeyGen{})
if err != nil {
t.Fatal(err)
}
@@ -62,7 +67,7 @@
"username": "foo",
"enabled": false,
}
- v, err := deriveValues(input, input, schema, nil, testKeyGen{})
+ v, err := deriveValues(input, input, schema, nil, nil, testKeyGen{})
if err != nil {
t.Fatal(err)
}
@@ -88,7 +93,7 @@
"username": "foo",
"enabled": true,
}
- v, err := deriveValues(input, input, schema, nil, testKeyGen{})
+ v, err := deriveValues(input, input, schema, nil, nil, testKeyGen{})
if err != nil {
t.Fatal(err)
}