Merge "skip commented lines from values.yaml"
diff --git a/kubernetes/config/docker/init/src/config/aai/haproxy/haproxy.cfg b/kubernetes/aai/resources/config/haproxy/haproxy.cfg
similarity index 100%
rename from kubernetes/config/docker/init/src/config/aai/haproxy/haproxy.cfg
rename to kubernetes/aai/resources/config/haproxy/haproxy.cfg
diff --git a/kubernetes/aai/templates/aai-deployment-configmap.yaml b/kubernetes/aai/templates/aai-deployment-configmap.yaml
new file mode 100644
index 0000000..40d4909
--- /dev/null
+++ b/kubernetes/aai/templates/aai-deployment-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAaiAaiService }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-deployment-configmap
+  namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/aai/templates/aai-deployment.yaml b/kubernetes/aai/templates/aai-deployment.yaml
index a65cf44..e0e422b 100644
--- a/kubernetes/aai/templates/aai-deployment.yaml
+++ b/kubernetes/aai/templates/aai-deployment.yaml
@@ -42,6 +42,7 @@
         - mountPath: /dev/log
           name: aai-service-log
         - mountPath: /usr/local/etc/haproxy/haproxy.cfg
+          subPath: haproxy.cfg
           name: haproxy-cfg
         ports:
         - containerPort: 8080
@@ -59,8 +60,8 @@
           hostPath:
             path: "/dev/log"
         - name: haproxy-cfg
-          hostPath:
-            path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/haproxy.cfg"
+          configMap:
+            name: aai-deployment-configmap
       restartPolicy: Always
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
diff --git a/kubernetes/aai/templates/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml
index fd8e10c..3c1949c 100644
--- a/kubernetes/aai/templates/hbase-deployment.yaml
+++ b/kubernetes/aai/templates/hbase-deployment.yaml
@@ -33,13 +33,18 @@
           initialDelaySeconds: 5
           periodSeconds: 10
         volumeMounts:
+        - name: hbase-data
+          mountPath: /tmp
         - name: localtime
           mountPath: /etc/localtime
           readOnly: true
       volumes:
+      - name: hbase-data
+        hostPath:
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aai/hbase
       - name: localtime
         hostPath:
           path: /etc/localtime
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-elastic-search.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-elastic-search.json
new file mode 100644
index 0000000..7785502
--- /dev/null
+++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-elastic-search.json
@@ -0,0 +1,23 @@
+{
+  "service": {
+    "name": "Health Check: Log - Elastic Search",
+    "checks": [
+      {
+        "id": "log-elasticsearch-server",
+        "name": "Log Elastic Search Health Check",
+        "http": "http://elasticsearch.onap-log:9200/_cluster/health?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-elasticsearch-tcp",
+        "name": "Log Elastic Search TCP Health Check",
+        "tcp": "elasticsearchtcp.onap-log:9300",
+        "interval": "15s",
+        "timeout": "1s"
+      }
+    ]
+  }
+}
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json
new file mode 100644
index 0000000..794fb4b
--- /dev/null
+++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-kibana.json
@@ -0,0 +1,16 @@
+{
+  "service": {
+    "name": "Health Check: Log - Kibana",
+    "checks": [
+      {
+        "id": "log-kibana-server",
+        "name": "Log kibana Health Check",
+        "http": "http://kibana.onap-log:5601/status",
+        "method": "HEAD",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      }
+    ]
+  }
+}
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json
new file mode 100644
index 0000000..3c0f450
--- /dev/null
+++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/log-logstash.json
@@ -0,0 +1,95 @@
+{
+  "service": {
+    "name": "Health Check: Log - Log Stash",
+    "checks": [
+      {
+        "id": "log-logstash-internal-server-gi",
+        "name": "Log Stash Health Check - General Information",
+        "http": "http://logstashinternal.onap-log:9600/?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-node-info",
+        "name": "Log Stash Health Check - Node Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-os-info",
+        "name": "Log Stash Health Check - OS Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/os?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-jvm-info",
+        "name": "Log Stash Health Check - JVM Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/jvm?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-plugin-info",
+        "name": "Log Stash Health Check - Plugin Information",
+        "http": "http://logstashinternal.onap-log:9600/_node/plugins?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-node-stat",
+        "name": "Log Stash Health Check - Node Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-jvm-stat",
+        "name": "Log Stash Health Check - JVM Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/jvm?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-process-stat",
+        "name": "Log Stash Health Check - Process Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/process?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-internal-server-os-stat",
+        "name": "Log Stash Health Check - OS Stats",
+        "http": "http://logstashinternal.onap-log:9600/_node/stats/os?pretty",
+        "method": "GET",
+        "tls_skip_verify": true,
+        "interval": "15s",
+        "timeout": "1s"
+      },
+      {
+        "id": "log-logstash-tcp",
+        "name": "Log Stash File Beat TCP Health Check",
+        "tcp": "logstash.onap-log:5044",
+        "interval": "15s",
+        "timeout": "1s"
+      }
+    ]
+  }
+}
diff --git a/kubernetes/log/templates/all-services.yaml b/kubernetes/log/templates/all-services.yaml
index 0885aff..e8b6b81 100644
--- a/kubernetes/log/templates/all-services.yaml
+++ b/kubernetes/log/templates/all-services.yaml
@@ -36,6 +36,21 @@
 apiVersion: v1
 kind: Service
 metadata:
+  name: logstashinternal
+  namespace: {{ .Values.nsPrefix }}-log
+  labels:
+    app: logstash
+spec:
+  ports:
+  - name: http
+    port: 9600
+    targetPort: 9600
+  selector:
+    app: logstash
+---
+apiVersion: v1
+kind: Service
+metadata:
   name: logstash
   namespace: {{ .Values.nsPrefix }}-log
   labels:
diff --git a/kubernetes/log/templates/logstash-deployment.yaml b/kubernetes/log/templates/logstash-deployment.yaml
index 47c72c8..f99657a 100644
--- a/kubernetes/log/templates/logstash-deployment.yaml
+++ b/kubernetes/log/templates/logstash-deployment.yaml
@@ -35,9 +35,12 @@
       - name: logstash
         image: {{ .Values.image.logstash }}
         ports:
-        - containerPort: 5044 
+        - containerPort: 5044
           name: transport
           protocol: TCP
+        - containerPort: 9600
+          name: http
+          protocol: TCP
         readinessProbe:
           tcpSocket:
             port: 5044
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash
index 0240c83..5a99b19 100755
--- a/kubernetes/oneclick/createAll.bash
+++ b/kubernetes/oneclick/createAll.bash
@@ -86,8 +86,8 @@
 
   # assign default auth token
   if [[ -z $ONAP_DEFAULT_AUTH_TOKEN ]]; then
-    DEFAULT_SECRET=`kubectl get secrets -n kube-system | grep default-token |  awk '{ print $1}'`
-    ONAP_DEFAULT_AUTH_TOKEN=`kubectl get secrets $DEFAULT_SECRET -n kube-system -o yaml | grep  'token:'  | awk '{ print $2}' | base64 --decode`
+    DEFAULT_SECRET=`kubectl get secrets -n $1-$2 | grep default-token |  awk '{ print $1}'`
+    ONAP_DEFAULT_AUTH_TOKEN=`kubectl get secrets $DEFAULT_SECRET -n $1-$2 -o yaml | grep  'token:'  | awk '{ print $2}' | base64 --decode`
   fi
 
   cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3,kubeMasterAuthToken=$ONAP_DEFAULT_AUTH_TOKEN ${HELM_VALUES_ADDITION}`
diff --git a/kubernetes/config/docker/init/src/config/sdnc/dmaap/dhcpalert.properties b/kubernetes/sdnc/resources/config/dmaap/dhcpalert.properties
similarity index 100%
rename from kubernetes/config/docker/init/src/config/sdnc/dmaap/dhcpalert.properties
rename to kubernetes/sdnc/resources/config/dmaap/dhcpalert.properties
diff --git a/kubernetes/config/docker/init/src/config/sdnc/ueb/ueb-listener.properties b/kubernetes/sdnc/resources/config/ueb/ueb-listener.properties
similarity index 100%
rename from kubernetes/config/docker/init/src/config/sdnc/ueb/ueb-listener.properties
rename to kubernetes/sdnc/resources/config/ueb/ueb-listener.properties
diff --git a/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml
new file mode 100644
index 0000000..efd7d6d
--- /dev/null
+++ b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableSdncDmaap }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sdnc-dmaap-configmap
+  namespace: {{ .Values.nsPrefix }}-sdnc
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/dmaap-deployment.yaml b/kubernetes/sdnc/templates/dmaap-deployment.yaml
index b0f0a7b..b9ba346 100644
--- a/kubernetes/sdnc/templates/dmaap-deployment.yaml
+++ b/kubernetes/sdnc/templates/dmaap-deployment.yaml
@@ -47,14 +47,15 @@
           name: localtime
           readOnly: true
         - mountPath: /opt/onap/sdnc/data/properties/dhcpalert.properties
+          subPath: dhcpalert.properties
           name: dmaap-dhcapalert-config
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
         - name: dmaap-dhcapalert-config
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/dmaap/dhcpalert.properties
+          configMap:
+            name: sdnc-dmaap-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml
new file mode 100644
index 0000000..4970de0
--- /dev/null
+++ b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableSdncUeb }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sdnc-ueb-configmap
+  namespace: {{ .Values.nsPrefix }}-sdnc
+data:
+{{ tpl (.Files.Glob "resources/config/ueb/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/ueb-deployment.yaml b/kubernetes/sdnc/templates/ueb-deployment.yaml
index 324e0e1..a7e5e74 100644
--- a/kubernetes/sdnc/templates/ueb-deployment.yaml
+++ b/kubernetes/sdnc/templates/ueb-deployment.yaml
@@ -47,14 +47,15 @@
           name: localtime
           readOnly: true
         - mountPath: /opt/onap/sdnc/data/properties/ueb-listener.properties
+          subPath: ueb-listener.properties
           name: ueb-config
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
         - name: ueb-config
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/ueb/ueb-listener.properties
+          configMap:
+            name: sdnc-ueb-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}