mirror of
https://github.com/rancher/rke.git
synced 2025-08-31 14:36:32 +00:00
Adding ability to set cluster network to none
This commit is contained in:
committed by
Alena Prokharchyk
parent
ff4c93e179
commit
afaad6c824
@@ -39,6 +39,8 @@ const (
|
||||
ProtocolTCP = "TCP"
|
||||
ProtocolUDP = "UDP"
|
||||
|
||||
NoNetworkPlugin = "none"
|
||||
|
||||
FlannelNetworkPlugin = "flannel"
|
||||
FlannelIface = "flannel_iface"
|
||||
FlannelBackendType = "flannel_backend_type"
|
||||
@@ -122,6 +124,9 @@ func (c *Cluster) deployNetworkPlugin(ctx context.Context) error {
|
||||
return c.doCanalDeploy(ctx)
|
||||
case WeaveNetworkPlugin:
|
||||
return c.doWeaveDeploy(ctx)
|
||||
case NoNetworkPlugin:
|
||||
log.Infof(ctx, "[network] Not deploying a cluster network, expecting custom CNI")
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("[network] Unsupported network plugin: %s", c.Network.Plugin)
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ func validateAuthOptions(c *Cluster) error {
|
||||
}
|
||||
|
||||
func validateNetworkOptions(c *Cluster) error {
|
||||
if c.Network.Plugin != FlannelNetworkPlugin && c.Network.Plugin != CalicoNetworkPlugin && c.Network.Plugin != CanalNetworkPlugin && c.Network.Plugin != WeaveNetworkPlugin {
|
||||
if c.Network.Plugin != NoNetworkPlugin && c.Network.Plugin != FlannelNetworkPlugin && c.Network.Plugin != CalicoNetworkPlugin && c.Network.Plugin != CanalNetworkPlugin && c.Network.Plugin != WeaveNetworkPlugin {
|
||||
return fmt.Errorf("Network plugin [%s] is not supported", c.Network.Plugin)
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user