Skip to content

Commit

Permalink
Update calico to v3.26.1
Browse files Browse the repository at this point in the history
Signed-off-by: pixiake <guofeng@yunify.com>
(cherry picked from commit 150836f)
  • Loading branch information
pixiake committed Oct 18, 2023
1 parent 3e381c6 commit d7986e3
Show file tree
Hide file tree
Showing 6 changed files with 616 additions and 246 deletions.
2 changes: 1 addition & 1 deletion cmd/kk/apis/kubekey/v1alpha2/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
DefaultRuncVersion = "v1.1.1"
DefaultCrictlVersion = "v1.24.0"
DefaultKubeVersion = "v1.23.10"
DefaultCalicoVersion = "v3.23.2"
DefaultCalicoVersion = "v3.26.1"
DefaultFlannelVersion = "v0.21.3"
DefaultFlannelCniPluginVersion = "v1.1.2"
DefaultCniVersion = "v1.2.0"
Expand Down
11 changes: 10 additions & 1 deletion cmd/kk/apis/kubekey/v1alpha2/network_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type CalicoCfg struct {
VXLANMode string `yaml:"vxlanMode" json:"vxlanMode,omitempty"`
VethMTU int `yaml:"vethMTU" json:"vethMTU,omitempty"`
Ipv4NatOutgoing *bool `yaml:"ipv4NatOutgoing" json:"ipv4NatOutgoing,omitempty"`
DefaultIPPOOL *bool `yaml:"defaultIPPOOL" json:"defaultIPPOOL,omitempty"`
}

type FlannelCfg struct {
Expand Down Expand Up @@ -138,7 +139,15 @@ func (n *NetworkConfig) EnableMultusCNI() bool {
// EnableIPV4POOL_NAT_OUTGOING is used to determine whether to enable CALICO_IPV4POOL_NAT_OUTGOING.
func (c *CalicoCfg) EnableIPV4POOL_NAT_OUTGOING() bool {
if c.Ipv4NatOutgoing == nil {
return true
return false
}
return *c.Ipv4NatOutgoing
}

// EnableDefaultIPPOOL is used to determine whether to create default ippool
func (c *CalicoCfg) EnableDefaultIPPOOL() bool {
if c.DefaultIPPOOL == nil {
return true
}
return *c.DefaultIPPOOL
}
1 change: 1 addition & 0 deletions cmd/kk/pkg/plugins/network/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func deployCalico(d *DeployNetworkPluginModule) []task.Interface {
"VXLANMode": d.KubeConf.Cluster.Network.Calico.VXLANMode,
"ConatinerManagerIsIsula": d.KubeConf.Cluster.Kubernetes.ContainerManager == "isula",
"IPV4POOLNATOUTGOING": d.KubeConf.Cluster.Network.Calico.EnableIPV4POOL_NAT_OUTGOING(),
"DefaultIPPOOL": d.KubeConf.Cluster.Network.Calico.EnableDefaultIPPOOL(),
},
},
Parallel: true,
Expand Down
Loading

0 comments on commit d7986e3

Please sign in to comment.