Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Be flexible with versions
Browse files Browse the repository at this point in the history
Signed-off-by: Chuck Ha <[email protected]>
  • Loading branch information
chuckha committed Jul 5, 2019
1 parent 7a0f729 commit e93a5fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/capdctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func makeManagementCluster(clusterName, capiVersion, capdImage, capiImageOverrid
HostPath: "/var/run/docker.sock",
},
}
cp, err := actions.CreateControlPlane(clusterName, "management-control-plane", lbipv4, "v1.14.2", cpMounts)
cp, err := actions.CreateControlPlane(clusterName, fmt.Sprintf("%s-control-plane", clusterName), lbipv4, "v1.14.2", cpMounts)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -293,6 +293,8 @@ func makeManagementCluster(clusterName, capiVersion, capdImage, capiImageOverrid
cmd.SetStdout(os.Stdout)
cmd.SetStderr(os.Stderr)
if err := cmd.Run(); err != nil {
out, _ := ioutil.ReadFile(f.Name())
fmt.Println(out)
panic(err)
}
}
Expand Down
4 changes: 4 additions & 0 deletions kind/actions/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"os"
"path/filepath"
"regexp"
"strings"

"github.com/pkg/errors"
"sigs.k8s.io/cluster-api-provider-docker/third_party/forked/loadbalancer"
Expand Down Expand Up @@ -291,6 +292,9 @@ func writeKubeConfig(n *nodes.Node, dest string, hostAddress string, hostPort in
}

func image(version string) string {
if !strings.HasPrefix(version, "v") {
version = fmt.Sprintf("v%s", version)
}
// valid kindest node versions, but only > v1.14.0
switch version {
case "v1.14.1", "v1.14.2", "v1.14.3", "v1.15.0":
Expand Down

0 comments on commit e93a5fe

Please sign in to comment.