summaryrefslogtreecommitdiffstats
path: root/kubernetes/oneclick/createAll.bash
diff options
context:
space:
mode:
authorKeren Joseph <keren.joseph@amdocs.com>2017-09-12 10:13:15 +0300
committerKeren Joseph <keren.joseph@amdocs.com>2017-09-12 13:24:47 +0300
commit59ffd500ea34c201fbb3edc39e64655fa8381be0 (patch)
treefca37264aba79ef4cc753470d11a095ddb996fd7 /kubernetes/oneclick/createAll.bash
parentf8bda5c9ee1b5a0519fa5e7faa0fdd5b889e4e85 (diff)
moving certs and keys to k8s secrets
changed location of used certs and keys files, updated deploy yamls and create/delete all Issue-ID: OOM-293 Change-Id: I53766b7028d6b725bf381875105b196246ff2ee1 Signed-off-by: Keren Joseph <keren.joseph@amdocs.com>
Diffstat (limited to 'kubernetes/oneclick/createAll.bash')
-rwxr-xr-xkubernetes/oneclick/createAll.bash10
1 files changed, 10 insertions, 0 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash
index 7b8e2f8886..0ecee0392a 100755
--- a/kubernetes/oneclick/createAll.bash
+++ b/kubernetes/oneclick/createAll.bash
@@ -26,6 +26,14 @@ create_registry_key() {
kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7
}
+create_certs_secret() {
+ if [ -d $LOCATION/config/certs/$i/ ]; then
+ printf "\nCreating certs and keys secret **********\n"
+ _CERTS_FILES=$(find $LOCATION/config/certs/$2/ -type f | awk '$0="--from-file="$0' ORS=' ')
+ kubectl create secret generic secret-$1-$2 $_CERTS_FILES -n $1-$2
+ fi
+}
+
create_onap_helm() {
HELM_VALUES_ADDITION=""
if [[ ! -z $HELM_VALUES_FILEPATH ]]; then
@@ -118,6 +126,8 @@ for i in ${HELM_APPS[@]}; do
printf "\nCreating registry secret **********\n"
create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
+ create_certs_secret $NS $i
+
printf "\nCreating deployments and services **********\n"
create_onap_helm $NS $i $start