blob: f226ccae47ca6de15c1da49be4b8b6de974895ed [file] [log] [blame]
Mike Elliottd17accd2017-08-14 16:21:40 -04001#!/bin/bash
2
3usage() {
4 cat <<EOF
5Usage: $0 [PARAMs]
6-u : Display usage
7-n [NAMESPACE] : Kubernetes namespace (required)
8EOF
9}
10
11create_namespace() {
12 kubectl create namespace $1
13}
14
15create_configuration() {
16 create_namespace $1
17 kubectl --namespace $1 create -f pod-config-init.yaml
18}
19
20#MAINs
21NS=
22
23while getopts ":n:u:" PARAM; do
24 case $PARAM in
25 u)
26 usage
27 exit 1
28 ;;
29 n)
30 NS=${OPTARG}
31 ;;
32 ?)
33 usage
34 exit
35 ;;
36 esac
37done
38
39if [[ -z $NS ]]; then
40 usage
41 exit 1
42fi
43
44printf "\n**** Creating configuration for ONAP instance: $NS\n"
45create_configuration $NS
46
47printf "**** Done ****\n"