mirror of https://github.com/kubernetes/kops.git
Recognize KOPS_BASE_URL, fallback to KOPS_URL
KOPS_URL feels a little too generic
This commit is contained in:
parent
66d5d55195
commit
95a4069fad
|
|
@ -198,7 +198,7 @@ and then push nodeup using:
|
|||
export S3_BUCKET_NAME=<yourbucketname>
|
||||
make upload S3_BUCKET=s3://${S3_BUCKET_NAME} VERSION=dev
|
||||
|
||||
export KOPS_URL=https://${S3_BUCKET_NAME}.s3.amazonaws.com/kops/dev/
|
||||
export KOPS_BASE_URL=https://${S3_BUCKET_NAME}.s3.amazonaws.com/kops/dev/
|
||||
|
||||
kops create cluster <clustername> --zones us-east-1b
|
||||
...
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
KOPS_URL="https://${NODEUP_BUCKET}.s3.amazonaws.com/kops/${GIT_VER}/"
|
||||
KOPS_BASE_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}"
|
||||
|
||||
KOPS_URL=${KOPS_URL} kops create cluster \
|
||||
KOPS_BASE_URL=${KOPS_BASE_URL} kops create cluster \
|
||||
--name $CLUSTER_NAME \
|
||||
--state $KOPS_STATE_STORE \
|
||||
--node-count $NODE_COUNT \
|
||||
|
|
|
|||
|
|
@ -33,7 +33,15 @@ func BaseUrl() string {
|
|||
return baseUrl
|
||||
}
|
||||
|
||||
baseUrl = os.Getenv("KOPS_URL")
|
||||
// We prefer KOPS_BASE_URL, but we will accept KOPS_URL (for now!)
|
||||
baseUrl = os.Getenv("KOPS_BASE_URL")
|
||||
if baseUrl == "" {
|
||||
baseUrl = os.Getenv("KOPS_URL")
|
||||
if baseUrl != "" {
|
||||
glog.Warningf("Using deprecated KOPS_URL envrionment variable - please use KOPS_BASE_URL instead")
|
||||
}
|
||||
}
|
||||
|
||||
if baseUrl == "" {
|
||||
baseUrl = "https://kubeupv2.s3.amazonaws.com/kops/" + kops.Version + "/"
|
||||
glog.V(4).Infof("Using default base url: %q", baseUrl)
|
||||
|
|
|
|||
Loading…
Reference in New Issue