Add standardized helm chart for aai 21/36721/13
authorkj <keren.joseph@amdocs.com>
Mon, 19 Mar 2018 13:07:44 +0000 (15:07 +0200)
committerkj <keren.joseph@amdocs.com>
Tue, 27 Mar 2018 16:48:13 +0000 (19:48 +0300)
Issue-ID: OOM-734

Change-Id: I6b1a85017d79b92afcae44cf823ab000a10ce4be
Signed-off-by: kj <keren.joseph@amdocs.com>
111 files changed:
kubernetes/aai/.helmignore [new file with mode: 0644]
kubernetes/aai/Chart.yaml
kubernetes/aai/charts/aai-data-router/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/resources/config/auth/client-cert-onap.p12 [moved from kubernetes/aai/resources/config/data-router/appconfig/auth/client-cert-onap.p12 with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/auth/data-router_policy.json [moved from kubernetes/aai/resources/config/data-router/appconfig/auth/data-router_policy.json with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/auth/tomcat_keystore [moved from kubernetes/aai/resources/config/data-router/appconfig/auth/tomcat_keystore with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/data-router.properties [moved from kubernetes/aai/resources/config/data-router/appconfig/data-router.properties with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/model/aai_oxm_v10.xml [moved from kubernetes/aai/resources/config/data-router/appconfig/model/aai_oxm_v10.xml with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/model/aai_oxm_v11.xml [moved from kubernetes/aai/resources/config/data-router/appconfig/model/aai_oxm_v11.xml with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/model/aai_oxm_v8.xml [moved from kubernetes/aai/resources/config/data-router/appconfig/model/aai_oxm_v8.xml with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/config/model/aai_oxm_v9.xml [moved from kubernetes/aai/resources/config/data-router/appconfig/model/aai_oxm_v9.xml with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml [moved from kubernetes/aai/resources/config/data-router/dynamic/conf/entity-event-policy.xml with 100% similarity]
kubernetes/aai/charts/aai-data-router/resources/dynamic/routes/entity-event.route [moved from kubernetes/aai/resources/config/data-router/dynamic/routes/entity-event.route with 68% similarity]
kubernetes/aai/charts/aai-data-router/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/templates/secret.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-elasticsearch/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-elasticsearch/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-elasticsearch/resources/config/elasticsearch.yml [moved from kubernetes/aai/resources/config/elasticsearch/config/elasticsearch.yml with 99% similarity]
kubernetes/aai/charts/aai-elasticsearch/templates/configmap.yaml [moved from kubernetes/aai/templates/elasticsearch-configmap.yaml with 79% similarity]
kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-elasticsearch/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-elasticsearch/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-hbase/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-hbase/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-hbase/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-hbase/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-hbase/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/resources/config/auth/aai-os-cert.p12 [moved from kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12 with 100% similarity]
kubernetes/aai/charts/aai-modelloader/resources/config/log/logback.xml [moved from kubernetes/aai/resources/config/log/model-loader/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties [moved from kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties with 90% similarity]
kubernetes/aai/charts/aai-modelloader/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/templates/secret.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-resources/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-resources/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml [moved from kubernetes/aai/resources/config/log/resources/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-resources/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-resources/templates/deployment.yaml [moved from kubernetes/aai/templates/aai-resources-deployment.yaml with 85% similarity]
kubernetes/aai/charts/aai-resources/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-resources/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/resources/config/analysis-config.json [moved from kubernetes/aai/resources/config/search-data-service/appconfig/analysis-config.json with 100% similarity]
kubernetes/aai/charts/aai-search-data/resources/config/auth/search_policy.json [moved from kubernetes/aai/resources/config/search-data-service/appconfig/auth/search_policy.json with 100% similarity]
kubernetes/aai/charts/aai-search-data/resources/config/auth/tomcat_keystore [moved from kubernetes/aai/resources/config/search-data-service/appconfig/auth/tomcat_keystore with 100% similarity]
kubernetes/aai/charts/aai-search-data/resources/config/elastic-search.properties [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/resources/config/filter-config.json [moved from kubernetes/aai/resources/config/search-data-service/appconfig/filter-config.json with 100% similarity]
kubernetes/aai/charts/aai-search-data/resources/config/log/logback.xml [moved from kubernetes/aai/resources/config/log/search-data-service/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-search-data/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/templates/secret.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-search-data/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/resources/config/aai.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/aai.properties with 98% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/auth/aai-os-cert.p12 [moved from kubernetes/aai/resources/config/sparky-be/appconfig/auth/aai-os-cert.p12 with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/auth/client-cert-onap.p12 [moved from kubernetes/aai/resources/config/sparky-be/appconfig/auth/client-cert-onap.p12 with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/auth/inventory-ui-keystore [moved from kubernetes/aai/resources/config/sparky-be/appconfig/auth/inventory-ui-keystore with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/elasticsearch.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/elasticsearch.properties with 96% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/log/logback.xml [moved from kubernetes/aai/resources/config/log/sparky-be/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/model/aai_oxm_v9.xml [moved from kubernetes/aai/resources/config/sparky-be/appconfig/model/aai_oxm_v9.xml with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/portal/portal-authentication.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/portal/portal-authentication.properties with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/portal/portal.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/portal/portal.properties with 83% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/roles.config [moved from kubernetes/aai/resources/config/sparky-be/appconfig/roles.config with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/search-service.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/search-service.properties with 94% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/suggestive-search.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/suggestive-search.properties with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/resources/config/synchronizer.properties [moved from kubernetes/aai/resources/config/sparky-be/appconfig/synchronizer.properties with 100% similarity]
kubernetes/aai/charts/aai-sparky-be/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/templates/secret.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/values.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-traversal/.helmignore [new file with mode: 0644]
kubernetes/aai/charts/aai-traversal/Chart.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-traversal/resources/config/log/logback.xml [moved from kubernetes/aai/resources/config/log/traversal/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-traversal/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-traversal/templates/deployment.yaml [moved from kubernetes/aai/templates/aai-traversal-deployment.yaml with 78% similarity]
kubernetes/aai/charts/aai-traversal/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-traversal/values.yaml [new file with mode: 0644]
kubernetes/aai/requirements.yaml [new file with mode: 0644]
kubernetes/aai/resources/config/aai-data/environments/simpledemo.json
kubernetes/aai/resources/config/haproxy/haproxy.cfg
kubernetes/aai/resources/config/search-data-service/appconfig/elastic-search.properties [deleted file]
kubernetes/aai/templates/aai-deployment-configmap.yaml [deleted file]
kubernetes/aai/templates/aai-deployment.yaml [deleted file]
kubernetes/aai/templates/aai-filebeat-configmap.yaml [deleted file]
kubernetes/aai/templates/aai-resources-traversal-configmap.yaml [deleted file]
kubernetes/aai/templates/all-services.yaml [deleted file]
kubernetes/aai/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aai/templates/data-router-configmap.yaml [deleted file]
kubernetes/aai/templates/data-router-deployment.yaml [deleted file]
kubernetes/aai/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aai/templates/elasticsearch-deployment.yaml [deleted file]
kubernetes/aai/templates/hbase-deployment.yaml [deleted file]
kubernetes/aai/templates/modelloader-deployment-configmap.yaml [deleted file]
kubernetes/aai/templates/modelloader-deployment.yaml [deleted file]
kubernetes/aai/templates/search-data-service-configmap.yaml [deleted file]
kubernetes/aai/templates/search-data-service-deployment.yaml [deleted file]
kubernetes/aai/templates/service.yaml [new file with mode: 0644]
kubernetes/aai/templates/sparky-be-deployment-configmap.yaml [deleted file]
kubernetes/aai/templates/sparky-be-deployment.yaml [deleted file]
kubernetes/aai/values.yaml
kubernetes/onap/requirements.yaml

diff --git a/kubernetes/aai/.helmignore b/kubernetes/aai/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
index 49b12ec..5b36e11 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: A Helm chart for Kubernetes
+description: ONAP Active and Available Inventory
 name: aai
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/aai/charts/aai-data-router/.helmignore b/kubernetes/aai/charts/aai-data-router/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-data-router/Chart.yaml b/kubernetes/aai/charts/aai-data-router/Chart.yaml
new file mode 100644 (file)
index 0000000..59d3c77
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI Data-Router
+name: aai-data-router
+version: 2.0.0
@@ -1,4 +1,4 @@
 <route xmlns="http://camel.apache.org/schema/spring" trace="true">
-  <from uri="event-bus:mybus/?eventTopic=AAI-EVENT&amp;groupName=datarouter&amp;groupId=datarouter&amp;url=http://dmaap.{{.Values.nsPrefix}}:3904"/>
+  <from uri="event-bus:mybus/?eventTopic=AAI-EVENT&amp;groupName=datarouter&amp;groupId=datarouter&amp;url=http://dmaap.{{.Release.Namespace}}:3904"/>
   <to uri="bean:entityEventPolicy?method=process"/>
 </route>
diff --git a/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml b/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..a8793ac
--- /dev/null
@@ -0,0 +1,48 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-prop
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/data-router.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model-v8
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/aai_oxm_v8.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model-v9
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/aai_oxm_v9.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model-v10
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/aai_oxm_v10.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model-v11
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/aai_oxm_v11.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dynamic
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/dynamic/routes/entity-event.route").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/dynamic/conf/entity-event-policy.xml").AsConfig . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml b/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..79bcff3
--- /dev/null
@@ -0,0 +1,154 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      initContainers:
+      - command:
+        - /bin/sh
+        - -c
+        - |
+          mkdir -p /logroot/data-router/logs
+          chmod -R 777 /logroot/data-router/logs
+          chown -R root:root /logroot
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        securityContext:
+          privileged: true
+        image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: init-sysctl
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-logs
+          mountPath: /logroot/
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        env:
+        - name: SERVICE_BEANS
+          value: /opt/app/data-router/dynamic/conf
+        - name: CONFIG_HOME
+          value: /opt/app/data-router/config/
+        - name: KEY_STORE_PASSWORD
+          value: {{ .Values.config.keyStorePassword }}
+        - name: DYNAMIC_ROUTES
+          value: /opt/app/data-router/dynamic/routes
+        - name: KEY_MANAGER_PASSWORD
+          value: {{ .Values.config.keyManagerPassword }}
+        - name: PATH
+          value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+        - name: JAVA_HOME
+          value: usr/lib/jvm/java-8-openjdk-amd64
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml
+          subPath: aai_oxm_v8.xml
+          name: {{ include "common.fullname" . }}-model-v8
+        - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml
+          subPath: aai_oxm_v9.xml
+          name: {{ include "common.fullname" . }}-model-v9
+        - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml
+          subPath: aai_oxm_v10.xml
+          name: {{ include "common.fullname" . }}-model-v10
+        - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml
+          subPath: aai_oxm_v11.xml
+          name: {{ include "common.fullname" . }}-model-v11
+        - mountPath:  /opt/app/data-router/config/auth
+          name: {{ include "common.fullname" . }}-auth
+        - mountPath:  /opt/app/data-router/config/data-router.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: data-router.properties
+        - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route
+          subPath: entity-event.route
+          name: {{ include "common.fullname" . }}-dynamic-route
+        - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
+          subPath: entity-event-policy.xml
+          name: {{ include "common.fullname" . }}-dynamic-policy
+        - mountPath: /logs/
+          name: {{ include "common.fullname" . }}-logs
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-model-v8
+        configMap:
+          name: {{ include "common.fullname" . }}-model-v8
+      - name: {{ include "common.fullname" . }}-model-v9
+        configMap:
+          name: {{ include "common.fullname" . }}-model-v9
+      - name: {{ include "common.fullname" . }}-model-v10
+        configMap:
+          name: {{ include "common.fullname" . }}-model-v10
+      - name: {{ include "common.fullname" . }}-model-v11
+        configMap:
+          name: {{ include "common.fullname" . }}-model-v11
+      - name: {{ include "common.fullname" . }}-auth
+        secret:
+          secretName: {{ include "common.fullname" . }}
+      - name: {{ include "common.fullname" . }}-properties
+        configMap:
+          name: {{ include "common.fullname" . }}-prop
+      - name: {{ include "common.fullname" . }}-dynamic-route
+        configMap:
+          name: {{ include "common.fullname" . }}-dynamic
+      - name: {{ include "common.fullname" . }}-dynamic-policy
+        configMap:
+          name: {{ include "common.fullname" . }}-dynamic
+      - name: {{ include "common.fullname" . }}-logs
+        hostPath:
+          path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-data-router/templates/secret.yaml b/kubernetes/aai/charts/aai-data-router/templates/secret.yaml
new file mode 100644 (file)
index 0000000..69bd3f8
--- /dev/null
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-data-router/values.yaml b/kubernetes/aai/charts/aai-data-router/values.yaml
new file mode 100644 (file)
index 0000000..3957df1
--- /dev/null
@@ -0,0 +1,86 @@
+# Default values for data-router.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/data-router:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config:
+  keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+  keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  name: aai-data-router
+  internalPort: 9502
+
+ingress:
+  enabled: false
+
+persistence:
+  enabled: true
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  ## storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: aai/data-router/logs
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-elasticsearch/.helmignore b/kubernetes/aai/charts/aai-elasticsearch/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-elasticsearch/Chart.yaml b/kubernetes/aai/charts/aai-elasticsearch/Chart.yaml
new file mode 100644 (file)
index 0000000..348e4fa
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI elasticsearch
+name: aai-elasticsearch
+version: 2.0.0
@@ -155,14 +155,14 @@ network.bind_host: 0.0.0.0
 
 
 # Set a custom port for the node to node communication (9300 by default):
-transport.tcp.port: 8443
+transport.tcp.port: {{ .Values.config.tcpPort }}
 
 # Enable compression for all communication between nodes (disabled by default):
 transport.tcp.compress: false
 
 # Set a custom port to listen for HTTP traffic:
 # http.port: 9200
-http.port: 9200
+http.port: {{ .Values.service.internalPort }}
 
 # Set a custom allowed content length:
 # http.max_content_length: 100mb
@@ -16,8 +16,8 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: aai-elasticsearch-configmap
-  namespace: {{ .Values.nsPrefix }}
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/elasticsearch/config/elasticsearch.yml").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/elasticsearch.yml").AsConfig . | indent 2 }}
 #{{ end }}
diff --git a/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml b/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6792d4c
--- /dev/null
@@ -0,0 +1,96 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+      name: {{ include "common.name" . }}
+    spec:
+      initContainers:
+      - command:
+        - /bin/sh
+        - -c
+        - |
+          mkdir -p /logroot/elasticsearch/es-data
+          chmod -R 777 /logroot/elasticsearch/es-data
+          chown -R root:root /logroot
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        securityContext:
+          privileged: true
+        image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: init-sysctl
+        volumeMounts:
+        - name: elasticsearch-data
+          mountPath: /logroot/
+      hostname: {{ include "common.name" . }}
+      containers:
+      - name: {{ include "common.name" . }}
+        image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        volumeMounts:
+          - name: localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: elasticsearch-config
+            subPath: elasticsearch.yml
+            mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
+          - name: elasticsearch-data
+            mountPath: /usr/share/elasticsearch/data
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: elasticsearch-config
+        configMap:
+          name: {{ include "common.fullname" . }}
+      - name: elasticsearch-data
+        hostPath:
+          path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-elasticsearch/templates/service.yaml b/kubernetes/aai/charts/aai-elasticsearch/templates/service.yaml
new file mode 100644 (file)
index 0000000..84548ed
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.fullname" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-elasticsearch/values.yaml b/kubernetes/aai/charts/aai-elasticsearch/values.yaml
new file mode 100644 (file)
index 0000000..af7fd3d
--- /dev/null
@@ -0,0 +1,84 @@
+# Default values for elasticsearch.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+# application image
+dockerhubRepository: docker.io
+image: elasticsearch:2.4.1
+pullPolicy: Always
+
+# application configuration
+config:
+  tcpPort: 8443
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: aai-elasticsearch
+  internalPort: 9200
+
+ingress:
+  enabled: false
+
+persistence:
+  enabled: true
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  ## storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: aai/elasticsearch/data
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-hbase/.helmignore b/kubernetes/aai/charts/aai-hbase/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-hbase/Chart.yaml b/kubernetes/aai/charts/aai-hbase/Chart.yaml
new file mode 100644 (file)
index 0000000..eaf6bbd
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI hbase
+name: aai-hbase
+version: 2.0.0
diff --git a/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml b/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..4c92dfd
--- /dev/null
@@ -0,0 +1,72 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      hostname: aai-hbase
+      containers:
+      - name: {{ include "common.name" . }}
+        image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
+        - containerPort: {{ .Values.service.internalPort3 }}
+        - containerPort: {{ .Values.service.internalPort4 }}
+        - containerPort: {{ .Values.service.internalPort5 }}
+        - containerPort: {{ .Values.service.internalPort6 }}
+        - containerPort: {{ .Values.service.internalPort7 }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        volumeMounts:
+        - name: hbase-data
+          mountPath: /tmp
+        - name: localtime
+          mountPath: /etc/localtime
+          readOnly: true
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      volumes:
+      - name: hbase-data
+        hostPath:
+          path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-hbase/templates/service.yaml b/kubernetes/aai/charts/aai-hbase/templates/service.yaml
new file mode 100644 (file)
index 0000000..c503e6c
--- /dev/null
@@ -0,0 +1,55 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+    name: {{ .Values.service.name }}2
+  - port: {{ .Values.service.internalPor3t }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
+    name: {{ .Values.service.name }}3
+  - port: {{ .Values.service.internalPort4 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
+    name: {{ .Values.service.name }}4
+  - port: {{ .Values.service.internalPort5 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort5 }}
+    name: {{ .Values.service.name }}5
+  - port: {{ .Values.service.internalPort6 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort6 }}
+    name: {{ .Values.service.name }}6
+  - port: {{ .Values.service.internalPort7 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort7 }}
+    name: {{ .Values.service.name }}7
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    name: {{ .Values.service.name }}2
+  - port: {{ .Values.service.internalPort3 }}
+    name: {{ .Values.service.name }}3
+  - port: {{ .Values.service.internalPort4 }}
+    name: {{ .Values.service.name }}4
+  - port: {{ .Values.service.internalPort5 }}
+    name: {{ .Values.service.name }}5
+  - port: {{ .Values.service.internalPort6 }}
+    name: {{ .Values.service.name }}6
+  - port: {{ .Values.service.internalPort7 }}
+    name: {{ .Values.service.name }}7
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-hbase/values.yaml b/kubernetes/aai/charts/aai-hbase/values.yaml
new file mode 100644 (file)
index 0000000..f1d0c33
--- /dev/null
@@ -0,0 +1,92 @@
+# Default values for hbase.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+
+# application image
+dockerhubRepository: registry.hub.docker.com
+image: aaionap/hbase:1.2.0
+pullPolicy: Always
+
+# application configuration
+config: {}
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: aai-hbase
+  internalPort: 2181
+  internalPort2: 8080
+  internalPort3: 8085
+  internalPort4: 9090
+  internalPort5: 16000
+  internalPort6: 16010
+  internalPort7: 16201
+
+
+ingress:
+  enabled: false
+
+persistence:
+  enabled: true
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  ## storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: aai/hbase
+
+  
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-modelloader/.helmignore b/kubernetes/aai/charts/aai-modelloader/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-modelloader/Chart.yaml b/kubernetes/aai/charts/aai-modelloader/Chart.yaml
new file mode 100644 (file)
index 0000000..33558f2
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI modelloader
+name: aai-modelloader
+version: 2.0.0
@@ -1,6 +1,6 @@
 # Model Loader Distribution Client Configuration
 ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
-ml.distribution.ASDC_ADDRESS=sdc-be.{{.Values.nsPrefix}}:8443
+ml.distribution.ASDC_ADDRESS=sdc-be.{{.Release.Namespace}}:8443
 ml.distribution.CONSUMER_GROUP=aai-ml-group
 ml.distribution.CONSUMER_ID=aai-ml
 ml.distribution.ENVIRONMENT_NAME=AUTO
@@ -13,7 +13,7 @@ ml.distribution.USER=aai
 ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
 
 # Model Loader AAI REST Client Configuration
-ml.aai.BASE_URL=https://aai-service.{{.Values.nsPrefix}}:8443
+ml.aai.BASE_URL=https://aai.{{.Release.Namespace}}:8443
 ml.aai.MODEL_URL=/aai/v10/service-design-and-creation/models/model/
 ml.aai.NAMED_QUERY_URL=/aai/v10/service-design-and-creation/named-queries/named-query/
 ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
diff --git a/kubernetes/aai/charts/aai-modelloader/templates/configmap.yaml b/kubernetes/aai/charts/aai-modelloader/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..8b63cfa
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-prop
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model-loader.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-log
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml b/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..38ebe76
--- /dev/null
@@ -0,0 +1,97 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      containers:
+      - name: {{ include "common.name" . }}
+        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        env:
+        - name: CONFIG_HOME
+          value: /opt/app/model-loader/config/
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/model-loader/config/model-loader.properties
+          subPath: model-loader.properties
+          name: {{ include "common.fullname" . }}-prop-config
+        - mountPath: /opt/app/model-loader/config/auth/
+          name: {{ include "common.fullname" . }}-auth-config
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml
+          name: {{ include "common.fullname" . }}-log-conf
+          subPath: logback.xml
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          subPath: filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /usr/share/filebeat/data
+          name: aai-filebeat
+
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-prop-config
+        configMap:
+          name: {{ include "common.fullname" . }}-prop
+      - name: {{ include "common.fullname" . }}-auth-config
+        secret:
+          secretName: {{ include "common.fullname" . }}
+      - name: filebeat-conf
+        configMap:
+          name: aai-filebeat
+      - name: {{ include "common.fullname" . }}-logs
+        emptyDir: {}
+      - name: aai-filebeat
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-log-conf
+        configMap:
+         name: {{ include "common.fullname" . }}-log
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-modelloader/templates/secret.yaml b/kubernetes/aai/charts/aai-modelloader/templates/secret.yaml
new file mode 100644 (file)
index 0000000..69bd3f8
--- /dev/null
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-modelloader/templates/service.yaml b/kubernetes/aai/charts/aai-modelloader/templates/service.yaml
new file mode 100644 (file)
index 0000000..bd59edb
--- /dev/null
@@ -0,0 +1,29 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+    name: {{ .Values.service.name }}2
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    name: {{ .Values.service.name }}2
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/aai/charts/aai-modelloader/values.yaml b/kubernetes/aai/charts/aai-modelloader/values.yaml
new file mode 100644 (file)
index 0000000..f44d524
--- /dev/null
@@ -0,0 +1,67 @@
+# Default values for modelloader.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/model-loader:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config: {}
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  name: aai-modelloader
+  externalPort: 8080
+  internalPort: 8080
+  nodePort: 10
+  externalPort2: 8443
+  internalPort2: 8443
+  nodePort2: 29
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-resources/.helmignore b/kubernetes/aai/charts/aai-resources/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-resources/Chart.yaml b/kubernetes/aai/charts/aai-resources/Chart.yaml
new file mode 100644 (file)
index 0000000..3ab5c1a
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI resources
+name: aai-resources
+version: 2.0.0
diff --git a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..97c720a
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableAaiAaiResources }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: aai-resources
-  namespace: "{{ .Values.nsPrefix }}"
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
-  replicas: {{ .Values.aaiResourceReplicas }}
+  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
-      app: aai-resources
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
-        app: aai-resources
-      name: aai-resources
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
       annotations:
         msb.onap.org/service-info: '[
           {
@@ -407,7 +412,7 @@ spec:
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1"
-          }      
+          }
           ]'
     spec:
       initContainers:
@@ -415,27 +420,27 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - hbase
+        - aai-hbase
         env:
         - name: NAMESPACE
           valueFrom:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: aai-resources-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
-      - name: aai-resources
-        image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: CHEF_BRANCH
           value: master
         - name: AAI_CHEF_ENV
           value: simpledemo
         - name: AAI_CORE_VERSION
-          value: {{ .Values.aaicoreversion }}
+          value: {{ .Values.config.aaicoreversion }}
         - name: AAI_CHEF_LOC
           value: /var/chef/aai-data/environments
         - name: CHEF_GIT_URL
@@ -457,15 +462,37 @@ spec:
           name: aai-resources-log-conf
           subPath: logback.xml
         ports:
-        - containerPort: 8447
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{ if .Values.liveness.enabled }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end }}
         readinessProbe:
           tcpSocket:
-            port: 8447
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: filebeat-onap-aai-resources
-        image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           subPath: filebeat.yml
@@ -474,28 +501,27 @@ spec:
           name: aai-resources-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-resources-filebeat
+
       volumes:
       - name: localtime
         hostPath:
           path: /etc/localtime
       - name: aai-chef-config
         configMap:
-          name: aai-chef-config-configmap
+          name: aai-chef-config
       - name: aai-data
         configMap:
-          name: aai-resources-environments-configmap
+          name: aai-resources-environments
       - name: filebeat-conf
         configMap:
-          name: aai-filebeat-configmap
+          name: aai-filebeat
       - name: aai-resources-logs
         emptyDir: {}
       - name: aai-resources-filebeat
         emptyDir: {}
       - name: aai-resources-log-conf
         configMap:
-         name: aai-resources-log-configmap
-      restartPolicy: Always
+         name: {{ include "common.fullname" . }}
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
       imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-resources/templates/service.yaml b/kubernetes/aai/charts/aai-resources/templates/service.yaml
new file mode 100644 (file)
index 0000000..8cea86c
--- /dev/null
@@ -0,0 +1,30 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+    name: {{ .Values.service.name }}2
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    name: {{ .Values.service.name }}2
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-resources/values.yaml b/kubernetes/aai/charts/aai-resources/values.yaml
new file mode 100644 (file)
index 0000000..f72e299
--- /dev/null
@@ -0,0 +1,68 @@
+# Default values for resources.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/aai-resources:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config:
+  aaicoreversion: 1.1.0-SNAPSHOT
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 60
+  periodSeconds: 60
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: false
+
+readiness:
+  initialDelaySeconds: 60
+  periodSeconds: 10
+
+
+service:
+  type: ClusterIP
+  name: aai-resources
+  internalPort: 8447
+  internalPort2: 5005
+
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-search-data/.helmignore b/kubernetes/aai/charts/aai-search-data/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-search-data/Chart.yaml b/kubernetes/aai/charts/aai-search-data/Chart.yaml
new file mode 100644 (file)
index 0000000..da911ab
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI search-data
+name: aai-search-data
+version: 2.0.0
diff --git a/kubernetes/aai/charts/aai-search-data/resources/config/elastic-search.properties b/kubernetes/aai/charts/aai-search-data/resources/config/elastic-search.properties
new file mode 100644 (file)
index 0000000..532a9fb
--- /dev/null
@@ -0,0 +1,5 @@
+# ElasticSearch Configuration
+
+es.cluster-name=ES_AAI
+es.ip-address=aai-elasticsearch.{{.Release.Namespace}}
+es.http-port={{ .Values.config.elasticsearchHttpPort }}
diff --git a/kubernetes/aai/charts/aai-search-data/templates/configmap.yaml b/kubernetes/aai/charts/aai-search-data/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..0715f0d
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-service-log
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml b/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..beaee7d
--- /dev/null
@@ -0,0 +1,137 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        env:
+        - name: CONFIG_HOME
+          value: /opt/app/search-data-service/config/
+        - name: KEY_STORE_PASSWORD
+          value: {{ .Values.config.keyStorePassword }}
+        - name: KEY_MANAGER_PASSWORD
+          value: {{ .Values.config.keyManagerPassword }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/search-data-service/config/filter-config.json
+          subPath: filter-config.json
+          name: {{ include "common.fullname" . }}-service-config
+        - mountPath: /opt/app/search-data-service/config/elastic-search.properties
+          subPath: elastic-search.properties
+          name: {{ include "common.fullname" . }}-service-config
+        - mountPath: /opt/app/search-data-service/config/analysis-config.json
+          subPath: filter-config.json
+          name: {{ include "common.fullname" . }}-service-config
+        - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore
+          subPath: tomcat_keystore
+          name: {{ include "common.fullname" . }}-service-auth-config
+        - mountPath: /opt/app/search-data-service/config/auth/search_policy.json
+          subPath: search_policy.json
+          name: {{ include "common.fullname" . }}-search-policy-config
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-service-logs
+        - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml
+          name: {{ include "common.fullname" . }}-service-log-conf
+          subPath: logback.xml
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          subPath: filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-service-logs
+        - mountPath: /usr/share/filebeat/data
+          name: {{ include "common.fullname" . }}-service-filebeat
+
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-service-config
+        configMap:
+          name: {{ include "common.fullname" . }}
+      - name: {{ include "common.fullname" . }}-service-auth-config
+        secret:
+          secretName: {{ include "common.fullname" . }}-keystone
+      - name: {{ include "common.fullname" . }}-search-policy-config
+        secret:
+          secretName: {{ include "common.fullname" . }}-policy
+      - name: filebeat-conf
+        configMap:
+          name: aai-filebeat
+      - name: {{ include "common.fullname" . }}-service-logs
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-service-filebeat
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-service-log-conf
+        configMap:
+         name: {{ include "common.fullname" . }}-service-log
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-search-data/templates/secret.yaml b/kubernetes/aai/charts/aai-search-data/templates/secret.yaml
new file mode 100644 (file)
index 0000000..33b058f
--- /dev/null
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-keystone
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/auth/tomcat_keystore").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-policy
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/auth/search_policy.json").AsSecrets . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-search-data/templates/service.yaml b/kubernetes/aai/charts/aai-search-data/templates/service.yaml
new file mode 100644 (file)
index 0000000..41bc163
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-search-data/values.yaml b/kubernetes/aai/charts/aai-search-data/values.yaml
new file mode 100644 (file)
index 0000000..e7bfa6b
--- /dev/null
@@ -0,0 +1,68 @@
+# Default values for search-data.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/search-data-service:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config:
+  elasticsearchHttpPort: 9200
+  keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+  keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: aai-search-data
+  internalPort: 9509
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-sparky-be/.helmignore b/kubernetes/aai/charts/aai-sparky-be/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-sparky-be/Chart.yaml b/kubernetes/aai/charts/aai-sparky-be/Chart.yaml
new file mode 100644 (file)
index 0000000..4d8a3a4
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI sparky-be
+name: aai-sparky-be
+version: 2.0.0
@@ -6,7 +6,7 @@
 #
 # The ip address/hostname and port to the desired AAI instance
 #
-aai.rest.host=aai-service.{{.Values.nsPrefix}}
+aai.rest.host=aai.{{.Release.Namespace}}
 aai.rest.port=8443
 
 ############################## REST ##############################
@@ -7,8 +7,8 @@
 # The ip address/hostname and port to the desired AAI instance
 # For development it's recommended to use a local instance of ES
 #
-elasticsearch.ipAddress=aai-elasticsearch.{{.Values.nsPrefix}}
-elasticsearch.httpPort=9200
+elasticsearch.ipAddress=aai-elasticsearch.{{.Release.Namespace}}
+elasticsearch.httpPort={{ .Values.config.elasticsearchHttpPort }}
 elasticsearch.javaApiPort=8443
 
 ############################## Indexes ##############################
@@ -7,10 +7,10 @@ portal.api.impl.class = org.openecomp.sparky.security.portal.PortalRestAPIServic
 
 # Instance of ECOMP Portal where the app has been on-boarded
 # use insecure http for dev purposes to avoid self-signed certificate
-ecomp_rest_url = http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/auxapi
+ecomp_rest_url = http://portalapps.{{.Release.Namespace}}:8989/ONAPPORTAL/auxapi
 
 # Standard global logon page
-ecomp_redirect_url = http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/login.htm
+ecomp_redirect_url = http://portalapps.{{.Release.Namespace}}:8989/ONAPPORTAL/login.htm
 
 # Name of cookie to extract on login request
 csp_cookie_name = EPService
@@ -6,7 +6,7 @@
 #
 # The ip address/hostname and port to the desired Search Data Service instance
 #
-search-service.ipAddress=search-data-service.{{.Values.nsPrefix}}
+search-service.ipAddress=aai-search-data.{{.Release.Namespace}}
 search-service.httpPort=9509
 
 ############################## Indexes ##############################
diff --git a/kubernetes/aai/charts/aai-sparky-be/templates/configmap.yaml b/kubernetes/aai/charts/aai-sparky-be/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..68fa1e4
--- /dev/null
@@ -0,0 +1,31 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-model
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/model/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-portal
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/portal/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-log
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml b/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..278a327
--- /dev/null
@@ -0,0 +1,149 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        env:
+        - name: CONFIG_HOME
+          value: /opt/app/sparky/config/
+        - name: KEY_MANAGER_PASSWORD
+          value: {{ .Values.config.keyManagerPassword }}
+        - name: KEY_STORE_PASSWORD
+          value: {{ .Values.config.keyStorePassword }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/app/sparky/config/auth/
+          name: {{ include "common.fullname" . }}-auth-config
+        - mountPath: /opt/app/sparky/config/synchronizer.properties
+          subPath: synchronizer.properties
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/suggestive-search.properties
+          subPath: suggestive-search.properties
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/search-service.properties
+          subPath: search-service.properties
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/roles.config
+          subPath: roles.config
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/elasticsearch.properties
+          subPath: elasticsearch.properties
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/aai.properties
+          subPath: aai.properties
+          name: {{ include "common.fullname" . }}-config
+        - mountPath: /opt/app/sparky/config/model/
+          name: {{ include "common.fullname" . }}-model-config
+        - mountPath: /opt/app/sparky/config/portal/
+          name: {{ include "common.fullname" . }}-portal-config
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml
+          name: {{ include "common.fullname" . }}-log-conf
+          subPath: logback.xml
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          subPath: filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /usr/share/filebeat/data
+          name: aai-sparky-filebeat
+
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-config
+        configMap:
+          name: {{ include "common.fullname" . }}
+      - name: {{ include "common.fullname" . }}-model-config
+        configMap:
+          name: {{ include "common.fullname" . }}-model
+      - name: {{ include "common.fullname" . }}-portal-config
+        configMap:
+          name: {{ include "common.fullname" . }}-portal
+      - name: {{ include "common.fullname" . }}-auth-config
+        secret:
+          secretName: {{ include "common.fullname" . }}
+      - name: filebeat-conf
+        configMap:
+          name: aai-filebeat
+      - name: {{ include "common.fullname" . }}-logs
+        emptyDir: {}
+      - name: aai-sparky-filebeat
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-log-conf
+        configMap:
+         name: {{ include "common.fullname" . }}-log
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-sparky-be/templates/secret.yaml b/kubernetes/aai/charts/aai-sparky-be/templates/secret.yaml
new file mode 100644 (file)
index 0000000..69bd3f8
--- /dev/null
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }}
diff --git a/kubernetes/aai/charts/aai-sparky-be/templates/service.yaml b/kubernetes/aai/charts/aai-sparky-be/templates/service.yaml
new file mode 100644 (file)
index 0000000..41bc163
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-sparky-be/values.yaml b/kubernetes/aai/charts/aai-sparky-be/values.yaml
new file mode 100644 (file)
index 0000000..34be1be
--- /dev/null
@@ -0,0 +1,70 @@
+# Default values for sparky-be.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/sparky-be:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config:
+  elasticsearchHttpPort: 9200
+  keyStorePassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
+  keyManagerPassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
+
+# override chart name (sparky-be) to share a common namespace
+# suffix with parent chart (aai)
+nsSuffix: aai
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: aai-sparky-be
+  internalPort: 9517
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/charts/aai-traversal/.helmignore b/kubernetes/aai/charts/aai-traversal/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/aai/charts/aai-traversal/Chart.yaml b/kubernetes/aai/charts/aai-traversal/Chart.yaml
new file mode 100644 (file)
index 0000000..8f79b42
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: ONAP AAI traversal
+name: aai-traversal
+version: 2.0.0
diff --git a/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml b/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..a7e9428
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-log
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableAaiAaiTraversal }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: aai-traversal
-  namespace: "{{ .Values.nsPrefix }}"
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
-  replicas: {{ .Values.aaiTraversalReplicas }}
+  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
-      app: aai-traversal
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
-        app: aai-traversal
-      name: aai-traversal
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
       annotations:
         msb.onap.org/service-info: '[
           {
@@ -245,8 +250,6 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - hbase
-        - --container-name
         - aai-resources
         env:
         - name: NAMESPACE
@@ -254,26 +257,26 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: aai-traversal-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
-      - name: aai-traversal
-        image: "{{ .Values.image.aaiTraversalImage }}:{{ .Values.image.aaiTraversalVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: CHEF_BRANCH
           value: master
         - name: AAI_CHEF_ENV
           value: simpledemo
         - name: AAI_CORE_VERSION
-          value: {{ .Values.aaicoreversion }}
+          value: {{ .Values.config.aaicoreversion }}
         - name: AAI_CHEF_LOC
           value: /var/chef/aai-data/environments
         - name: CHEF_GIT_URL
           value: http://gerrit.onap.org/r/aai
         - name: RESOURCES_HOSTNAME
-          value: aai-resources.{{ .Values.nsPrefix }}
+          value: aai-resources.{{ include "common.namespace" . }}
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
@@ -289,15 +292,37 @@ spec:
           name: aai-traversal-log-conf
           subPath: logback.xml
         ports:
-        - containerPort: 8446
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{ if .Values.liveness.enabled }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end }}
         readinessProbe:
           tcpSocket:
-            port: 8446
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: filebeat-onap-aai-traversal
-        image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           subPath: filebeat.yml
@@ -306,28 +331,27 @@ spec:
           name: aai-traversal-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-traversal-filebeat
+
       volumes:
       - name: localtime
         hostPath:
           path: /etc/localtime
       - name: aai-chef-config
         configMap:
-          name: aai-chef-config-configmap
+          name: aai-chef-config
       - name: aai-data
         configMap:
-          name: aai-resources-environments-configmap
+          name: aai-resources-environments
       - name: filebeat-conf
         configMap:
-          name: aai-filebeat-configmap
+          name: aai-filebeat
       - name: aai-traversal-logs
         emptyDir: {}
       - name: aai-traversal-filebeat
         emptyDir: {}
       - name: aai-traversal-log-conf
         configMap:
-         name: aai-traversal-log-configmap
-      restartPolicy: Always
+         name: {{ include "common.fullname" . }}-log
+      restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
       imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/charts/aai-traversal/templates/service.yaml b/kubernetes/aai/charts/aai-traversal/templates/service.yaml
new file mode 100644 (file)
index 0000000..8cea86c
--- /dev/null
@@ -0,0 +1,30 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+    name: {{ .Values.service.name }}2
+  {{- else -}}
+  - port: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.internalPort2 }}
+    name: {{ .Values.service.name }}2
+  {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/aai/charts/aai-traversal/values.yaml b/kubernetes/aai/charts/aai-traversal/values.yaml
new file mode 100644 (file)
index 0000000..1764033
--- /dev/null
@@ -0,0 +1,67 @@
+# Default values for traversal.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/aai-traversal:v1.1.0
+pullPolicy: Always
+restartPolicy: Always
+
+# application configuration
+config:
+  aaicoreversion: 1.1.0-SNAPSHOT
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 60
+  periodSeconds: 60
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: false
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: aai-traversal
+  internalPort: 8446
+  internalPort2: 5005
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/aai/requirements.yaml b/kubernetes/aai/requirements.yaml
new file mode 100644 (file)
index 0000000..56029ab
--- /dev/null
@@ -0,0 +1,7 @@
+dependencies:
+  - name: common
+    version: ~2.0.0
+    # local reference to common chart, as it is
+    # a part of this chart's package and will not
+    # be published independently to a repo (at this point)
+    repository: '@local'
\ No newline at end of file
index 7b299f7..9795975 100644 (file)
                "PROJECT_HOME": "/opt/app/aai-traversal",
                "LOGROOT": "/opt/aai/logroot",
                "JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64",
-               "AAI_SERVER_URL_BASE": "https://aai-servicei.{{.Values.nsPrefix}}:8443/aai/",
-               "AAI_SERVER_URL": "https://aai-service.{{.Values.nsPrefix}}:8443/aai/v11/",
-               "AAI_GLOBAL_CALLBACK_URL": "https://aai-service.{{.Values.nsPrefix}}:8443/aai/",
+               "AAI_SERVER_URL_BASE": "https:/aai.{{.Release.Namespace}}:8443/aai/",
+               "AAI_SERVER_URL": "https:/aai.{{.Release.Namespace}}:8443/aai/v11/",
+               "AAI_GLOBAL_CALLBACK_URL": "https:/aai.{{.Release.Namespace}}:8443/aai/",
                "AAI_TRUSTSTORE_FILENAME": "aai_keystore",
                "AAI_TRUSTSTORE_PASSWD_X": "OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0",
                "AAI_KEYSTORE_FILENAME": "aai_keystore",
                "AAI_KEYSTORE_PASSWD_X": "OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0",
-               "APPLICATION_SERVERS": "aai-service.{{.Values.nsPrefix}}",
+               "APPLICATION_SERVERS": "aai.{{.Release.Namespace}}",
                "AAI_DMAAP_PROTOCOL": "http",
-               "AAI_DMAAP_HOST_PORT": "dmaap.{{.Values.nsPrefix}}:3904",
+               "AAI_DMAAP_HOST_PORT": "dmaap.{{.Release.Namespace}}:3904",
                "AAI_DMAAP_TOPIC_NAME": "AAI-EVENT",
                "AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS": "UNPROCESSED",
                "AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE": "AAI-EVENT",
                "AAI_NOTIFICATION_CURRENT_VERSION": "v11",
                "RESOURCE_VERSION_ENABLE_FLAG": "true",
                "TXN_HBASE_TABLE_NAME": "aailogging.dev",
-               "TXN_ZOOKEEPER_QUORUM": "hbase.{{.Values.nsPrefix}}",
+               "TXN_ZOOKEEPER_QUORUM": "aai-hbase.{{.Release.Namespace}}",
                "TXN_ZOOKEEPER_PROPERTY_CLIENTPORT": "2181",
                "TXN_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase",
                "AAI_WORKLOAD_PREFERRED_ROUTE_KEY": "MR1",
-               "STORAGE_HOSTNAME": "hbase.{{.Values.nsPrefix}}",
+               "STORAGE_HOSTNAME": "aai-hbase.{{.Release.Namespace}}",
                "STORAGE_HBASE_TABLE": "aaigraph.dev",
                "STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase",
                "DB_CACHE_CLEAN_WAIT": "20",
                "PROJECT_HOME": "/opt/app/aai-resources",
                "LOGROOT": "/opt/aai/logroot",
                "JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64",
-               "AAI_SERVER_URL_BASE": "https://aai-service.{{.Values.nsPrefix}}:8443/aai/",
-               "AAI_SERVER_URL": "https://aai-service.{{.Values.nsPrefix}}:8443/aai/v11/",
-               "AAI_GLOBAL_CALLBACK_URL": "https://aai-service.{{.Values.nsPrefix}}:8443/aai/",
+               "AAI_SERVER_URL_BASE": "https:/aai.{{.Release.Namespace}}:8443/aai/",
+               "AAI_SERVER_URL": "https:/aai.{{.Release.Namespace}}:8443/aai/v11/",
+               "AAI_GLOBAL_CALLBACK_URL": "https:/aai.{{.Release.Namespace}}:8443/aai/",
                "AAI_TRUSTSTORE_FILENAME": "aai_keystore",
                "AAI_TRUSTSTORE_PASSWD_X": "OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0",
                "AAI_KEYSTORE_FILENAME": "aai_keystore",
                "AAI_KEYSTORE_PASSWD_X": "OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0",
-               "APPLICATION_SERVERS": "aai-service.{{.Values.nsPrefix}}",
+               "APPLICATION_SERVERS": "aai.{{.Release.Namespace}}",
                "AAI_DMAAP_PROTOCOL": "http",
-               "AAI_DMAAP_HOST_PORT": "dmaap.{{.Values.nsPrefix}}:3904",
+               "AAI_DMAAP_HOST_PORT": "dmaap.{{.Release.Namespace}}:3904",
                "AAI_DMAAP_TOPIC_NAME": "AAI-EVENT",
                "AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS": "UNPROCESSED",
                "AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE": "AAI-EVENT",
                "AAI_NOTIFICATION_CURRENT_VERSION": "v11",
                "RESOURCE_VERSION_ENABLE_FLAG": "true",
                "TXN_HBASE_TABLE_NAME": "aailogging.dev",
-               "TXN_ZOOKEEPER_QUORUM": "hbase.{{.Values.nsPrefix}}",
+               "TXN_ZOOKEEPER_QUORUM": "aai-hbase.{{.Release.Namespace}}",
                "TXN_ZOOKEEPER_PROPERTY_CLIENTPORT": "2181",
                "TXN_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase",
                "AAI_WORKLOAD_PREFERRED_ROUTE_KEY": "MR1",
-               "STORAGE_HOSTNAME": "hbase.{{.Values.nsPrefix}}",
+               "STORAGE_HOSTNAME": "aai-hbase.{{.Release.Namespace}}",
                "STORAGE_HBASE_TABLE": "aaigraph.dev",
                "STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT": "/hbase",
                "DB_CACHE_CLEAN_WAIT": "20",
index 6e6f489..b9721ae 100644 (file)
@@ -95,7 +95,7 @@ backend IST_Default_8447
         balance roundrobin
         http-request set-header X-Forwarded-Port %[src_port]
         http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
-        server aai-resources.{{.Values.nsPrefix}}  aai-resources.{{.Values.nsPrefix}}:8447  port 8447 ssl verify none
+        server aai-resources.{{.Release.Namespace}} aai-resources.{{.Release.Namespace}}:8447  port 8447 ssl verify none
 
 #######################
 # BACKEND 8446#########
@@ -105,7 +105,7 @@ backend IST_AAI_8446
         balance roundrobin
         http-request set-header X-Forwarded-Port %[src_port]
         http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
-        server aai-traversal.{{.Values.nsPrefix}} aai-traversal.{{.Values.nsPrefix}}:8446  port 8446 ssl verify none
+        server aai-traversal.{{.Release.Namespace}} aai-traversal.{{.Release.Namespace}}:8446  port 8446 ssl verify none
 
 listen IST_AAI_STATS
         mode http
@@ -118,4 +118,3 @@ listen IST_AAI_STATS
         stats show-legends
         stats show-desc IST AAI APPLICATION NODES
         stats admin if TRUE
-
diff --git a/kubernetes/aai/resources/config/search-data-service/appconfig/elastic-search.properties b/kubernetes/aai/resources/config/search-data-service/appconfig/elastic-search.properties
deleted file mode 100644 (file)
index c19667a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# ElasticSearch Configuration
-
-es.cluster-name=ES_AAI
-es.ip-address=aai-elasticsearch.{{.Values.nsPrefix}}
-es.http-port=9200
diff --git a/kubernetes/aai/templates/aai-deployment-configmap.yaml b/kubernetes/aai/templates/aai-deployment-configmap.yaml
deleted file mode 100644 (file)
index c81fb80..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiAaiService }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-deployment-configmap
-  namespace: {{ .Values.nsPrefix }}
-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
deleted file mode 100644 (file)
index 1b32463..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiAaiService }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-service
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.aaiServiceReplicas }}
-  selector:
-    matchLabels:
-      app: aai-service
-  template:
-    metadata:
-      labels:
-        app: aai-service
-      name: aai-service
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - aai-resources
-        - --container-name
-        - aai-traversal
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: aai-service-readiness
-      containers:
-      - name: aai-service
-        image: "{{ .Values.image.aaiProxy }}:{{ .Values.image.aaiProxyVersion}}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /dev/log
-          name: aai-service-log
-        - mountPath: /usr/local/etc/haproxy/haproxy.cfg
-          subPath: haproxy.cfg
-          name: haproxy-cfg
-        ports:
-        - containerPort: 8080
-        - containerPort: 8443
-        readinessProbe:
-          tcpSocket:
-            port: 8443
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      volumes:
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
-        - name: aai-service-log
-          hostPath:
-            path: "/dev/log"
-        - name: haproxy-cfg
-          configMap:
-            name: aai-deployment-configmap
-      restartPolicy: Always
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/aai/templates/aai-filebeat-configmap.yaml b/kubernetes/aai/templates/aai-filebeat-configmap.yaml
deleted file mode 100644 (file)
index 74039e8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiAaiResources }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-filebeat-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml b/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml
deleted file mode 100644 (file)
index 32055c4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiAaiResources }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-chef-config-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/aai-data/chef-config/dev/.knife/solo.rb").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-resources-environments-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/aai-data/environments/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-resources-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/resources/logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-traversal-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/traversal/logback.xml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/all-services.yaml b/kubernetes/aai/templates/all-services.yaml
deleted file mode 100644 (file)
index 39739de..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiHbase }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: hbase
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: hbase
-spec:
-  ports:
-  - name: "hbase-port-1"
-    port: 2181
-  - name: "hbase-port-2"
-    port: 8080
-  - name: "hbase-port-3"
-    port: 8085
-  - name: "hbase-port-4"
-    port: 9090
-  - name: "hbase-port-5"
-    port: 16000
-  - name: "hbase-port-6"
-    port: 16010
-  - name: "hbase-port-7"
-    port: 16201
-  selector:
-    app: hbase
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAaiAaiService }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: aai-service
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: aai-service
-spec:
-  ports:
-  - name: "aai-service-port-8443"
-    port: 8443
-    targetPort: 8443
-    nodePort: {{ .Values.nodePortPrefix }}33
-  - name: "aai-service-port-8080"
-    port: 8080
-    targetPort: 8080
-    nodePort: {{ .Values.nodePortPrefix }}32
-  type: NodePort
-  selector:
-    app: aai-service
-  clusterIP: {{ .Values.aaiServiceClusterIp }}
-#{{ end }}
-#{{ if not .Values.disableAaiModelLoaderService }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: model-loader-service
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: model-loader-service
-spec:
-  ports:
-  - name: "model-loader-service-port-8443"
-    port: 8443
-    nodePort: {{ .Values.nodePortPrefix }}29
-  - name: "model-loader-service-port-8080"
-    port: 8080
-    nodePort: {{ .Values.nodePortPrefix }}10
-  type: NodePort
-  selector:
-    app: model-loader-service
-#{{ end }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: gremlin
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: gremlin
-spec:
-  ports:
-  - name: "gremlin-port"
-    port: 8182
-  selector:
-    app: gremlin
-  clusterIP: None
-#{{ if not .Values.disableAaiElasticsearch }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: aai-elasticsearch
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: aai-elasticsearch
-spec:
-  ports:
-  - name: "aai-elasticsearch-port"
-    port: 9200
-  selector:
-    app: aai-elasticsearch
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAaiSearchDataService }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: search-data-service
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: search-data-service
-spec:
-  ports:
-  - name: "search-data-service-port-9509"
-    port: 9509
-  selector:
-    app: search-data-service
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAaiAaiTraversal }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: aai-traversal
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: aai-traversal
-spec:
-  ports:
-  - name: "aai-traversal-port-8446"
-    port: 8446
-  - name: aai-traversal-port-debug
-    port: 5005
-  selector:
-    app: aai-traversal
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAaiAaiResources }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: aai-resources
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: aai-resources
-spec:
-  ports:
-  - name: "aai-resources-port-8447"
-    port: 8447
-  - name: aai-resources-port-debug
-    port: 5005
-  selector:
-    app: aai-resources
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAaiSparkyBe }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sparky-be
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sparky-be
-spec:
-  ports:
-  - name: "sparky-be-port-9517"
-    port: 9517
-  selector:
-    app: sparky-be
-  clusterIP: None
-#{{ end }}
diff --git a/kubernetes/aai/templates/configmap.yaml b/kubernetes/aai/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..78235bc
--- /dev/null
@@ -0,0 +1,35 @@
+# this is a shared resource for subcharts
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-filebeat
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-deployment-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }}
+---
+# this is a shared resource for subcharts
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-chef-config
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/aai-data/chef-config/dev/.knife/solo.rb").AsConfig . | indent 2 }}
+---
+# this is a shared resource for subcharts
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aai-resources-environments
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/aai-data/environments/*").AsConfig . | indent 2 }}
+
diff --git a/kubernetes/aai/templates/data-router-configmap.yaml b/kubernetes/aai/templates/data-router-configmap.yaml
deleted file mode 100644 (file)
index 8c2d988..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiDataRouter }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-prop-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/data-router.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-model-v8-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v8.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-model-v9-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v9.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-model-v10-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v10.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-model-v11-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v11.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: aai-data-router-secret
-  namespace: {{ .Values.nsPrefix }}
-type: Opaque
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/appconfig/auth/*").AsSecrets . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-data-router-dynamic-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/data-router/dynamic/routes/entity-event.route").AsConfig . | indent 2 }}
-{{ tpl (.Files.Glob "resources/config/data-router/dynamic/conf/entity-event-policy.xml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/data-router-deployment.yaml b/kubernetes/aai/templates/data-router-deployment.yaml
deleted file mode 100644 (file)
index b1cb834..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiDataRouter }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-data-router
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.dataRouterReplicas }}
-  selector:
-    matchLabels:
-      app: aai-data-router
-  template:
-    metadata:
-      labels:
-        app: aai-data-router
-      name: aai-data-router
-    spec:
-      initContainers:
-      - command:
-        - /bin/sh
-        - -c
-        - |
-          mkdir -p /logroot/data-router/logs
-          chmod -R 777 /logroot/data-router/logs
-          chown -R root:root /logroot
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        securityContext:
-          privileged: true
-        image: {{ .Values.image.es_bb }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: init-sysctl
-        volumeMounts:
-        - name: aai-data-router-logs
-          mountPath: /logroot/
-      containers:
-      - name: aai-data-router
-        image: "{{ .Values.image.dataRouterImage }}:{{ .Values.image.dataRouterVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        env:
-        - name: SERVICE_BEANS
-          value: /opt/app/data-router/dynamic/conf
-        - name: CONFIG_HOME
-          value: /opt/app/data-router/config/
-        - name: KEY_STORE_PASSWORD
-          value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
-        - name: DYNAMIC_ROUTES
-          value: /opt/app/data-router/dynamic/routes
-        - name: KEY_MANAGER_PASSWORD
-          value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
-        - name: PATH
-          value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-        - name: JAVA_HOME
-          value: usr/lib/jvm/java-8-openjdk-amd64
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml
-          subPath: aai_oxm_v8.xml
-          name: aai-data-router-model-v8
-        - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml
-          subPath: aai_oxm_v9.xml
-          name: aai-data-router-model-v9
-        - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml
-          subPath: aai_oxm_v10.xml
-          name: aai-data-router-model-v10
-        - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml
-          subPath: aai_oxm_v11.xml
-          name: aai-data-router-model-v11
-        - mountPath:  /opt/app/data-router/config/auth
-          name: aai-data-router-auth
-        - mountPath:  /opt/app/data-router/config/data-router.properties
-          name: aai-data-router-properties
-          subPath: data-router.properties
-        - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route
-          subPath: entity-event.route
-          name: aai-data-router-dynamic-route
-        - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
-          subPath: entity-event-policy.xml
-          name: aai-data-router-dynamic-policy
-        - mountPath: /logs/
-          name: aai-data-router-logs
-        ports:
-        - containerPort: 9502
-        readinessProbe:
-          tcpSocket:
-            port: 9502
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: aai-data-router-model-v8
-        configMap:
-          name: aai-data-router-model-v8-configmap
-      - name: aai-data-router-model-v9
-        configMap:
-          name: aai-data-router-model-v9-configmap
-      - name: aai-data-router-model-v10
-        configMap:
-          name: aai-data-router-model-v10-configmap
-      - name: aai-data-router-model-v11
-        configMap:
-          name: aai-data-router-model-v11-configmap
-      - name: aai-data-router-auth
-        secret:
-          secretName: aai-data-router-secret
-      - name: aai-data-router-properties
-        configMap:
-          name: aai-data-router-prop-configmap
-      - name: aai-data-router-dynamic-route
-        configMap:
-          name: aai-data-router-dynamic-configmap
-      - name: aai-data-router-dynamic-policy
-        configMap:
-          name: aai-data-router-dynamic-configmap
-      - name: aai-data-router-logs
-        hostPath:
-          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/data-router/logs
-      restartPolicy: Always
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
diff --git a/kubernetes/aai/templates/deployment.yaml b/kubernetes/aai/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6216758
--- /dev/null
@@ -0,0 +1,86 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+      name: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - aai-traversal
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /dev/log
+          name: aai-service-log
+        - mountPath: /usr/local/etc/haproxy/haproxy.cfg
+          subPath: haproxy.cfg
+          name: haproxy-cfg
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort2 }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort2 }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources:
+{{ toYaml .Values.resources | indent 12 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+      {{- end }}
+
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: aai-service-log
+          hostPath:
+            path: "/dev/log"
+        - name: haproxy-cfg
+          configMap:
+            name: aai-deployment-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml
deleted file mode 100644 (file)
index a07db04..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiElasticsearch }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-elasticsearch
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.elasticsearchReplicas }}
-  selector:
-    matchLabels:
-      app: aai-elasticsearch
-  template:
-    metadata:
-      labels:
-        app: aai-elasticsearch
-      name: aai-elasticsearch
-    spec:
-      initContainers:
-      - command:
-        - /bin/sh
-        - -c
-        - |
-          mkdir -p /logroot/elasticsearch/es-data
-          chmod -R 777 /logroot/elasticsearch/es-data
-          chown -R root:root /logroot
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        securityContext:
-          privileged: true
-        image: {{ .Values.image.es_bb }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: init-sysctl
-        volumeMounts:
-        - name: elasticsearch-data
-          mountPath: /logroot/
-      hostname: aai-elasticsearch
-      containers:
-      - name: aai-elasticsearch
-        image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        ports:
-        - containerPort: 9200
-        readinessProbe:
-          tcpSocket:
-            port: 9200
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        volumeMounts:
-        - name: localtime
-          mountPath: /etc/localtime
-          readOnly: true
-        - name: elasticsearch-config
-          subPath: elasticsearch.yml
-          mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
-        - name: elasticsearch-data
-          mountPath: /usr/share/elasticsearch/data
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: elasticsearch-config
-        configMap:
-          name: aai-elasticsearch-configmap
-      - name: elasticsearch-data
-        hostPath:
-          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/elasticsearch/data
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
diff --git a/kubernetes/aai/templates/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml
deleted file mode 100644 (file)
index 62b017d..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiHbase }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-hbase
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.hbaseReplicas }}
-  selector:
-    matchLabels:
-      app: hbase
-  template:
-    metadata:
-      labels:
-        app: hbase
-      name: aai-hbase
-    spec:
-      hostname: hbase
-      containers:
-      - name: hbase
-        image: "{{ .Values.image.aaiHbaseImage }}:{{ .Values.image.aaiHbaseVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        ports:
-        - containerPort: 2181
-        - containerPort: 8080
-        - containerPort: 8085
-        - containerPort: 9090
-        - containerPort: 16000
-        - containerPort: 16010
-        - containerPort: 16201
-        readinessProbe:
-          tcpSocket:
-            port: 2181
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        volumeMounts:
-        - name: hbase-data
-          mountPath: /tmp
-        - name: localtime
-          mountPath: /etc/localtime
-          readOnly: true
-      volumes:
-      - name: hbase-data
-        hostPath:
-          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/hbase
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
diff --git a/kubernetes/aai/templates/modelloader-deployment-configmap.yaml b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml
deleted file mode 100644 (file)
index 14d316c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiModelLoaderService }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-model-loader-prop-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/model-loader.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: aai-model-loader-secret
-  namespace: {{ .Values.nsPrefix }}
-type: Opaque
-data:
-{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/auth/*").AsSecrets . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-model-loader-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/model-loader/logback.xml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml
deleted file mode 100644 (file)
index 33458c7..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiModelLoaderService }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-model-loader-service
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.modelLoaderReplicas }}
-  selector:
-    matchLabels:
-      app: model-loader-service
-  template:
-    metadata:
-      labels:
-        app: model-loader-service
-      name: aai-model-loader-service
-    spec:
-      containers:
-      - name: model-loader-service
-        image: "{{ .Values.image.modelLoaderImage }}:{{ .Values.image.modelLoaderVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: /opt/app/model-loader/config/
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/app/model-loader/config/model-loader.properties
-          subPath: model-loader.properties
-          name: aai-model-loader-prop-config
-        - mountPath: /opt/app/model-loader/config/auth/
-          name: aai-model-loader-auth-config
-        - mountPath: /var/log/onap
-          name: aai-model-loader-logs
-        - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml
-          name: aai-model-loader-log-conf
-          subPath: logback.xml
-        ports:
-        - containerPort: 8080
-        - containerPort: 8443
-      - name: filebeat-onap-aai-model-loader
-        image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          subPath: filebeat.yml
-          name: filebeat-conf
-        - mountPath: /var/log/onap
-          name: aai-model-loader-logs
-        - mountPath: /usr/share/filebeat/data
-          name: aai-model-loader-filebeat
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: aai-model-loader-prop-config
-        configMap:
-          name: aai-model-loader-prop-configmap
-      - name: aai-model-loader-auth-config
-        secret:
-          secretName: aai-model-loader-secret
-      - name: filebeat-conf
-        configMap:
-          name: aai-filebeat-configmap
-      - name: aai-model-loader-logs
-        emptyDir: {}
-      - name: aai-model-loader-filebeat
-        emptyDir: {}
-      - name: aai-model-loader-log-conf
-        configMap:
-         name: aai-model-loader-log-configmap
-      restartPolicy: Always
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/aai/templates/search-data-service-configmap.yaml b/kubernetes/aai/templates/search-data-service-configmap.yaml
deleted file mode 100644 (file)
index 2094f60..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiSearchDataService }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-search-data-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: aai-search-data-keystone-secret
-  namespace: {{ .Values.nsPrefix }}
-type: Opaque
-data:
-{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/auth/tomcat_keystore").AsSecrets . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-search-policy-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/auth/search_policy.json").AsSecrets . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-search-data-service-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/search-data-service/logback.xml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/search-data-service-deployment.yaml b/kubernetes/aai/templates/search-data-service-deployment.yaml
deleted file mode 100644 (file)
index 28cc4f3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiSearchDataService }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-search-data-service
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.searchDataServiceReplicas }}
-  selector:
-    matchLabels:
-      app: search-data-service
-  template:
-    metadata:
-      labels:
-        app: search-data-service
-      name: aai-search-data-service
-    spec:
-      containers:
-      - name: search-data-service
-        image: "{{ .Values.image.searchDataImage }}:{{ .Values.image.searchDataVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: /opt/app/search-data-service/config/
-        - name: KEY_STORE_PASSWORD
-          value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
-        - name: KEY_MANAGER_PASSWORD
-          value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/app/search-data-service/config/filter-config.json
-          subPath: filter-config.json
-          name: aai-search-data-service-config
-        - mountPath: /opt/app/search-data-service/config/elastic-search.properties
-          subPath: elastic-search.properties
-          name: aai-search-data-service-config
-        - mountPath: /opt/app/search-data-service/config/analysis-config.json
-          subPath: filter-config.json
-          name: aai-search-data-service-config
-        - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore
-          subPath: tomcat_keystore
-          name: aai-search-data-service-auth-config
-        - mountPath: /opt/app/search-data-service/config/auth/search_policy.json
-          subPath: search_policy.json
-          name: aai-search-data-search-policy-config
-        - mountPath: /var/log/onap
-          name: aai-search-data-service-logs
-        - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml
-          name: aai-search-data-service-log-conf
-          subPath: logback.xml
-        ports:
-        - containerPort: 9509
-        readinessProbe:
-          tcpSocket:
-            port: 9509
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: filebeat-onap-aai-search
-        image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          subPath: filebeat.yml
-          name: filebeat-conf
-        - mountPath: /var/log/onap
-          name: aai-search-data-service-logs
-        - mountPath: /usr/share/filebeat/data
-          name: aai-search-data-service-filebeat
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: aai-search-data-service-config
-        configMap:
-          name: aai-search-data-configmap
-      - name: aai-search-data-service-auth-config
-        secret:
-          secretName: aai-search-data-keystone-secret
-      - name: aai-search-data-search-policy-config
-        configMap:
-          name: aai-search-policy-configmap
-      - name: filebeat-conf
-        configMap:
-          name: aai-filebeat-configmap
-      - name: aai-search-data-service-logs
-        emptyDir: {}
-      - name: aai-search-data-service-filebeat
-        emptyDir: {}
-      - name: aai-search-data-service-log-conf
-        configMap:
-         name: aai-search-data-service-log-configmap
-      restartPolicy: Always
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/aai/templates/service.yaml b/kubernetes/aai/templates/service.yaml
new file mode 100644 (file)
index 0000000..d21ac7e
--- /dev/null
@@ -0,0 +1,33 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.name" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+  {{if eq .Values.service.type "NodePort" -}}
+  - name: {{ .Values.service.name }}
+    port: {{ .Values.service.internalPort }}
+    targetPort: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+  - name: {{ .Values.service.name }}2
+    port: {{ .Values.service.internalPort2 }}
+    targetPort: {{ .Values.service.internalPort2 }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+  {{- else -}}
+  - port: {{ .Values.service.externalPort }}
+    targetPort: {{ .Values.service.internalPort }}
+    name: {{ .Values.service.name }}
+  - port: {{ .Values.service.externalPort2 }}
+    targetPort: {{ .Values.service.internalPort2 }}
+    name: {{ .Values.service.name }}2
+  {{- end}}
+  type: {{ .Values.service.type }}
+  selector:
+    app: {{ include "common.name" . }}
+  clusterIP: {{ .Values.config.aaiServiceClusterIp }}
diff --git a/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml b/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml
deleted file mode 100644 (file)
index 39c6138..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiSparkyBe }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-sparky-be-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-sparky-be-model-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/model/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-sparky-be-portal-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/portal/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: aai-sparky-be-secret
-  namespace: {{ .Values.nsPrefix }}
-type: Opaque
-data:
-{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/auth/*").AsSecrets . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aai-sparky-be-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/sparky-be/logback.xml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/aai/templates/sparky-be-deployment.yaml b/kubernetes/aai/templates/sparky-be-deployment.yaml
deleted file mode 100644 (file)
index 4b31969..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAaiSparkyBe }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: aai-sparky-be
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.sparkyReplicas }}
-  selector:
-    matchLabels:
-      app: sparky-be
-  template:
-    metadata:
-      labels:
-        app: sparky-be
-      name: aai-sparky-be
-    spec:
-      containers:
-      - name: sparky-be
-        image: "{{ .Values.image.sparkyBeImage }}:{{ .Values.image.sparkyBeVersion }}"
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: /opt/app/sparky/config/
-        - name: KEY_MANAGER_PASSWORD
-          value: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
-        - name: KEY_STORE_PASSWORD
-          value: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/app/sparky/config/auth/
-          name: aai-sparky-be-auth-config
-        - mountPath: /opt/app/sparky/config/synchronizer.properties
-          subPath: synchronizer.properties
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/suggestive-search.properties
-          subPath: suggestive-search.properties
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/search-service.properties
-          subPath: search-service.properties
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/roles.config
-          subPath: roles.config
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/elasticsearch.properties
-          subPath: elasticsearch.properties
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/aai.properties
-          subPath: aai.properties
-          name: aai-sparky-be-config
-        - mountPath: /opt/app/sparky/config/model/
-          name: aai-sparky-be-model-config
-        - mountPath: /opt/app/sparky/config/portal/
-          name: aai-sparky-be-portal-config
-        - mountPath: /var/log/onap
-          name: aai-sparky-be-logs
-        - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml
-          name: aai-sparky-be-log-conf
-          subPath: logback.xml
-        ports:
-        - containerPort: 9517
-        readinessProbe:
-          tcpSocket:
-            port: 9517
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: filebeat-onap-aai-sparky
-        image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          subPath: filebeat.yml
-          name: filebeat-conf
-        - mountPath: /var/log/onap
-          name: aai-sparky-be-logs
-        - mountPath: /usr/share/filebeat/data
-          name: aai-sparky-filebeat
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: aai-sparky-be-config
-        configMap:
-          name: aai-sparky-be-configmap
-      - name: aai-sparky-be-model-config
-        configMap:
-          name: aai-sparky-be-model-configmap
-      - name: aai-sparky-be-portal-config
-        configMap:
-          name: aai-sparky-be-portal-configmap
-      - name: aai-sparky-be-auth-config
-        secret:
-          secretName: aai-sparky-be-secret
-      - name: filebeat-conf
-        configMap:
-          name: aai-filebeat-configmap
-      - name: aai-sparky-be-logs
-        emptyDir: {}
-      - name: aai-sparky-filebeat
-        emptyDir: {}
-      - name: aai-sparky-be-log-conf
-        configMap:
-         name: aai-sparky-be-log-configmap
-      restartPolicy: Always
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
index eaeaa2e..b064568 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-nsPrefix: onap
-pullPolicy: Always
-nodePortPrefix: 302
+# Default values for aai.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+  nodePortPrefix: 302
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  dockerhubRepository: docker.io
+  busyboxImage: busybox
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  restartPolicy: Always
 
-# 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.1.0
-  aaiProxy: aaionap/haproxy
-  aaiProxyVersion: 1.1.0
-  aaiHbaseImage: aaionap/hbase
-  aaiHbaseVersion: 1.2.0
-  modelLoaderImage: nexus3.onap.org:10001/onap/model-loader
-  modelLoaderVersion: v1.1.0
-  aaiResourcesImage: nexus3.onap.org:10001/openecomp/aai-resources
-  aaiResourcesVersion: v1.1.0
-  aaiTraversalImage: nexus3.onap.org:10001/openecomp/aai-traversal
-  aaiTraversalVersion: v1.1.0
-  dataRouterImage: nexus3.onap.org:10001/onap/data-router
-  dataRouterVersion: v1.1.0
-  elasticsearchImage: elasticsearch
-  elasticsearchVersion: 2.4.1
-  searchDataImage: nexus3.onap.org:10001/onap/search-data-service
-  searchDataVersion: v1.1.0
-  sparkyBeImage: nexus3.onap.org:10001/onap/sparky-be
-  sparkyBeVersion: v1.1.0
-  gremlinServerImage: aaionap/gremlin-server
-  filebeat: docker.elastic.co/beats/filebeat:5.5.0
-  es_bb: busybox
-aaicoreversion: 1.1.0-SNAPSHOT
-persistence:
-  enabled: true
-  
-  ## A manually managed Persistent Volume and Claim
-  ## Requires persistence.enabled: true
-  ## If defined, PVC must be created manually before volume will be bound
-  # existingClaim:
-  volumeReclaimPolicy: Retain
+# application image
+dockerhubRepository: registry.hub.docker.com
+image: aaionap/haproxy:1.1.0
+pullPolicy: Always
 
-  ## database data Persistent Volume Storage Class
-  ## If defined, storageClassName: <storageClass>
-  ## If set to "-", storageClassName: "", which disables dynamic provisioning
-  ## If undefined (the default) or set to null, no storageClassName spec is
-  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
-  ##   GKE, AWS & OpenStack)
-  ##
-  # storageClass: "-"
-  accessMode: ReadWriteMany
-  size: 2Gi
-  mountPath: /dockerdata-nfs
-  mountSubPath: aai/data-router/logs
+# flag to enable debugging - application support required
+debugEnabled: false
 
+# application configuration
 config:
+  # POLICY hotfix - Note this must be temporary
+  # See https://jira.onap.org/browse/POLICY-510
+  aaiServiceClusterIp:
   logstashServiceName: log-ls
   logstashPort: 5044
 
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  name: aai
+  externalPort: 8080
+  internalPort: 8080
+  nodePort: 32
+  externalPort2: 8443
+  internalPort2: 8443
+  nodePort2: 33
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
index 91943f4..c3690cc 100644 (file)
@@ -22,7 +22,7 @@ dependencies:
     repository: '@local'
     condition: aaf.enabled
   - name: aai
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: aai.enabled
   - name: appc