From 0522b664ac542635b55abd46bcf2f8fa22356db8 Mon Sep 17 00:00:00 2001 From: Chris Kim Date: Fri, 4 Sep 2020 17:49:39 -0700 Subject: [PATCH] Add CanalControllers to support Canal v3.14.0+ Signed-off-by: Chris Kim --- cluster/network.go | 25 +++++++++++++------------ types/rke_types.go | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cluster/network.go b/cluster/network.go index b9b6e8ce..e53f6afd 100644 --- a/cluster/network.go +++ b/cluster/network.go @@ -230,18 +230,19 @@ func (c *Cluster) doCanalDeploy(ctx context.Context, data map[string]interface{} clientConfig := pki.GetConfigPath(pki.KubeNodeCertName) canalConfig := map[string]interface{}{ - ClientCertPath: pki.GetCertPath(pki.KubeNodeCertName), - APIRoot: "https://127.0.0.1:6443", - ClientKeyPath: pki.GetKeyPath(pki.KubeNodeCertName), - ClientCAPath: pki.GetCertPath(pki.CACertName), - KubeCfg: clientConfig, - ClusterCIDR: c.ClusterCIDR, - NodeImage: c.SystemImages.CanalNode, - CNIImage: c.SystemImages.CanalCNI, - CanalFlannelImg: c.SystemImages.CanalFlannel, - RBACConfig: c.Authorization.Mode, - CanalInterface: c.Network.Options[CanalIface], - FlexVolImg: c.SystemImages.CanalFlexVol, + ClientCertPath: pki.GetCertPath(pki.KubeNodeCertName), + APIRoot: "https://127.0.0.1:6443", + ClientKeyPath: pki.GetKeyPath(pki.KubeNodeCertName), + ClientCAPath: pki.GetCertPath(pki.CACertName), + KubeCfg: clientConfig, + ClusterCIDR: c.ClusterCIDR, + NodeImage: c.SystemImages.CanalNode, + CNIImage: c.SystemImages.CanalCNI, + ControllersImage: c.SystemImages.CanalControllers, + CanalFlannelImg: c.SystemImages.CanalFlannel, + RBACConfig: c.Authorization.Mode, + CanalInterface: c.Network.Options[CanalIface], + FlexVolImg: c.SystemImages.CanalFlexVol, FlannelBackend: map[string]interface{}{ "Type": c.Network.Options[CanalFlannelBackendType], "VNI": flannelVni, diff --git a/types/rke_types.go b/types/rke_types.go index 633ef372..93182b2d 100644 --- a/types/rke_types.go +++ b/types/rke_types.go @@ -151,6 +151,8 @@ type RKESystemImages struct { CanalNode string `yaml:"canal_node" json:"canalNode,omitempty"` // Canal CNI image CanalCNI string `yaml:"canal_cni" json:"canalCni,omitempty"` + // Canal Controllers Image needed for Calico/Canal v3.14.0+ + CanalControllers string `yaml:"canal_controllers" json:"canalControllers,omitempty"` //CanalFlannel image CanalFlannel string `yaml:"canal_flannel" json:"canalFlannel,omitempty"` //CanalFlexVol image