Skip to content

Commit

Permalink
add config option for cloud/model name
Browse files Browse the repository at this point in the history
  • Loading branch information
slapcat committed Nov 10, 2024
1 parent 40bdcff commit 28bf5f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/bootstrap-k8s-cloud.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash -x
# Usage: ./tools/bootstrap-k8s-cloud.sh <cloud-name> <model-name>
CLOUD="${1:-k8scloud}"
MODEL="${2:-secloud}"

check_kubeconfig() {
if [[ -z "$KUBECONFIG" && ! -f "${HOME}/.kube/config" ]]; then
echo 'ERROR: Cannot find KUBECONFIG! Set as environment variable.'
Expand Down Expand Up @@ -27,9 +31,9 @@ enable_storage() {
}

bootstrap_k8s() {
juju add-k8s k8s-cloud --client
juju bootstrap k8s-cloud
juju add-model secloud
juju add-k8s "$CLOUD" --client
juju bootstrap "$CLOUD"
juju add-model "$MODEL"
}

check_kubeconfig
Expand Down

0 comments on commit 28bf5f5

Please sign in to comment.