Skip to content

Commit

Permalink
adds defaulting for kubernetes 1.10 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrIncompetent authored Apr 14, 2018
1 parent 88da7c0 commit 4d1d4a7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pkg/containerruntime/crio/supported_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func GetOfficiallySupportedVersions(kubernetesVersion string) ([]string, error)
return []string{"1.8"}, nil
case "1.9":
return []string{"1.9"}, nil
case "1.10":
return []string{"1.10"}, nil
default:
return nil, errors.NoSupportedVersionsAvailableErr
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerruntime/docker/supported_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func GetOfficiallySupportedVersions(kubernetesVersion string) ([]string, error)

majorMinorString := fmt.Sprintf("%d.%d", v.Major(), v.Minor())
switch majorMinorString {
case "1.8", "1.9":
case "1.8", "1.9", "1.10":
return []string{"1.11.2", "1.12.6", "1.13.1", "17.03.2"}, nil
default:
return nil, errors.NoSupportedVersionsAvailableErr
Expand Down
5 changes: 5 additions & 0 deletions pkg/userdata/ubuntu/crio.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ var crioInstallCandidates = []installCandidate{
pkg: "cri-o-1.9",
pkgVersion: "",
},
{
versions: []string{"1.9", "1.10"},
pkg: "cri-o-1.10",
pkgVersion: "",
},
}

func getCRIOInstallCandidate(desiredVersion string) (pkg string, version string, err error) {
Expand Down
9 changes: 8 additions & 1 deletion pkg/userdata/ubuntu/crio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ func TestGetCRIOInstallCandidate(t *testing.T) {
resVer: "",
},
{
name: "get minor version",
name: "get minor version 1.9",
version: "1.9",
resErr: nil,
resPkg: "cri-o-1.9",
resVer: "",
},
{
name: "get minor version 1.10",
version: "1.10",
resErr: nil,
resPkg: "cri-o-1.10",
resVer: "",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
Expand Down

0 comments on commit 4d1d4a7

Please sign in to comment.