diff --git a/Makefile b/Makefile index 8ea5922cea..fa18b46f9b 100644 --- a/Makefile +++ b/Makefile @@ -84,9 +84,7 @@ test: crossbuild-nodeup: mkdir -p .build/dist/ - #GOOS=darwin GOARCH=amd64 go build -a ${EXTRA_BUILDFLAGS} -o .build/dist/darwin/amd64/nodeup -ldflags "${EXTRA_LDFLAGS} -X k8s.io/kops.Version=${VERSION}" k8s.io/kops/cmd/nodeup GOOS=linux GOARCH=amd64 go build -a ${EXTRA_BUILDFLAGS} -o .build/dist/linux/amd64/nodeup -ldflags "${EXTRA_LDFLAGS} -X k8s.io/kops.Version=${VERSION}" k8s.io/kops/cmd/nodeup - #GOOS=windows GOARCH=amd64 go build -o .build/dist/windows/amd64/kops -ldflags "-X k8s.io/kops.Version=${VERSION}" -v k8s.io/kops/cmd/kops/... crossbuild-nodeup-in-docker: docker pull golang:${GOVERSION} # Keep golang image up to date @@ -97,7 +95,6 @@ crossbuild: mkdir -p .build/dist/ GOOS=darwin GOARCH=amd64 go build -a ${EXTRA_BUILDFLAGS} -o .build/dist/darwin/amd64/kops -ldflags "${EXTRA_LDFLAGS} -X k8s.io/kops.Version=${VERSION}" k8s.io/kops/cmd/kops GOOS=linux GOARCH=amd64 go build -a ${EXTRA_BUILDFLAGS} -o .build/dist/linux/amd64/kops -ldflags "${EXTRA_LDFLAGS} -X k8s.io/kops.Version=${VERSION}" k8s.io/kops/cmd/kops - #GOOS=windows GOARCH=amd64 go build -o .build/dist/windows/amd64/kops -ldflags "-X k8s.io/kops.Version=${VERSION}" -v k8s.io/kops/cmd/kops/... crossbuild-in-docker: docker pull golang:${GOVERSION} # Keep golang image up to date diff --git a/hack/dev-build.sh b/hack/dev-build.sh index 4d8992c6f2..30e5c592c4 100755 --- a/hack/dev-build.sh +++ b/hack/dev-build.sh @@ -75,7 +75,7 @@ cd $KOPS_DIRECTORY/.. GIT_VER=git-$(git describe --always) [ -z "$GIT_VER" ] && echo "we do not have GIT_VER something is very wrong" && exit 1; -NODEUP_URL="https://${NODEUP_BUCKET}.s3.amazonaws.com/kops/${GIT_VER}/linux/amd64/nodeup" +KOPS_URL="https://${NODEUP_BUCKET}.s3.amazonaws.com/kops/${GIT_VER}/" echo ========== echo "Starting build" @@ -94,7 +94,7 @@ kops delete cluster \ echo ========== echo "Creating cluster ${CLUSTER_NAME}" -NODEUP_URL=${NODEUP_URL} kops create cluster \ +KOPS_URL=${KOPS_URL} kops create cluster \ --name $CLUSTER_NAME \ --state $KOPS_STATE_STORE \ --node-count $NODE_COUNT \ diff --git a/upup/pkg/fi/cloudup/apply_cluster.go b/upup/pkg/fi/cloudup/apply_cluster.go index b10177a6f4..81d70b5007 100644 --- a/upup/pkg/fi/cloudup/apply_cluster.go +++ b/upup/pkg/fi/cloudup/apply_cluster.go @@ -438,7 +438,7 @@ func (c *ApplyClusterCmd) Run() error { } config.ProtokubeImage = &nodeup.Image{ - Name: ProtokubeImageName(), + Name: kops.DefaultProtokubeImageName(), Source: location, Hash: hash.Hex(), } diff --git a/upup/pkg/fi/cloudup/urls.go b/upup/pkg/fi/cloudup/urls.go index ffb70351f8..9da0a4e3a9 100644 --- a/upup/pkg/fi/cloudup/urls.go +++ b/upup/pkg/fi/cloudup/urls.go @@ -23,11 +23,6 @@ import ( "strings" ) -// ProtokubeImageName is the name of the protokube image, as referenced by docker -func ProtokubeImageName() string { - return "protokube:" + kops.Version -} - // baseUrl caches the BaseUrl value var baseUrl string diff --git a/upup/pkg/fi/nodeup/config.go b/upup/pkg/fi/nodeup/config.go index 76d20b7f33..7a2ccd6a10 100644 --- a/upup/pkg/fi/nodeup/config.go +++ b/upup/pkg/fi/nodeup/config.go @@ -55,6 +55,8 @@ type NodeUpConfig struct { // Image is a docker image we should pre-load type Image struct { // Name is the name of the tagged image + // This is the name we would pass to "docker run", whereas source could be a URL from which + // we would download an image. Name string `json:"name,omitempty"` // Source is the URL from which we should download the image diff --git a/version.go b/version.go index 3495ad6eb1..4d55fb0f67 100644 --- a/version.go +++ b/version.go @@ -17,4 +17,9 @@ limitations under the License. package kops // This should be replaced by the makefile -var Version = "dev" +var Version = "1.5.0" + +// DefaultProtokubeImageName is the name of the protokube image, as we would pass to "docker run" +func DefaultProtokubeImageName() string { + return "protokube:" + Version +}