1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 22:46:25 +00:00

Add custom flexvolume capabilities to canal and calico

This commit is contained in:
Chris Kim
2020-02-21 10:52:18 -08:00
parent 64f0d7808d
commit 97371fe82d
2 changed files with 19 additions and 8 deletions

View File

@@ -52,10 +52,11 @@ const (
// FlannelBackendVxLanNetworkIdentify should be greater than or equal to 4096 if using VxLan mode in the cluster with Windows nodes
FlannelBackendVxLanNetworkIdentify = "flannel_backend_vni"
CalicoNetworkPlugin = "calico"
CalicoNodeLabel = "calico-node"
CalicoControllerLabel = "calico-kube-controllers"
CalicoCloudProvider = "calico_cloud_provider"
CalicoNetworkPlugin = "calico"
CalicoNodeLabel = "calico-node"
CalicoControllerLabel = "calico-kube-controllers"
CalicoCloudProvider = "calico_cloud_provider"
CalicoFlexVolPluginDirectory = "calico_flex_volume_plugin_dir"
CanalNetworkPlugin = "canal"
CanalIface = "canal_iface"
@@ -64,6 +65,7 @@ const (
CanalFlannelBackendPort = "canal_flannel_backend_port"
// CanalFlannelBackendVxLanNetworkIdentify should be greater than or equal to 4096 if using Flannel VxLan mode in the cluster with Windows nodes
CanalFlannelBackendVxLanNetworkIdentify = "canal_flannel_backend_vni"
CanalFlexVolPluginDirectory = "canal_flex_volume_plugin_dir"
WeaveNetworkPlugin = "weave"
WeaveNetworkAppName = "weave-net"
@@ -104,6 +106,7 @@ const (
FlannelInterface = "FlannelInterface"
FlannelBackend = "FlannelBackend"
CanalInterface = "CanalInterface"
FlexVolPluginDir = "FlexVolPluginDir"
WeavePassword = "WeavePassword"
MTU = "MTU"
RBACConfig = "RBACConfig"
@@ -199,6 +202,7 @@ func (c *Cluster) doCalicoDeploy(ctx context.Context, data map[string]interface{
NodeSelector: c.Network.NodeSelector,
MTU: c.Network.MTU,
UpdateStrategy: c.Network.UpdateStrategy,
FlexVolPluginDir: c.Network.Options[CalicoFlexVolPluginDirectory],
}
pluginYaml, err := c.getNetworkPluginManifest(calicoConfig, data)
if err != nil {
@@ -236,9 +240,10 @@ func (c *Cluster) doCanalDeploy(ctx context.Context, data map[string]interface{}
"VNI": flannelVni,
"Port": flannelPort,
},
NodeSelector: c.Network.NodeSelector,
MTU: c.Network.MTU,
UpdateStrategy: c.Network.UpdateStrategy,
NodeSelector: c.Network.NodeSelector,
MTU: c.Network.MTU,
UpdateStrategy: c.Network.UpdateStrategy,
FlexVolPluginDir: c.Network.Options[CanalFlexVolPluginDirectory],
}
pluginYaml, err := c.getNetworkPluginManifest(canalConfig, data)
if err != nil {