Commit 9848cdb3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #48281 from hogepodge/configure-swift-store

Automatic merge from submit-queue Add configuration for swift container name **What this PR does / why we need it:** This review updates the OpenStack Heat provider to allow for configuring the name of the Swift object store. **Which issue this PR fixes:** fixes #47966 **Special notes for your reviewer**: Note that the terminology for OpenStack Swift conflicts with K8S terminology. In this instance, container is referring to the organization structure of Swift storage objects. **Release note**: ```release-note Adds configuration option for Swift object store container name to OpenStack Heat provider. ```
parents 950a09d9 c0621061
......@@ -43,6 +43,9 @@ CLUSTER_IP_RANGE=${CLUSTER_IP_RANGE:-10.244.0.0/16}
SWIFT_SERVER_URL=${SWIFT_SERVER_URL:-}
# The name of the object store container to use
SWIFT_OBJECT_STORE=${SWIFT_OBJECT_STORE:-kubernetes}
# Flag indicates if new image must be created. If 'false' then image with IMAGE_ID will be used.
# If 'true' then new image will be created from file config-image.sh
CREATE_IMAGE=${CREATE_IMAGE:-true} # use "true" for devstack
......
......@@ -108,7 +108,7 @@ function create-stack() {
# ROOT
# KUBERNETES_RELEASE_TAR
function upload-resources() {
swift post kubernetes --read-acl '.r:*,.rlistings'
swift post ${SWIFT_OBJECT_STORE} --read-acl '.r:*,.rlistings'
locations=(
"${ROOT}/../../_output/release-tars/${KUBERNETES_RELEASE_TAR}"
......@@ -119,11 +119,11 @@ function upload-resources() {
RELEASE_TAR_PATH=$(dirname ${RELEASE_TAR_LOCATION})
echo "[INFO] Uploading ${KUBERNETES_RELEASE_TAR}"
swift upload kubernetes ${RELEASE_TAR_PATH}/${KUBERNETES_RELEASE_TAR} \
swift upload ${SWIFT_OBJECT_STORE} ${RELEASE_TAR_PATH}/${KUBERNETES_RELEASE_TAR} \
--object-name kubernetes-server.tar.gz
echo "[INFO] Uploading kubernetes-salt.tar.gz"
swift upload kubernetes ${RELEASE_TAR_PATH}/kubernetes-salt.tar.gz \
swift upload ${SWIFT_OBJECT_STORE} ${RELEASE_TAR_PATH}/kubernetes-salt.tar.gz \
--object-name kubernetes-salt.tar.gz
}
......@@ -196,7 +196,7 @@ function run-heat-script() {
fi
SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "$rgx" | cut -d" " -f2 | head -n 1)
fi
local swift_repo_url="${SWIFT_SERVER_URL}/kubernetes"
local swift_repo_url="${SWIFT_SERVER_URL}/${SWIFT_OBJECT_STORE}"
if [ $CREATE_IMAGE = true ]; then
echo "[INFO] Retrieve new image ID"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment