Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update calico to v3.26.1 (calico 版本升级至 v3.26.1) #1961

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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