From f0b74b1e6ea2d097fce821df5741685542befbb0 Mon Sep 17 00:00:00 2001 From: Michael Arrastia Date: Tue, 21 Aug 2018 13:36:27 +0100 Subject: Add Spike microservice chart This is the Helm chart for the newly open-sourced Spike microservice. Change-Id: I4bba11b87db0df22d7beedc528a4dea738af5378 Issue-ID: AAI-1524 Signed-off-by: Michael Arrastia --- kubernetes/aai/charts/aai-spike/Chart.yaml | 18 ++ kubernetes/aai/charts/aai-spike/requirements.yaml | 21 +++ .../resources/config/auth/tomcat_keystore | Bin 0 -> 2214 bytes .../charts/aai-spike/resources/config/logback.xml | 194 +++++++++++++++++++++ .../model/edge_props/edge_properties_v10.json | 10 ++ .../model/edge_props/edge_properties_v11.json | 6 + .../model/edge_props/edge_properties_v12.json | 6 + .../model/edge_props/edge_properties_v13.json | 6 + .../model/edge_props/edge_properties_v14.json | 6 + .../model/edge_props/edge_properties_v7.json | 10 ++ .../model/edge_props/edge_properties_v8.json | 10 ++ .../model/edge_props/edge_properties_v9.json | 10 ++ .../resources/config/schemaIngest.properties | 30 ++++ .../aai-spike/resources/config/spike-beans.xml | 58 ++++++ .../aai-spike/resources/config/spike.properties | 28 +++ .../aai/charts/aai-spike/templates/configmap.yaml | 29 +++ .../aai/charts/aai-spike/templates/deployment.yaml | 159 +++++++++++++++++ .../aai/charts/aai-spike/templates/secrets.yaml | 37 ++++ .../aai/charts/aai-spike/templates/service.yaml | 39 +++++ kubernetes/aai/charts/aai-spike/values.yaml | 72 ++++++++ kubernetes/aai/values.yaml | 4 +- 21 files changed, 752 insertions(+), 1 deletion(-) create mode 100644 kubernetes/aai/charts/aai-spike/Chart.yaml create mode 100644 kubernetes/aai/charts/aai-spike/requirements.yaml create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/logback.xml create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v10.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v11.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v12.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v13.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v14.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v7.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v8.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v9.json create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/schemaIngest.properties create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/spike-beans.xml create mode 100644 kubernetes/aai/charts/aai-spike/resources/config/spike.properties create mode 100644 kubernetes/aai/charts/aai-spike/templates/configmap.yaml create mode 100644 kubernetes/aai/charts/aai-spike/templates/deployment.yaml create mode 100644 kubernetes/aai/charts/aai-spike/templates/secrets.yaml create mode 100644 kubernetes/aai/charts/aai-spike/templates/service.yaml create mode 100644 kubernetes/aai/charts/aai-spike/values.yaml (limited to 'kubernetes') diff --git a/kubernetes/aai/charts/aai-spike/Chart.yaml b/kubernetes/aai/charts/aai-spike/Chart.yaml new file mode 100644 index 0000000000..b9fd7b0fe0 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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: v1 +description: ONAP AAI Spike microservice +name: aai-spike +version: 2.0.0 \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/requirements.yaml b/kubernetes/aai/charts/aai-spike/requirements.yaml new file mode 100644 index 0000000000..9552dfd9e0 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/requirements.yaml @@ -0,0 +1,21 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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. + +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' diff --git a/kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore new file mode 100644 index 0000000000..9eec841aa2 Binary files /dev/null and b/kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore differ diff --git a/kubernetes/aai/charts/aai-spike/resources/config/logback.xml b/kubernetes/aai/charts/aai-spike/resources/config/logback.xml new file mode 100644 index 0000000000..e40ba13d04 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/logback.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v10.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v10.json new file mode 100644 index 0000000000..7cbddae375 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v10.json @@ -0,0 +1,10 @@ +{ + "isParent":"java.lang.Boolean", + "isParent-REV":"java.lang.Boolean", + "usesResource":"java.lang.Boolean", + "usesResource-REV":"java.lang.Boolean", + "SVC-INFRA":"java.lang.Boolean", + "SVC-INFRA-REV":"java.lang.Boolean", + "hasDelTarget":"java.lang.Boolean", + "hasDelTarget-REV":"java.lang.Boolean" +} diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v11.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v11.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v11.json @@ -0,0 +1,6 @@ +{ + "contains-other-v": "java.lang.String", + "delete-other-v": "java.lang.String", + "SVC-INFRA": "java.lang.String", + "prevent-delete": "java.lang.String" +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v12.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v12.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v12.json @@ -0,0 +1,6 @@ +{ + "contains-other-v": "java.lang.String", + "delete-other-v": "java.lang.String", + "SVC-INFRA": "java.lang.String", + "prevent-delete": "java.lang.String" +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v13.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v13.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v13.json @@ -0,0 +1,6 @@ +{ + "contains-other-v": "java.lang.String", + "delete-other-v": "java.lang.String", + "SVC-INFRA": "java.lang.String", + "prevent-delete": "java.lang.String" +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v14.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v14.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v14.json @@ -0,0 +1,6 @@ +{ + "contains-other-v": "java.lang.String", + "delete-other-v": "java.lang.String", + "SVC-INFRA": "java.lang.String", + "prevent-delete": "java.lang.String" +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v7.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v7.json new file mode 100644 index 0000000000..7cbddae375 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v7.json @@ -0,0 +1,10 @@ +{ + "isParent":"java.lang.Boolean", + "isParent-REV":"java.lang.Boolean", + "usesResource":"java.lang.Boolean", + "usesResource-REV":"java.lang.Boolean", + "SVC-INFRA":"java.lang.Boolean", + "SVC-INFRA-REV":"java.lang.Boolean", + "hasDelTarget":"java.lang.Boolean", + "hasDelTarget-REV":"java.lang.Boolean" +} diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v8.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v8.json new file mode 100644 index 0000000000..7cbddae375 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v8.json @@ -0,0 +1,10 @@ +{ + "isParent":"java.lang.Boolean", + "isParent-REV":"java.lang.Boolean", + "usesResource":"java.lang.Boolean", + "usesResource-REV":"java.lang.Boolean", + "SVC-INFRA":"java.lang.Boolean", + "SVC-INFRA-REV":"java.lang.Boolean", + "hasDelTarget":"java.lang.Boolean", + "hasDelTarget-REV":"java.lang.Boolean" +} diff --git a/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v9.json b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v9.json new file mode 100644 index 0000000000..7cbddae375 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/model/edge_props/edge_properties_v9.json @@ -0,0 +1,10 @@ +{ + "isParent":"java.lang.Boolean", + "isParent-REV":"java.lang.Boolean", + "usesResource":"java.lang.Boolean", + "usesResource-REV":"java.lang.Boolean", + "SVC-INFRA":"java.lang.Boolean", + "SVC-INFRA-REV":"java.lang.Boolean", + "hasDelTarget":"java.lang.Boolean", + "hasDelTarget-REV":"java.lang.Boolean" +} diff --git a/kubernetes/aai/charts/aai-spike/resources/config/schemaIngest.properties b/kubernetes/aai/charts/aai-spike/resources/config/schemaIngest.properties new file mode 100644 index 0000000000..cc51f179dd --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/schemaIngest.properties @@ -0,0 +1,30 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Copyright © 2018 Amdocs +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +# + +# Properties for the SchemaLocationsBean +# The AAI Schema jar will be unpacked to bundleconfig/etc +schemaConfig=NA +# Files named aai_oxm_v*.xml are unpacked here: +nodeDir=/opt/app/spike/bundleconfig/etc/oxm +# DB Edge Rules are unpacked here: +edgeDir=/opt/app/spike/bundleconfig/etc/dbedgerules +# DB Edge Property files are copied here: +edgePropsDir=/opt/app/spike/config/model/edge_props \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-spike/resources/config/spike-beans.xml b/kubernetes/aai/charts/aai-spike/resources/config/spike-beans.xml new file mode 100644 index 0000000000..20dfbc5e6d --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/spike-beans.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-spike/resources/config/spike.properties b/kubernetes/aai/charts/aai-spike/resources/config/spike.properties new file mode 100644 index 0000000000..c3ba4a3d5f --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/resources/config/spike.properties @@ -0,0 +1,28 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Copyright © 2018 Amdocs +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +# + +# Spike configuration + +spike.event.poll.interval=30000 +spike.event.offset.period= 10000 +spike.event.queue.capacity=10000 +spike.event.queue.delay=10000 +spike.props.reserved=source-of-truth,last-mod-source-of-truth,aai-created-ts,aai-last-mod-ts diff --git a/kubernetes/aai/charts/aai-spike/templates/configmap.yaml b/kubernetes/aai/charts/aai-spike/templates/configmap.yaml new file mode 100644 index 0000000000..8a517481d1 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/templates/configmap.yaml @@ -0,0 +1,29 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-edge-props-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/model/edge_props/*").AsConfig . | indent 2 }} diff --git a/kubernetes/aai/charts/aai-spike/templates/deployment.yaml b/kubernetes/aai/charts/aai-spike/templates/deployment.yaml new file mode 100644 index 0000000000..edf6ce84fe --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/templates/deployment.yaml @@ -0,0 +1,159 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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 }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - message-router-kafka + 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: {{ .Chart.Name }} + image: "{{ include "common.repository" . }}/{{ .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 .Values.liveness.enabled }} + 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 }} + env: + - name: CONFIG_HOME + value: /opt/app/spike/config + - name: KEY_STORE_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }}-pass + key: KEY_STORE_PASSWORD + - name: KEY_MANAGER_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }}-pass + key: KEY_MANAGER_PASSWORD + - name: SERVICE_BEANS + value: /opt/app/spike/dynamic/conf + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/spike/config/auth + name: {{ include "common.fullname" . }}-secrets + - mountPath: /opt/app/spike/dynamic/conf/spike-beans.xml + name: {{ include "common.fullname" . }}-config + subPath: spike-beans.xml + - mountPath: /opt/app/spike/config/spike.properties + subPath: spike.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/spike/config/schemaIngest.properties + subPath: schemaIngest.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/spike/config/model/edge_props + name: {{ include "common.fullname" . }}-edge-props-config + - mountPath: /opt/app/spike/bundleconfig/etc/logback.xml + name: {{ include "common.fullname" . }}-config + subPath: logback.xml + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + 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 }} + + # 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" . }}-secrets + secret: + secretName: {{ include "common.fullname" . }}-spike-secrets + - name: {{ include "common.fullname" . }}-config + configMap: + name: {{ include "common.fullname" . }}-configmap + items: + - key: spike.properties + path: spike.properties + - key: spike-beans.xml + path: spike-beans.xml + - key: schemaIngest.properties + path: schemaIngest.properties + - key: logback.xml + path: logback.xml + - name: {{ include "common.fullname" . }}-edge-props-config + configMap: + name: {{ include "common.fullname" . }}-edge-props-configmap + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} + - name: aai-filebeat + emptyDir: {} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-spike/templates/secrets.yaml b/kubernetes/aai/charts/aai-spike/templates/secrets.yaml new file mode 100644 index 0000000000..6a9810bd15 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/templates/secrets.yaml @@ -0,0 +1,37 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-spike-secrets + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-pass + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + KEY_STORE_PASSWORD: {{ .Values.config.keyStorePassword | b64enc | quote }} + KEY_MANAGER_PASSWORD: {{ .Values.config.keyManagerPassword | b64enc | quote }} diff --git a/kubernetes/aai/charts/aai-spike/templates/service.yaml b/kubernetes/aai/charts/aai-spike/templates/service.yaml new file mode 100644 index 0000000000..745c73b0e1 --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/templates/service.yaml @@ -0,0 +1,39 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + 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.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/aai/charts/aai-spike/values.yaml b/kubernetes/aai/charts/aai-spike/values.yaml new file mode 100644 index 0000000000..c8d20437ad --- /dev/null +++ b/kubernetes/aai/charts/aai-spike/values.yaml @@ -0,0 +1,72 @@ +# Copyright © 2018 Amdocs, AT&T +# +# 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. + +################################################################# +# Global configuration defaults. +################################################################# +global: + readinessImage: readiness-check:2.0.0 + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# + +# application image +image: onap/spike:1.0-STAGING-latest + +# 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: false + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + portName: spike + externalPort: 9518 + internalPort: 9518 + nodePort: 39 + +ingress: + enabled: false + +resources: {} + +# XML bean configuration +event: + port: + dmaap: 3904 + consumer: + topic: champRawEvents + publisher: + topic: spikeEvents diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml index 16e3705568..99699a0031 100644 --- a/kubernetes/aai/values.yaml +++ b/kubernetes/aai/values.yaml @@ -58,6 +58,8 @@ global: # global defaults serviceName: aai-traversal graphadmin: serviceName: aai-graphadmin + spike: + serviceName: aai-spike initContainers: enabled: true @@ -255,4 +257,4 @@ resources: {} # memory: 4Gi # requests: # cpu: 2 -# memory: 4Gi +# memory: 4Gi \ No newline at end of file -- cgit 1.2.3-korg