Skip to content

Commit

Permalink
test/kubeadm: fix flannel version to 0.14.0
Browse files Browse the repository at this point in the history
it's also a good practice to not rely on the default master branch for
the tests.

so we don't have the pulling issue from: flannel-io/flannel#1482

0.14.0 does not hold the changes related to flannel CNI plugin moved to
its own repository in the latest release of CNI plugins.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
  • Loading branch information
tormath1 committed Oct 15, 2021
1 parent 07ed740 commit 21f359a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions kola/tests/kubeadm/kubeadm.go
Expand Up @@ -44,6 +44,7 @@ var (
// and the nested params are used to render script templates
testConfig = map[string]map[string]interface{}{
"v1.22.0": map[string]interface{}{
"FlannelVersion": "v0.14.0",
"CiliumCLIVersion": "v0.9.0",
"CNIVersion": "v0.8.7",
"CRIctlVersion": "v1.17.0",
Expand All @@ -66,6 +67,7 @@ var (
},
},
"v1.21.0": map[string]interface{}{
"FlannelVersion": "v0.14.0",
"CiliumCLIVersion": "v0.9.0",
"CNIVersion": "v0.8.7",
"CRIctlVersion": "v1.17.0",
Expand Down
1 change: 1 addition & 0 deletions kola/tests/kubeadm/kubeadm_test.go
Expand Up @@ -54,6 +54,7 @@ func TestRenderTemplate(t *testing.T) {
res, err := render(
masterScript,
map[string]interface{}{
"FlannelVersion": "v0.14.0",
"CNI": CNI,
"Endpoints": []string{"http://1.2.3.4:2379"},
"Params": "amd64",
Expand Down
2 changes: 1 addition & 1 deletion kola/tests/kubeadm/templates.go
Expand Up @@ -353,7 +353,7 @@ EOF
kubectl apply -f calico.yaml
{{ end }}
{{ if eq .CNI "flannel" }}
curl -sSfL https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml > kube-flannel.yml
curl -sSfL https://raw.githubusercontent.com/flannel-io/flannel/{{ .FlannelVersion }}/Documentation/kube-flannel.yml > kube-flannel.yml
sed -i "s#10.244.0.0/16#{{ .PodSubnet }}#" kube-flannel.yml
kubectl apply -f kube-flannel.yml
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion kola/tests/kubeadm/testdata/master-flannel-script.sh
Expand Up @@ -84,7 +84,7 @@ EOF



curl -sSfL https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml > kube-flannel.yml
curl -sSfL https://raw.githubusercontent.com/flannel-io/flannel/v0.14.0/Documentation/kube-flannel.yml > kube-flannel.yml
sed -i "s#10.244.0.0/16#192.168.0.0/17#" kube-flannel.yml
kubectl apply -f kube-flannel.yml

Expand Down

0 comments on commit 21f359a

Please sign in to comment.