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/welcome/dodo_app.go b/core/installer/welcome/dodo_app.go
index 7f3d383..9a93afd 100644
--- a/core/installer/welcome/dodo_app.go
+++ b/core/installer/welcome/dodo_app.go
@@ -104,6 +104,7 @@
nsc installer.NamespaceCreator
jc installer.JobCreator
vpnKeyGen installer.VPNAPIClient
+ cnc installer.ClusterNetworkConfigurator
workers map[string]map[string]struct{}
appConfigs map[string]appConfig
tmplts dodoAppTmplts
@@ -136,6 +137,7 @@
nsc installer.NamespaceCreator,
jc installer.JobCreator,
vpnKeyGen installer.VPNAPIClient,
+ cnc installer.ClusterNetworkConfigurator,
env installer.EnvConfig,
external bool,
fetchUsersAddr string,
@@ -171,6 +173,7 @@
nsc,
jc,
vpnKeyGen,
+ cnc,
map[string]map[string]struct{}{},
map[string]appConfig{},
tmplts,
@@ -1073,7 +1076,7 @@
return err
}
hf := installer.NewGitHelmFetcher()
- m, err := installer.NewAppManager(configRepo, s.nsc, s.jc, hf, s.vpnKeyGen, "/")
+ m, err := installer.NewAppManager(configRepo, s.nsc, s.jc, hf, s.vpnKeyGen, s.cnc, "/")
if err != nil {
return err
}
@@ -1220,7 +1223,7 @@
return installer.ReleaseResources{}, err
}
hf := installer.NewGitHelmFetcher()
- m, err := installer.NewAppManager(repo, s.nsc, s.jc, hf, s.vpnKeyGen, "/.dodo")
+ m, err := installer.NewAppManager(repo, s.nsc, s.jc, hf, s.vpnKeyGen, s.cnc, "/.dodo")
if err != nil {
return installer.ReleaseResources{}, err
}