Replica Scaling of AAI Container

Issue-ID: OOM-684

Change-Id: Ic642c248b3650dd645d1f7cb1442868b51f23f56
Signed-off-by: vaibhav_16dec <vaibhav.chopra@amdocs.com>
diff --git a/kubernetes/aai/templates/aai-deployment.yaml b/kubernetes/aai/templates/aai-deployment.yaml
index e0e422b..4e8d82f 100644
--- a/kubernetes/aai/templates/aai-deployment.yaml
+++ b/kubernetes/aai/templates/aai-deployment.yaml
@@ -5,6 +5,7 @@
   name: aai-service
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.aaiServiceReplicas }}
   selector:
     matchLabels:
       app: aai-service
diff --git a/kubernetes/aai/templates/aai-resources-deployment.yaml b/kubernetes/aai/templates/aai-resources-deployment.yaml
index 2e0b049..dd7d7cc 100644
--- a/kubernetes/aai/templates/aai-resources-deployment.yaml
+++ b/kubernetes/aai/templates/aai-resources-deployment.yaml
@@ -5,6 +5,7 @@
   name: aai-resources
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.aaiResourceReplicas }}
   selector:
     matchLabels:
       app: aai-resources
diff --git a/kubernetes/aai/templates/aai-traversal-deployment.yaml b/kubernetes/aai/templates/aai-traversal-deployment.yaml
index a61a83e..38e7fb0 100644
--- a/kubernetes/aai/templates/aai-traversal-deployment.yaml
+++ b/kubernetes/aai/templates/aai-traversal-deployment.yaml
@@ -5,6 +5,7 @@
   name: aai-traversal
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.aaiTraversalReplicas }}
   selector:
     matchLabels:
       app: aai-traversal
diff --git a/kubernetes/aai/templates/data-router-deployment.yaml b/kubernetes/aai/templates/data-router-deployment.yaml
index 06dbc91..5a7f9e9 100644
--- a/kubernetes/aai/templates/data-router-deployment.yaml
+++ b/kubernetes/aai/templates/data-router-deployment.yaml
@@ -5,6 +5,7 @@
   name: data-router
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.dataRouterReplicas }}
   selector:
     matchLabels:
       app: data-router
diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml
index baa1cb8..d3535d0 100644
--- a/kubernetes/aai/templates/elasticsearch-deployment.yaml
+++ b/kubernetes/aai/templates/elasticsearch-deployment.yaml
@@ -5,6 +5,7 @@
   name: elasticsearch
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.elasticsearchReplicas }}
   selector:
     matchLabels:
       app: elasticsearch
diff --git a/kubernetes/aai/templates/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml
index 3c1949c..5b2a98c 100644
--- a/kubernetes/aai/templates/hbase-deployment.yaml
+++ b/kubernetes/aai/templates/hbase-deployment.yaml
@@ -5,6 +5,7 @@
   name: hbase
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.hbaseReplicas }}
   selector:
     matchLabels:
       app: hbase
diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml
index 2508446..c5a788c 100644
--- a/kubernetes/aai/templates/modelloader-deployment.yaml
+++ b/kubernetes/aai/templates/modelloader-deployment.yaml
@@ -5,6 +5,7 @@
   name: model-loader-service
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.modelLoaderReplicas }}
   selector:
     matchLabels:
       app: model-loader-service
diff --git a/kubernetes/aai/templates/search-data-service-deployment.yaml b/kubernetes/aai/templates/search-data-service-deployment.yaml
index 5f66710..7202e0d 100644
--- a/kubernetes/aai/templates/search-data-service-deployment.yaml
+++ b/kubernetes/aai/templates/search-data-service-deployment.yaml
@@ -5,6 +5,7 @@
   name: search-data-service
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.searchDataServiceReplicas }}
   selector:
     matchLabels:
       app: search-data-service
diff --git a/kubernetes/aai/templates/sparky-be-deployment.yaml b/kubernetes/aai/templates/sparky-be-deployment.yaml
index 9fe324a..e533928 100644
--- a/kubernetes/aai/templates/sparky-be-deployment.yaml
+++ b/kubernetes/aai/templates/sparky-be-deployment.yaml
@@ -5,6 +5,7 @@
   name: sparky-be
   namespace: "{{ .Values.nsPrefix }}-aai"
 spec:
+  replicas: {{ .Values.sparkyReplicas }}
   selector:
     matchLabels:
       app: sparky-be
diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml
index 6912c73..b058597 100644
--- a/kubernetes/aai/values.yaml
+++ b/kubernetes/aai/values.yaml
@@ -5,7 +5,15 @@
 # POLICY hotfix - Note this must be temporary
 # See https://jira.onap.org/browse/POLICY-510
 aaiServiceClusterIp: 10.43.255.254
-
+aaiServiceReplicas: 1
+aaiResourceReplicas: 1
+aaiTraversalReplicas: 1
+dataRouterReplicas: 1
+elasticsearchReplicas: 1
+hbaseReplicas: 1
+modelLoaderReplicas: 1
+searchDataServiceReplicas: 1
+sparkyReplicas: 1
 image:
   readiness: oomk8s/readiness-check:1.0.0
   aaiProxy: aaionap/haproxy