diff options
author | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2017-08-25 03:31:17 +0000 |
---|---|---|
committer | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2017-08-25 03:41:20 +0000 |
commit | 0e8f8899ca6fdc589316c59f90f8f7283bbfad49 (patch) | |
tree | 7c3ed2c2b519b365572ca4a3539320164511c4bd /kubernetes/oneclick/createAll.bash | |
parent | deab10d15301b12eee943d7c6151c4300ba2ac2a (diff) |
refactor helm files to use namespace prefix
-removed the full namespace from each template. better lets us reuse
variables.
-made secret end up in a configurable namespace
-fixed some bugs where secrets were missing
-updated createAll and delete to make use of namespace prefix
removing the need for seds to replace the word onap.
*** all containers at this point come up in my env. except for
aai model loader which is failing cause its still at 1.0
and its trying to talk to a 1.1 sdc and it doesnt auth properly. ***
Issue-ID:OOM-215
Change-Id: I15815a01469786a391e272fde4bdaa53ff48091c
Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Diffstat (limited to 'kubernetes/oneclick/createAll.bash')
-rwxr-xr-x | kubernetes/oneclick/createAll.bash | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index 95dd809027..829f27a4df 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -25,7 +25,7 @@ create_registry_key() { } create_onap_helm() { - helm install ../$2/ --name $2 + helm install ../$2/ --name $2 --namespace $1 --set nsPrefix=$1 } configure_app() { @@ -39,21 +39,7 @@ configure_app() { if [ -e "$2/Chart.yaml" ]; then sed -i-- 's/nodePort: [0-9]\{2\}[02468]\{1\}/nodePort: '"$4"'/g' $3/all-services.yaml sed -i-- 's/nodePort: [0-9]\{2\}[13579]\{1\}/nodePort: '"$5"'/g' $3/all-services.yaml - sed -i "s/onap-/$1-/g" ../$2/values.yaml fi - - - # replace the default 'onap' namespace qualification of K8s hostnames within - # the config files - # note: this will create a '-template' file within the component's directory - # this is not ideal and should be addressed (along with the replacement - # of sed commands for configuration) by the future configuration - # user stories (ie. OOM-51 to OOM-53) - find $3 -type f -exec sed -i -- "s/onap-/$1-/g" {} \; - - # replace the default '/dockerdata-nfs/onapdemo' volume mount paths - find $3 -iname "*.yaml" -type f -exec sed -i -e 's/dockerdata-nfs\/[a-zA-Z0-9\\-]*\//dockerdata-nfs\/'"$1"'\//g' {} \; - rm -f $3/*.yaml-e } @@ -130,7 +116,7 @@ for i in ${HELM_APPS[@]}; do create_namespace $NS $i printf "\nCreating registry secret **********\n" - create_registry_key $NS $i $ONAP_DOCKER_REGISTRY_KEY $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL + create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL printf "\nCreating deployments and services **********\n" _FILES_PATH=$(echo ../$i/templates) @@ -141,4 +127,3 @@ for i in ${HELM_APPS[@]}; do done printf "\n**** Done ****\n" - |