Skip to content
Snippets Groups Projects
Commit de5fc1da authored by garciadav's avatar garciadav Committed by Mark Beierl
Browse files

Improve annotations for exposing OSM services in charmed installer


Change-Id: Iffde16ff5f92aa3a99f2fb8e1ff22c8b9eb61caf
Signed-off-by: default avatarDavid Garcia <david.garcia@canonical.com>
parent 2a815a3f
No related branches found
No related tags found
No related merge requests found
......@@ -210,25 +210,30 @@ function deploy_charmed_osm(){
API_SERVER="$(echo $hostport | sed -e 's,:.*,,g')"
fi
# Expose OSM services
# Expose NBI
juju config nbi-k8s juju-external-hostname=nbi.${API_SERVER}.xip.io
juju expose nbi-k8s
wait_for_port nbi-k8s 0
sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[0].metadata.annotations += {\"nginx.ingress.kubernetes.io/backend-protocol\": \"HTTPS\"}' | ${KUBECTL} --validate=false replace -f -"
sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[0].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} replace -f -"
# Expose NG UI
juju config ng-ui juju-external-hostname=ui.${API_SERVER}.xip.io
juju expose ng-ui
wait_for_port ng-ui 1
sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[2].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} --validate=false replace -f -"
# Expose UI
juju config ui-k8s juju-external-hostname=osm.${API_SERVER}.xip.io
juju expose ui-k8s
# Wait for ingress resources to be applied
wait_for_port nbi-k8s 0
wait_for_port ng-ui 1
wait_for_port ui-k8s 2
sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[1].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} --validate=false replace -f -"
}
# Apply annotations
sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/backend-protocol=HTTPS -n osm -l juju-app=nbi-k8s"
sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=nbi-k8s"
sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=ng-ui"
sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=ui-k8s"
function check_osm_deployed() {
TIME_TO_WAIT=600
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment