aai K8S-Helm Parameterization

changed aai k8s deployment to support helm parameterization.
Issue-ID: OOM-52
Change-Id: Ifffdb4204a3fdb2c7be62063134c489f8123012d
Signed-off-by: kerenj <keren.joseph@amdocs.com>
diff --git a/kubernetes/aai/Chart.yaml b/kubernetes/aai/Chart.yaml
new file mode 100644
index 0000000..2046a10
--- /dev/null
+++ b/kubernetes/aai/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: aai
+version: 0.1.0
diff --git a/kubernetes/aai/aai-deployment.yaml b/kubernetes/aai/templates/aai-deployment.yaml
similarity index 82%
rename from kubernetes/aai/aai-deployment.yaml
rename to kubernetes/aai/templates/aai-deployment.yaml
index 857044d..286a9ac 100644
--- a/kubernetes/aai/aai-deployment.yaml
+++ b/kubernetes/aai/templates/aai-deployment.yaml
@@ -2,6 +2,7 @@
 kind: Deployment
 metadata:
   name: aai-service
+  namespace: {{ .Values.NS }}
 spec:
   selector:
     matchLabels:
@@ -32,8 +33,8 @@
                       }
                   }
               ],
-              "image": "oomk8s/readiness-check:1.0.0",
-              "imagePullPolicy": "Always",
+              "image": "{{ .Values.image.readiness }}",
+              "imagePullPolicy": "{{ .Values.pullPolicy }}",
               "name": "aai-service-readiness"
           }
           ]'
@@ -52,7 +53,8 @@
           value: noninteractive
         - name: JAVA_HOME
           value: /usr/lib/jvm/java-8-openjdk-amd64
-        image: nexus3.onap.org:10001/openecomp/ajsc-aai:1.0-STAGING-latest
+        image: {{ .Values.image.ajscAai }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
         name: aai-service
         volumeMounts:
         - mountPath: /etc/ssl/certs/
@@ -74,16 +76,16 @@
       volumes:
         - name: aai-service-certs
           hostPath:
-            path: /dockerdata-nfs/onapdemo/aai/etc/ssl/certs/
+            path: /dockerdata-nfs/onap/aai/etc/ssl/certs/
         - name: aai-service-logroot
           hostPath:
-            path: /dockerdata-nfs/onapdemo/aai/opt/aai/logroot/
+            path: /dockerdata-nfs/onap/aai/opt/aai/logroot/
         - name: aai-config
           hostPath:
-            path: /dockerdata-nfs/onapdemo/aai/aai-config/
+            path: /dockerdata-nfs/onap/aai/aai-config/
         - name: aai-data
           hostPath:
-            path: /dockerdata-nfs/onapdemo/aai/aai-data/
+            path: /dockerdata-nfs/onap/aai/aai-data/
       restartPolicy: Always
       imagePullSecrets:
       - name: onap-docker-registry-key
diff --git a/kubernetes/aai/all-services.yaml b/kubernetes/aai/templates/all-services.yaml
similarity index 90%
rename from kubernetes/aai/all-services.yaml
rename to kubernetes/aai/templates/all-services.yaml
index 4cbc5e7..4a016f4 100644
--- a/kubernetes/aai/all-services.yaml
+++ b/kubernetes/aai/templates/all-services.yaml
@@ -2,6 +2,7 @@
 kind: Service
 metadata:
   name: hbase
+  namespace: {{ .Values.NS }}
   labels:
     app: hbase
 spec:
@@ -16,6 +17,7 @@
 kind: Service
 metadata:
   name: aai-service
+  namespace: {{ .Values.NS }}
   labels:
     app: aai-service
 spec:
@@ -36,6 +38,7 @@
 kind: Service
 metadata:
   name: model-loader-service
+  namespace: {{ .Values.NS }}
   labels:
     app: model-loader-service
 spec:
diff --git a/kubernetes/aai/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml
similarity index 78%
rename from kubernetes/aai/hbase-deployment.yaml
rename to kubernetes/aai/templates/hbase-deployment.yaml
index d39d0c7..5de7b98 100644
--- a/kubernetes/aai/hbase-deployment.yaml
+++ b/kubernetes/aai/templates/hbase-deployment.yaml
@@ -2,6 +2,7 @@
 kind: Deployment
 metadata:
   name: hbase
+  namespace: {{ .Values.NS }}
 spec:
   selector:
     matchLabels:
@@ -16,10 +17,11 @@
       volumes:
         - name: hbase-opt-data
           hostPath:
-            path: /dockerdata-nfs/onapdemo/aai/hbase/opt/data
+            path: /dockerdata-nfs/onap/aai/hbase/opt/data
       containers:
       - name: hbase
-        image: aaidocker/aai-hbase-1.2.3:latest
+        image: {{ .Values.image.aaiHbase }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /opt/data/
           name: hbase-opt-data
diff --git a/kubernetes/aai/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml
similarity index 88%
rename from kubernetes/aai/modelloader-deployment.yaml
rename to kubernetes/aai/templates/modelloader-deployment.yaml
index e649fc0..96c9ee1 100644
--- a/kubernetes/aai/modelloader-deployment.yaml
+++ b/kubernetes/aai/templates/modelloader-deployment.yaml
@@ -2,6 +2,7 @@
 kind: Deployment
 metadata:
   name: model-loader-service
+  namespace: {{ .Values.NS }}
 spec:
   selector:
     matchLabels:
@@ -32,8 +33,8 @@
                       }
                   }
               ],
-              "image": "oomk8s/readiness-check:1.0.0",
-              "imagePullPolicy": "Always",
+              "image": "{{ .Values.image.readiness }}",
+              "imagePullPolicy": "{{ .Values.pullPolicy }}",
               "name": "model-loader-readiness"
           },
           {
@@ -58,8 +59,8 @@
                       "value": "onap-sdc"
                   }
               ],
-              "image": "oomk8s/readiness-check:1.0.0",
-              "imagePullPolicy": "Always",
+              "image": "{{ .Values.image.readiness }}",
+              "imagePullPolicy": "{{ .Values.pullPolicy }}",
               "name": "model-loader-sdc-readiness"
           }
           ]'
@@ -82,7 +83,8 @@
           value: ModelLoader
         - name: APP_SERVER_AUTH_PASSWORD
           value: OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw
-        image: nexus3.onap.org:10001/openecomp/model-loader:1.0-STAGING-latest
+        image: {{ .Values.image.modelLoader }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
         name: model-loader-service
         ports:
         - containerPort: 8080
diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml
new file mode 100644
index 0000000..12b8b3b
--- /dev/null
+++ b/kubernetes/aai/values.yaml
@@ -0,0 +1,7 @@
+NS: onap-aai
+pullPolicy: Always
+image:
+  readiness: oomk8s/readiness-check:1.0.0
+  ajscAai: nexus3.onap.org:10001/openecomp/ajsc-aai:1.0-STAGING-latest
+  aaiHbase: aaidocker/aai-hbase-1.2.3:latest
+  modelLoader: nexus3.onap.org:10001/openecomp/model-loader:1.0-STAGING-latest
diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash
index b24d5aa..996a875 100644
--- a/kubernetes/oneclick/setenv.bash
+++ b/kubernetes/oneclick/setenv.bash
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc')
-ONAP_APPS=('sdc' 'aai')
+HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai')
+ONAP_APPS=('sdc')
 ONAP_DOCKER_REGISTRY_KEY=${ONAP_DOCKER_REGISTRY_KEY:-onap-docker-registry-key}
 ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001}
 ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker}