From: garciadeblas Date: Mon, 6 Jul 2020 15:03:39 +0000 (+0000) Subject: Fix bug 1124: K8s added to juju after k8s has been initialized X-Git-Tag: v8.0.0rc3~27 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=162a534784a64c36ae6d16f5b97c1cdc62e7fdc7;p=osm%2Fdevops.git Fix bug 1124: K8s added to juju after k8s has been initialized Change-Id: I757eb90f35db1af95081c3e3dd3ffef30ff98197 Signed-off-by: garciadeblas --- diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index f19b4810..22cb9f90 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -425,13 +425,13 @@ function juju_createcontroller() { sg lxd -c "juju bootstrap --bootstrap-series=xenial $OSM_VCA_CLOUDNAME $OSM_STACK_NAME" fi [ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed" - - if [ -n "$KUBERNETES" ]; then - cat .kube/config | juju add-k8s $OSM_VCA_K8S_CLOUDNAME --controller $OSM_STACK_NAME - fi juju controller-config features=[k8s-operators] } +function juju_addk8s() { + cat .kube/config | juju add-k8s $OSM_VCA_K8S_CLOUDNAME --controller $OSM_STACK_NAME +} + function juju_createproxy() { check_install_iptables_persistent @@ -1162,6 +1162,11 @@ EOF track docker_swarm fi + if [ -n "$KUBERNETES" ]; then + juju_addk8s + track juju_addk8s + fi + [ -z "$DOCKER_NOBUILD" ] && generate_docker_images track docker_build