Merge "moving certs and keys to k8s secrets"
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Wed, 13 Sep 2017 15:27:51 +0000 (15:27 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 13 Sep 2017 15:27:51 +0000 (15:27 +0000)
1  2 
kubernetes/oneclick/createAll.bash

@@@ -34,11 -23,17 +34,19 @@@ create_namespace() 
  }
  
  create_registry_key() {
 -  kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7
 +  cmd=`echo kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7`
 +  eval ${cmd}
 +  check_return_code $cmd
  }
  
+ 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