Skip to content
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ test-cyclonus:
kind:
kind create cluster --config ./test/kind/kind.yaml

version: ## prints the version
@echo $(VERSION)

$(TOOLS_DIR)/go.mod:
cd $(TOOLS_DIR); go mod init && go mod tidy

Expand Down
4 changes: 3 additions & 1 deletion cns/cnireconciler/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"k8s.io/utils/exec"
)

const lastCNIWithoutDumpStateVer = "1.4.1"
// >= 1.4.7 is required due to a bug in CNI when the statefile is empty
// even though the command existed since 1.4.2.
const lastCNIWithoutDumpStateVer = "1.4.6"

// IsDumpStateVer checks if the CNI executable is a version that
// has the dump state command required to initialize CNS from CNI
Expand Down
4 changes: 2 additions & 2 deletions cns/cnireconciler/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ func TestIsDumpStateVer(t *testing.T) {
},
{
name: "good ver",
exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.2`),
exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.7`),
want: true,
wantErr: false,
},
{
name: "good dirty ver",
exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.2-7-g7b97e1eb`),
exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.7-7-g7b97e1eb`),
want: true,
wantErr: false,
},
Expand Down