mirror of https://github.com/kubernetes/kops.git
Fixes per code review
This commit is contained in:
parent
8a27c363d0
commit
66d5d55195
3
Makefile
3
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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -438,7 +438,7 @@ func (c *ApplyClusterCmd) Run() error {
|
|||
}
|
||||
|
||||
config.ProtokubeImage = &nodeup.Image{
|
||||
Name: ProtokubeImageName(),
|
||||
Name: kops.DefaultProtokubeImageName(),
|
||||
Source: location,
|
||||
Hash: hash.Hex(),
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue