Fixed missing/wrong references in DG Builder chart

Change-Id: I90eb42468f84120693d5842ea0cd13b1b3c20ecb
Signed-off-by: jmac <james.macnider@amdocs.com>
Issue-ID: OOM-748
diff --git a/kubernetes/common/dgbuilder/resources/config/svclogic.properties b/kubernetes/common/dgbuilder/resources/config/svclogic.properties
index fdaf577..dc3980d 100644
--- a/kubernetes/common/dgbuilder/resources/config/svclogic.properties
+++ b/kubernetes/common/dgbuilder/resources/config/svclogic.properties
@@ -1,5 +1,5 @@
 org.onap.ccsdk.sli.dbtype=jdbc
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
 org.onap.ccsdk.sli.jdbc.database=sdnctl
 org.onap.ccsdk.sli.jdbc.user=sdnctl
 org.onap.ccsdk.sli.jdbc.password=gamma
diff --git a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh
index 38f7fe2..76d1770 100755
--- a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh
+++ b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh
@@ -6,7 +6,7 @@
 	echo "Usage $0 releaseDir  loginId emailAddress [gitLocalRepository]"
 	echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository"
 	exit
-fi 
+fi
 if [ ! -e "releases" ]
 then
 	mkdir releases
@@ -15,7 +15,7 @@
 name="Release $releaseDir"
 loginId="$2"
 emailid="$3"
-dbHost="{{.Values.dbServiceName}}.{{.Release.Namespace}}"
+dbHost="{{.Values.config.dbServiceName}}.{{.Release.Namespace}}"
 dbPort="3306"
 dbName="sdnctl"
 dbUser="sdnctl"
@@ -76,7 +76,7 @@
 	#echo "Created custom settings  file $customSettingsFile"
 	echo "Done ....."
 else
-	echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"	
+	echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"
 	exit
 fi
 #echo "Content of custom settings file"
@@ -86,17 +86,17 @@
 svclogicPropFile="./conf/svclogic.properties"
 if [ ! -d "${appDir}/yangFiles" ]
 then
-	mkdir -p "${appDir}/yangFiles" 
+	mkdir -p "${appDir}/yangFiles"
 fi
 if [ ! -d "${appDir}/generatedJS" ]
 then
-	mkdir -p "${appDir}/generatedJS" 
+	mkdir -p "${appDir}/generatedJS"
 fi
 
 if [ ! -e "./$svclogicPropFile" ]
 then
 	echo "org.onap.ccsdk.sli.dbtype=jdbc" >$svclogicPropFile
-	echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile
+	echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile
 	echo "org.onap.ccsdk.sli.jdbc.database=sdnctl" >>$svclogicPropFile
 	echo "org.onap.ccsdk.sli.jdbc.user=sdnctl" >>$svclogicPropFile
 	echo "org.onap.ccsdk.sli.jdbc.password=gamma" >>$svclogicPropFile
diff --git a/kubernetes/common/dgbuilder/resources/scripts/customSettings.js b/kubernetes/common/dgbuilder/resources/scripts/customSettings.js
index 01bbcc7..22810ba 100644
--- a/kubernetes/common/dgbuilder/resources/scripts/customSettings.js
+++ b/kubernetes/common/dgbuilder/resources/scripts/customSettings.js
@@ -29,7 +29,7 @@
         "user": "dguser",
         "pass": "cc03e747a6afbbcbf8be7668acfebee5"
     },
-    "dbHost": "{{.Values.dbServiceName}}.{{ include "common.namespace" . }}",
+    "dbHost": "{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}",
     "dbPort": "3306",
     "dbName": "sdnctl",
     "dbUser": "sdnctl",
diff --git a/kubernetes/common/dgbuilder/templates/deployment.yaml b/kubernetes/common/dgbuilder/templates/deployment.yaml
index 4e1f101..a1e9568 100644
--- a/kubernetes/common/dgbuilder/templates/deployment.yaml
+++ b/kubernetes/common/dgbuilder/templates/deployment.yaml
@@ -21,7 +21,7 @@
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.dbPodName }}
+        - {{ .Values.config.dbPodName }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -35,10 +35,8 @@
         - name: {{ include "common.name" . }}
           image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          command:
-          - /bin/bash
-          - -c
-          - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
+          command: ["/bin/bash"]
+          args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"]
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           readinessProbe:
diff --git a/kubernetes/common/dgbuilder/values.yaml b/kubernetes/common/dgbuilder/values.yaml
index 23f8eea..a53ed83 100644
--- a/kubernetes/common/dgbuilder/values.yaml
+++ b/kubernetes/common/dgbuilder/values.yaml
@@ -28,13 +28,13 @@
 
   # flag to enable debugging - application support required
   debugEnabled: true
-  
+
 #################################################################
 # Application configuration defaults.
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/ccsdk-dgbuilder-image:v0.1.0
+image: onap/ccsdk-dgbuilder-image:0.2.1-SNAPSHOT
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -43,6 +43,9 @@
 # application configuration
 config:
   dbRootPassword: openECOMP1.0
+  dbPodName: mysql-db
+  dbServiceName: sdnc-dbhost
+
 
 # default number of instances
 replicaCount: 1