Skip to content

Commit c051a81

Browse files
committed
bug fixed
1 parent 0da66d6 commit c051a81

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

install/init.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func (s *SealosInstaller) InstallMaster0() {
8484
}
8585
//cmd = `kubectl apply -f /root/kube/conf/net/calico.yaml || true`
8686
netyaml := net.NewNetwork(Network, net.MetaData{Interface:Interface,CIDR:PodCIDR}).Manifests("")
87-
cmd = fmt.Sprintf(`cat %s | kubectl apply -f -`, netyaml)
87+
logger.Info("calico yaml is : \n", netyaml)
88+
cmd = fmt.Sprintf(`echo '%s' | kubectl apply -f -`, netyaml)
8889
output = Cmd(s.Masters[0], cmd)
8990
}

net/calico.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ spec:
520520
# marks the pod as a critical add-on, ensuring it gets
521521
# priority scheduling and that its resources are reserved
522522
# if it ever gets evicted.
523-
scheduler.alpha.kubernetes.io/critical-pod: ''
524523
spec:
525524
nodeSelector:
526525
beta.kubernetes.io/os: linux
@@ -767,7 +766,6 @@ spec:
767766
labels:
768767
k8s-app: calico-kube-controllers
769768
annotations:
770-
scheduler.alpha.kubernetes.io/critical-pod: ''
771769
spec:
772770
nodeSelector:
773771
beta.kubernetes.io/os: linux

net/net_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package net
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
func TestNewNetwork(t *testing.T) {
9+
netyaml := NewNetwork("calico", MetaData{Interface:"en.*|eth.*",CIDR:"10.1.1.1/24"}).Manifests("")
10+
fmt.Println(netyaml)
11+
}

0 commit comments

Comments
 (0)