mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 05:46:16 +00:00
Made it so that existing Openstack environment variables are used.
If someone has an openrc as part of their profile, this will make kube-up work automatically. The only things that have to be modified are in config-default.sh, either by editing the file or setting environment variables.
This commit is contained in:
parent
126b6c0950
commit
21627f5b7e
@ -15,10 +15,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
## Enviroment variables for the OpenStack command-line client
|
## Enviroment variables for the OpenStack command-line client
|
||||||
|
## Values set via an openrc will override these defaults.
|
||||||
|
|
||||||
export OS_IDENTITY_API_VERSION=2.0
|
export OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-2.0}
|
||||||
export OS_USERNAME=admin
|
export OS_USERNAME=${OS_USERNAME:-admin}
|
||||||
export OS_PASSWORD=secretsecret
|
export OS_PASSWORD=${OS_PASSWORD:-secretsecret}
|
||||||
export OS_AUTH_URL=http://192.168.123.100:5000/v2.0
|
export OS_AUTH_URL=${OS_AUTH_URL:-http://192.168.123.100:5000/v2.0}
|
||||||
export OS_TENANT_NAME=admin
|
export OS_TENANT_NAME=${OS_TENANT_NAME:-admin}
|
||||||
export OS_TENANT_ID=ed51b98b40944d89a449592eb67431eb
|
export OS_TENANT_ID=${OS_TENANT_ID:-ed51b98b40944d89a449592eb67431eb}
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
## Enviroment variables for the OpenStack Swift command-line client. This is required for CityCloud
|
## Enviroment variables for the OpenStack Swift command-line client. This is required for CityCloud
|
||||||
## provider where Swift has different credentials. When Swift is part of your OpenStack use the same
|
## provider where Swift has different credentials. When Swift is part of your OpenStack do not
|
||||||
## settings as in openrc-default.sh
|
## modify these settings.
|
||||||
|
|
||||||
export OS_IDENTITY_API_VERSION=2.0
|
export OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-2.0}
|
||||||
export OS_USERNAME=admin
|
export OS_USERNAME=${OS_USERNAME:-admin}
|
||||||
export OS_PASSWORD=secretsecret
|
export OS_PASSWORD=${OS_PASSWORD:-secretsecret}
|
||||||
export OS_AUTH_URL=http://192.168.123.100:5000/v2.0
|
export OS_AUTH_URL=${OS_AUTH_URL:-http://192.168.123.100:5000/v2.0}
|
||||||
export OS_TENANT_NAME=admin
|
export OS_TENANT_NAME=${OS_TENANT_NAME:-admin}
|
||||||
export OS_TENANT_ID=ed51b98b40944d89a449592eb67431eb
|
export OS_TENANT_ID=${OS_TENANT_ID:-ed51b98b40944d89a449592eb67431eb}
|
||||||
|
@ -91,7 +91,7 @@ function create-stack() {
|
|||||||
echo "[INFO] Execute commands to create Kubernetes cluster"
|
echo "[INFO] Execute commands to create Kubernetes cluster"
|
||||||
# It is required for some cloud provider like CityCloud where swift client has different credentials
|
# It is required for some cloud provider like CityCloud where swift client has different credentials
|
||||||
source "${ROOT}/openrc-swift.sh"
|
source "${ROOT}/openrc-swift.sh"
|
||||||
if [[ -z "${OS_PROJECT_ID}" ]]; then
|
if [[ -z ${OS_PROJECT_ID+x} ]]; then
|
||||||
SWIFT_PROJECT_ID="${OS_TENANT_ID}"
|
SWIFT_PROJECT_ID="${OS_TENANT_ID}"
|
||||||
else
|
else
|
||||||
SWIFT_PROJECT_ID="${OS_PROJECT_ID}"
|
SWIFT_PROJECT_ID="${OS_PROJECT_ID}"
|
||||||
|
Loading…
Reference in New Issue
Block a user