Skip to content

Commit

Permalink
fix to use const.
Browse files Browse the repository at this point in the history
add change log.
add 1.22.
fix changelog

Signed-off-by: oldthreefeng <[email protected]>
  • Loading branch information
oldthreefeng committed Aug 8, 2021
1 parent d7afc96 commit 3d221fa
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 9 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
// Copyright © 2019 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-->

# Table of Contents

- [3.3.9-rc.5](#658)
- [3.3.9-rc.3](#658)

# 3.3.9-rc.5

- feat: fix to use calico new version v1.19.1 package new k8s version. like v1.22.0+ ,v1.21.4+,v1.20.10+, v1.19.14. other k8s version to use old calico version v3.8.2. (#658)

# 3.3.9-rc.3

- hotfix: fix decode cmd miss TokenCaCertHash(#616)
- feat: kubernetes version. like 1.20.0+ , cri use containerd , other use docker-ce.

...
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
- 1.18+
- 1.19+
- 1.20+
- 1.21+
- 1.22+

更多版本支持, 详细查看[sealyun.com](https://www.sealyun.com)

Expand Down Expand Up @@ -102,7 +104,7 @@ $ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos && \
chmod +x sealos && mv sealos /usr/bin

# 下载离线资源包
$ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/2fb10b1396f8c6674355fcc14a8cda7c-v1.20.0/kube1.20.0.tar.gz
$ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/05a3db657821277f5f3b92d834bbaf98-v1.22.0/kube1.22.0.tar.gz

# 安装一个三master的kubernetes集群
$ sealos init --passwd '123456' \
Expand Down
4 changes: 3 additions & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Build a production kubernetes HA cluster.
- 1.18+
- 1.19+
- 1.20+
- 1.21+
- 1.22+

Looking for more supported versions,[sealyun.com](https://www.sealyun.com)
sealos is currently supported the latest k8s 1.20+
sealos is currently supported the latest k8s 1.22+

## Requirements and Recommendations

Expand Down
2 changes: 2 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
- 1.18+
- 1.19+
- 1.20+
- 1.21+
- 1.22+

更多版本支持, 详细查看[sealyun.com](https://www.sealyun.com)

Expand Down
6 changes: 3 additions & 3 deletions cmd/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
if cniType != "calico" && cniType != "flannel" && cniType != "cilium" {
if cniType != net.CALICO && cniType != net.FLANNEL && cniType != net.CILIUM {
logger.Error("unsupport cni: ", cniType)
return
}
if version == "" {
logger.Error("k8s version should not nil ", version)
logger.Error("cni version should not nil ", version)
return
}
yaml := net.NewNetwork(cniType, net.MetaData{
Expand All @@ -58,7 +58,7 @@ to quickly create a Cobra application.`,
func init() {
rootCmd.AddCommand(cniCmd)

cniCmd.Flags().StringVarP(&cniType,"cni-type", "t", "calico", "print cni yaml")
cniCmd.Flags().StringVarP(&cniType,"cni-type", "t", net.CALICO, "print cni yaml, cni tpye just like, calico.flannel.cilium")
cniCmd.Flags().StringVarP(&version,"version", "v", "", "calico version")

// Here you will define your flags and configuration settings.
Expand Down
3 changes: 2 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/fanux/sealos/cert"
"github.com/fanux/sealos/install"
"github.com/fanux/sealos/net"
"github.com/wonderivan/logger"
)

Expand Down Expand Up @@ -129,7 +130,7 @@ func init() {
initCmd.Flags().StringVar(&install.Interface, "interface", "eth.*|en.*|em.*", "name of network interface, when use calico IP_AUTODETECTION_METHOD, set your ipv4 with can-reach=192.168.0.1")

initCmd.Flags().BoolVar(&install.WithoutCNI, "without-cni", false, "If true we not install cni plugin")
initCmd.Flags().StringVar(&install.Network, "network", "calico", "cni plugin, calico..")
initCmd.Flags().StringVar(&install.Network, "network", net.CALICO, "cni plugin, calico..")
initCmd.Flags().BoolVar(&install.BGP, "bgp", false, "bgp mode enable, calico..")
initCmd.Flags().StringVar(&install.MTU, "mtu", "1440", "mtu of the ipip mode , calico..")
initCmd.Flags().StringVar(&install.LvscareImage.Image, "lvscare-image", "fanux/lvscare", "lvscare image name")
Expand Down
3 changes: 2 additions & 1 deletion install/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"gopkg.in/yaml.v2"

"github.com/fanux/sealos/net"
"github.com/wonderivan/logger"
)

Expand Down Expand Up @@ -185,7 +186,7 @@ func (c *SealConfig) ShowDefaultConfig() {
c.Passwd = "123456"
c.PrivateKey = home + "/.ssh/id_rsa"
c.ApiServerDomain = "apiserver.cluster.local"
c.Network = "calico"
c.Network = net.CALICO
c.VIP = "10.103.97.2"
c.PkgURL = home + "/kube1.17.13.tar.gz"
c.Version = "v1.17.13"
Expand Down
4 changes: 2 additions & 2 deletions install/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ func (s *SealosInstaller) InstallMaster0() {
//cmd = `kubectl apply -f /root/kube/conf/net/calico.yaml || true`

// can-reach is used by calico multi network , flannel has nothing to add. just Use it.
if k8s.IsIpv4(Interface) && Network == "calico" {
if k8s.IsIpv4(Interface) && Network == net.CALICO {
Interface = "can-reach=" + Interface
} else if !k8s.IsIpv4(Interface) && Network == "calico" {
} else if !k8s.IsIpv4(Interface) && Network == net.CALICO {
Interface = "interface=" + Interface
}

Expand Down
4 changes: 4 additions & 0 deletions test/note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ echo "### Docker images" >> Note.md
echo "- \`${DOCKER_REPO:-fanux/sealos}:${VERSION}\`" >> Note.md
echo "- \`${DOCKER_REPO:-fanux/sealos}:latest\`" >> Note.md

echo "
### CHANGELOG
[https://github.com/fanux/sealos/blob/develop/CHANGELOG.md#${VERSION}](https://github.com/fanux/sealos/blob/develop/CHANGELOG.md#${VERSION})
" >> Note.md
cat Note.md

0 comments on commit 3d221fa

Please sign in to comment.