From 82cee4d96d7a8d829877d1ecbd1e68c5853b150e Mon Sep 17 00:00:00 2001 From: Daniel Silverthorn Date: Wed, 28 Mar 2018 19:18:19 +0000 Subject: Conform to helm standards Change-Id: I6cda4dbc168ae6cb110deca5596e5d96f517e7fe Issue-ID: OOM-790 Signed-off-by: Daniel Silverthorn --- kubernetes/aai/charts/aai-champ/Chart.yaml | 18 ++ kubernetes/aai/charts/aai-champ/requirements.yaml | 21 ++ .../config/appconfig/auth/champ_policy.json | 19 ++ .../config/appconfig/auth/tomcat_keystore | Bin 0 -> 2214 bytes .../config/appconfig/champ-api.properties | 6 + .../resources/config/dynamic/conf/champ-beans.xml | 62 ++++++ .../aai/charts/aai-champ/templates/configmap.yaml | 29 +++ .../aai/charts/aai-champ/templates/deployment.yaml | 117 +++++++++++ .../aai/charts/aai-champ/templates/secrets.yaml | 38 ++++ .../aai/charts/aai-champ/templates/service.yaml | 39 ++++ kubernetes/aai/charts/aai-champ/values.yaml | 62 ++++++ kubernetes/aai/charts/aai-gizmo/.helmignore | 21 ++ kubernetes/aai/charts/aai-gizmo/Chart.yaml | 18 ++ .../charts/aai-gizmo/resources/config/README.txt | 10 + .../aai-gizmo/resources/config/auth/champ-cert.p12 | Bin 0 -> 2556 bytes .../resources/config/auth/crud_policy.json | 18 ++ .../resources/config/auth/datarouter-cert.p12 | Bin 0 -> 2556 bytes .../resources/config/auth/tomcat_keystore | Bin 0 -> 2214 bytes .../aai-gizmo/resources/config/crud-api.properties | 5 + .../aai-gizmo/resources/config/crud-beans.xml | 35 ++++ .../resources/config/log/filebeat/filebeat.yml | 41 ++++ .../aai-gizmo/resources/config/log/logback.xml | 213 +++++++++++++++++++++ .../config/model/edge_properties_v11.json | 6 + .../config/model/edge_properties_v12.json | 6 + .../config/model/edge_properties_v13.json | 6 + .../aai/charts/aai-gizmo/templates/NOTES.txt | 19 ++ .../aai/charts/aai-gizmo/templates/configmap.yaml | 45 +++++ .../aai/charts/aai-gizmo/templates/deployment.yaml | 142 ++++++++++++++ .../aai/charts/aai-gizmo/templates/secrets.yaml | 41 ++++ .../aai/charts/aai-gizmo/templates/service.yaml | 40 ++++ kubernetes/aai/charts/aai-gizmo/values.yaml | 60 ++++++ kubernetes/aai/charts/champ/Chart.yaml | 18 -- kubernetes/aai/charts/champ/requirements.yaml | 21 -- .../config/appconfig/auth/champ_policy.json | 19 -- .../config/appconfig/auth/tomcat_keystore | Bin 2214 -> 0 bytes .../config/appconfig/champ-api.properties | 6 - .../resources/config/dynamic/conf/champ-beans.xml | 62 ------ .../aai/charts/champ/templates/configmap.yaml | 29 --- .../aai/charts/champ/templates/deployment.yaml | 107 ----------- kubernetes/aai/charts/champ/templates/secrets.yaml | 22 --- kubernetes/aai/charts/champ/templates/service.yaml | 39 ---- kubernetes/aai/charts/champ/values.yaml | 58 ------ kubernetes/aai/charts/gizmo/.helmignore | 21 -- kubernetes/aai/charts/gizmo/Chart.yaml | 18 -- .../aai/charts/gizmo/resources/config/README.txt | 10 - .../gizmo/resources/config/auth/champ-cert.p12 | Bin 2556 -> 0 bytes .../gizmo/resources/config/auth/crud_policy.json | 18 -- .../resources/config/auth/datarouter-cert.p12 | Bin 2556 -> 0 bytes .../gizmo/resources/config/auth/tomcat_keystore | Bin 2214 -> 0 bytes .../gizmo/resources/config/crud-api.properties | 5 - .../charts/gizmo/resources/config/crud-beans.xml | 35 ---- .../resources/config/log/filebeat/filebeat.yml | 41 ---- .../charts/gizmo/resources/config/log/logback.xml | 213 --------------------- .../config/model/edge_properties_v11.json | 6 - .../config/model/edge_properties_v12.json | 6 - .../config/model/edge_properties_v13.json | 6 - kubernetes/aai/charts/gizmo/templates/NOTES.txt | 19 -- .../aai/charts/gizmo/templates/configmap.yaml | 45 ----- .../aai/charts/gizmo/templates/deployment.yaml | 142 -------------- kubernetes/aai/charts/gizmo/templates/secrets.yaml | 41 ---- kubernetes/aai/charts/gizmo/templates/service.yaml | 40 ---- kubernetes/aai/charts/gizmo/values.yaml | 60 ------ 62 files changed, 1137 insertions(+), 1107 deletions(-) create mode 100644 kubernetes/aai/charts/aai-champ/Chart.yaml create mode 100644 kubernetes/aai/charts/aai-champ/requirements.yaml create mode 100644 kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/champ_policy.json create mode 100644 kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore create mode 100644 kubernetes/aai/charts/aai-champ/resources/config/appconfig/champ-api.properties create mode 100644 kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml create mode 100644 kubernetes/aai/charts/aai-champ/templates/configmap.yaml create mode 100644 kubernetes/aai/charts/aai-champ/templates/deployment.yaml create mode 100644 kubernetes/aai/charts/aai-champ/templates/secrets.yaml create mode 100644 kubernetes/aai/charts/aai-champ/templates/service.yaml create mode 100644 kubernetes/aai/charts/aai-champ/values.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/.helmignore create mode 100644 kubernetes/aai/charts/aai-gizmo/Chart.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/README.txt create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/auth/champ-cert.p12 create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/auth/crud_policy.json create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/auth/datarouter-cert.p12 create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/auth/tomcat_keystore create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/crud-api.properties create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/crud-beans.xml create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/log/filebeat/filebeat.yml create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/log/logback.xml create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v11.json create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v12.json create mode 100644 kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v13.json create mode 100644 kubernetes/aai/charts/aai-gizmo/templates/NOTES.txt create mode 100644 kubernetes/aai/charts/aai-gizmo/templates/configmap.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/templates/secrets.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/templates/service.yaml create mode 100644 kubernetes/aai/charts/aai-gizmo/values.yaml delete mode 100644 kubernetes/aai/charts/champ/Chart.yaml delete mode 100644 kubernetes/aai/charts/champ/requirements.yaml delete mode 100644 kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json delete mode 100644 kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore delete mode 100644 kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties delete mode 100644 kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml delete mode 100644 kubernetes/aai/charts/champ/templates/configmap.yaml delete mode 100644 kubernetes/aai/charts/champ/templates/deployment.yaml delete mode 100644 kubernetes/aai/charts/champ/templates/secrets.yaml delete mode 100644 kubernetes/aai/charts/champ/templates/service.yaml delete mode 100644 kubernetes/aai/charts/champ/values.yaml delete mode 100644 kubernetes/aai/charts/gizmo/.helmignore delete mode 100644 kubernetes/aai/charts/gizmo/Chart.yaml delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/README.txt delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/crud-api.properties delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/log/logback.xml delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json delete mode 100644 kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json delete mode 100644 kubernetes/aai/charts/gizmo/templates/NOTES.txt delete mode 100644 kubernetes/aai/charts/gizmo/templates/configmap.yaml delete mode 100644 kubernetes/aai/charts/gizmo/templates/deployment.yaml delete mode 100644 kubernetes/aai/charts/gizmo/templates/secrets.yaml delete mode 100644 kubernetes/aai/charts/gizmo/templates/service.yaml delete mode 100644 kubernetes/aai/charts/gizmo/values.yaml (limited to 'kubernetes') diff --git a/kubernetes/aai/charts/aai-champ/Chart.yaml b/kubernetes/aai/charts/aai-champ/Chart.yaml new file mode 100644 index 0000000000..1704337efa --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/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 Champ microservice +name: aai-champ +version: 2.0.0 diff --git a/kubernetes/aai/charts/aai-champ/requirements.yaml b/kubernetes/aai/charts/aai-champ/requirements.yaml new file mode 100644 index 0000000000..9552dfd9e0 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/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-champ/resources/config/appconfig/auth/champ_policy.json b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/champ_policy.json new file mode 100644 index 0000000000..ee04a714be --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/champ_policy.json @@ -0,0 +1,19 @@ +{ + "roles": [ + { + "name": "admin", + "functions": [ + { + "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ] + } + ], + + "users": [ + { + "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" + } + ] + } + ] +} + diff --git a/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore new file mode 100644 index 0000000000..9eec841aa2 Binary files /dev/null and b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore differ diff --git a/kubernetes/aai/charts/aai-champ/resources/config/appconfig/champ-api.properties b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/champ-api.properties new file mode 100644 index 0000000000..3b90c5522f --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/champ-api.properties @@ -0,0 +1,6 @@ +keyName=aai-uuid +sourceOfTruthName=source-of-truth +createdTsName=aai-created-ts +lastModTsName=aai-last-mod-ts +collectionPropertiesKey=properties + diff --git a/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml b/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml new file mode 100644 index 0000000000..f97ac16864 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-champ/templates/configmap.yaml b/kubernetes/aai/charts/aai-champ/templates/configmap.yaml new file mode 100644 index 0000000000..a085839cc1 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/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" . }} + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/appconfig/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dynamic + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/dynamic/conf/*").AsConfig . | indent 2 }} diff --git a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml new file mode 100644 index 0000000000..ccb90213d9 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml @@ -0,0 +1,117 @@ +# 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: + containers: + - name: {{ include "common.name" . }} + image: "{{ .Values.global.repository | default .Values.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/champ-service/appconfig" + - name: GRAPHIMPL + value: "janus-deps" + - 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/champ-service/dynamic/conf" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/champ-service/appconfig/champ-api.properties + name: {{ include "common.fullname" . }}-config + subPath: champ-api.properties + - mountPath: /opt/app/champ-service/appconfig/auth + name: {{ include "common.fullname" . }}-secrets + - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml + name: {{ include "common.fullname" . }}-dynamic-config + subPath: champ-beans.xml + - mountPath: /logs + 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 }} + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-config + configMap: + name: {{ include "common.fullname" . }} + items: + - key: champ-api.properties + path: champ-api.properties + - name: {{ include "common.fullname" . }}-secrets + secret: + secretName: {{ include "common.fullname" . }}-champ + - name: {{ include "common.fullname" . }}-dynamic-config + configMap: + name: {{ include "common.fullname" . }}-dynamic + items: + - key: champ-beans.xml + path: champ-beans.xml + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-champ/templates/secrets.yaml b/kubernetes/aai/charts/aai-champ/templates/secrets.yaml new file mode 100644 index 0000000000..c0e2559db9 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/templates/secrets.yaml @@ -0,0 +1,38 @@ +# 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" . }}-champ + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/appconfig/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-champ/templates/service.yaml b/kubernetes/aai/charts/aai-champ/templates/service.yaml new file mode 100644 index 0000000000..93b0fd1254 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/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.fullname" . }} + 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.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/aai/charts/aai-champ/values.yaml b/kubernetes/aai/charts/aai-champ/values.yaml new file mode 100644 index 0000000000..d5d9b39423 --- /dev/null +++ b/kubernetes/aai/charts/aai-champ/values.yaml @@ -0,0 +1,62 @@ +# 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:1.0.0 + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# + +# application image +image: onap/champ:1.2-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 + name: champ + internalPort: 9522 + nodePort: 78 + +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/aai/charts/aai-gizmo/.helmignore b/kubernetes/aai/charts/aai-gizmo/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/.helmignore @@ -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-gizmo/Chart.yaml b/kubernetes/aai/charts/aai-gizmo/Chart.yaml new file mode 100644 index 0000000000..86f364331e --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/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: Gizmo service +name: aai-gizmo +version: 2.0.0 diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/README.txt b/kubernetes/aai/charts/aai-gizmo/resources/config/README.txt new file mode 100644 index 0000000000..5cc01497f5 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/README.txt @@ -0,0 +1,10 @@ +This directory contains all external configuration files that +need to be mounted into an application container. + +See the configmap.yaml in the templates directory for an example +of how to load (ie map) config files from this directory, into +Kubernetes, for distribution within the k8s cluster. + +See deployment.yaml in the templates directory for an example +of how the 'config mapped' files are then mounted into the +containers. diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/auth/champ-cert.p12 b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/champ-cert.p12 new file mode 100644 index 0000000000..dbf4fcacec Binary files /dev/null and b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/champ-cert.p12 differ diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/auth/crud_policy.json b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/crud_policy.json new file mode 100644 index 0000000000..d8b065e7f6 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/crud_policy.json @@ -0,0 +1,18 @@ +{ + "roles": [ + { + "name": "admin", + "functions": [ + { + "name": "crud", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" }, { "name": "PATCH"} ] + } + ], + + "users": [ + { + "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/auth/datarouter-cert.p12 b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/datarouter-cert.p12 new file mode 100644 index 0000000000..dbf4fcacec Binary files /dev/null and b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/datarouter-cert.p12 differ diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/tomcat_keystore new file mode 100644 index 0000000000..9eec841aa2 Binary files /dev/null and b/kubernetes/aai/charts/aai-gizmo/resources/config/auth/tomcat_keystore differ diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/crud-api.properties b/kubernetes/aai/charts/aai-gizmo/resources/config/crud-api.properties new file mode 100644 index 0000000000..a86d47203a --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/crud-api.properties @@ -0,0 +1,5 @@ +# CRUD-API configuration + +crud.async.request.timeout=60000 +crud.async.response.process.poll.interval=1000 +crud.collection.properties.key=properties diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/crud-beans.xml b/kubernetes/aai/charts/aai-gizmo/resources/config/crud-beans.xml new file mode 100644 index 0000000000..a6cac628db --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/crud-beans.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/log/filebeat/filebeat.yml b/kubernetes/aai/charts/aai-gizmo/resources/config/log/filebeat/filebeat.yml new file mode 100644 index 0000000000..9ad559c027 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/log/filebeat/filebeat.yml @@ -0,0 +1,41 @@ +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*/*.log + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["logstash.{{ .Release.Name }}-log:5044"] + #If enable will do load balancing among availabe Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-gizmo/resources/config/log/logback.xml new file mode 100644 index 0000000000..f63afd3c6b --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/log/logback.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + INFO + + ${queueSize} + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v11.json b/kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v11.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/model/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-gizmo/resources/config/model/edge_properties_v12.json b/kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v12.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/model/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-gizmo/resources/config/model/edge_properties_v13.json b/kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v13.json new file mode 100644 index 0000000000..8d00636d27 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/resources/config/model/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-gizmo/templates/NOTES.txt b/kubernetes/aai/charts/aai-gizmo/templates/NOTES.txt new file mode 100644 index 0000000000..24371d08ab --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/aai/charts/aai-gizmo/templates/configmap.yaml b/kubernetes/aai/charts/aai-gizmo/templates/configmap.yaml new file mode 100644 index 0000000000..b988d31fd9 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/templates/configmap.yaml @@ -0,0 +1,45 @@ +# 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" . }}-model-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/model/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-log-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-filebeat-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml b/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml new file mode 100644 index 0000000000..80b5390d08 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml @@ -0,0 +1,142 @@ +# 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: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.global.repository | default .Values.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/crud-service/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/crud-service/dynamic/conf + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/crud-service/config/crud-api.properties + subPath: crud-api.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/crud-service/config/model/ + name: {{ include "common.fullname" . }}-model-config + - mountPath: /opt/app/crud-service/config/auth + name: {{ include "common.fullname" . }}-auth-secret + - mountPath: /opt/app/crud-service/dynamic/conf/crud-beans.xml + name: {{ include "common.fullname" . }}-config + subPath: crud-beans.xml + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/crud-api/bundleconfig/etc/logback.xml + name: {{ include "common.fullname" . }}-logback-config + subPath: logback.xml + 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 }} + + - name: filebeat-onap + image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + name: filebeat-conf + subPath: filebeat.yml + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /usr/share/filebeat/data + name: {{ include "common.fullname" . }}-data-filebeat + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-data-filebeat + emptyDir: {} + - name: filebeat-conf + configMap: + name: {{ include "common.fullname" . }}-filebeat-configmap + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} + - name: {{ include "common.fullname" . }}-auth-secret + secret: + secretName: {{ include "common.fullname" . }}-auth + - name: {{ include "common.fullname" . }}-config + configMap: + name: {{ include "common.fullname" . }}-configmap + items: + - key: crud-api.properties + path: crud-api.properties + - key: crud-beans.xml + path: crud-beans.xml + - name: {{ include "common.fullname" . }}-logback-config + configMap: + name: {{ include "common.fullname" . }}-log-configmap + items: + - key: logback.xml + path: logback.xml + - name: {{ include "common.fullname" . }}-model-config + configMap: + name: {{ include "common.fullname" . }}-model-configmap + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-gizmo/templates/secrets.yaml b/kubernetes/aai/charts/aai-gizmo/templates/secrets.yaml new file mode 100644 index 0000000000..f5d8ec8ba5 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/templates/secrets.yaml @@ -0,0 +1,41 @@ +# 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" . }}-auth + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ (.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 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-gizmo/templates/service.yaml b/kubernetes/aai/charts/aai-gizmo/templates/service.yaml new file mode 100644 index 0000000000..f88a4e9533 --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/templates/service.yaml @@ -0,0 +1,40 @@ +# 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.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-gizmo/values.yaml b/kubernetes/aai/charts/aai-gizmo/values.yaml new file mode 100644 index 0000000000..de842859fe --- /dev/null +++ b/kubernetes/aai/charts/aai-gizmo/values.yaml @@ -0,0 +1,60 @@ +# 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: + nodePortPrefix: 302 + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# + +# application image +image: "onap/gizmo:1.1-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: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + name: crud-service + internalPort: 9520 + nodePort: 66 + +ingress: + enabled: false + +resources: {} \ No newline at end of file diff --git a/kubernetes/aai/charts/champ/Chart.yaml b/kubernetes/aai/charts/champ/Chart.yaml deleted file mode 100644 index a4ee888fce..0000000000 --- a/kubernetes/aai/charts/champ/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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: Champ microservice -name: champ -version: 2.0.0 diff --git a/kubernetes/aai/charts/champ/requirements.yaml b/kubernetes/aai/charts/champ/requirements.yaml deleted file mode 100644 index 9552dfd9e0..0000000000 --- a/kubernetes/aai/charts/champ/requirements.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# 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/champ/resources/config/appconfig/auth/champ_policy.json b/kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json deleted file mode 100644 index ee04a714be..0000000000 --- a/kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "roles": [ - { - "name": "admin", - "functions": [ - { - "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ] - } - ], - - "users": [ - { - "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" - } - ] - } - ] -} - diff --git a/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore b/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore deleted file mode 100644 index 9eec841aa2..0000000000 Binary files a/kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore and /dev/null differ diff --git a/kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties b/kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties deleted file mode 100644 index 3b90c5522f..0000000000 --- a/kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties +++ /dev/null @@ -1,6 +0,0 @@ -keyName=aai-uuid -sourceOfTruthName=source-of-truth -createdTsName=aai-created-ts -lastModTsName=aai-last-mod-ts -collectionPropertiesKey=properties - diff --git a/kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml b/kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml deleted file mode 100644 index cdf3aada40..0000000000 --- a/kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kubernetes/aai/charts/champ/templates/configmap.yaml b/kubernetes/aai/charts/champ/templates/configmap.yaml deleted file mode 100644 index 8f48f199f8..0000000000 --- a/kubernetes/aai/charts/champ/templates/configmap.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# 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/appconfig/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-dynamic-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/dynamic/conf/*").AsConfig . | indent 2 }} diff --git a/kubernetes/aai/charts/champ/templates/deployment.yaml b/kubernetes/aai/charts/champ/templates/deployment.yaml deleted file mode 100644 index 23314aeee4..0000000000 --- a/kubernetes/aai/charts/champ/templates/deployment.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# 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: - containers: - - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.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/champ-service/appconfig" - - name: GRAPHIMPL - value: "janus-deps" - - name: SERVICE_BEANS - value: "/opt/app/champ-service/dynamic/conf" - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /opt/app/champ-service/appconfig/champ-api.properties - name: {{ include "common.fullname" . }}-config - subPath: champ-api.properties - - mountPath: /opt/app/champ-service/appconfig/auth - name: {{ include "common.fullname" . }}-secrets - - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml - name: {{ include "common.fullname" . }}-dynamic-config - subPath: champ-beans.xml - - mountPath: /logs - 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 }} - - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: {{ include "common.fullname" . }}-config - configMap: - name: {{ include "common.fullname" . }}-configmap - items: - - key: champ-api.properties - path: champ-api.properties - - name: {{ include "common.fullname" . }}-secrets - secret: - secretName: {{ include "common.fullname" . }}-champ-secrets - - name: {{ include "common.fullname" . }}-dynamic-config - configMap: - name: {{ include "common.fullname" . }}-dynamic-configmap - items: - - key: champ-beans.xml - path: champ-beans.xml - - name: {{ include "common.fullname" . }}-logs - emptyDir: {} - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/champ/templates/secrets.yaml b/kubernetes/aai/charts/champ/templates/secrets.yaml deleted file mode 100644 index e939eb904b..0000000000 --- a/kubernetes/aai/charts/champ/templates/secrets.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# 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" . }}-champ-secrets - namespace: {{ include "common.namespace" . }} -type: Opaque -data: -{{ tpl (.Files.Glob "resources/config/appconfig/auth/*").AsSecrets . | indent 2 }} diff --git a/kubernetes/aai/charts/champ/templates/service.yaml b/kubernetes/aai/charts/champ/templates/service.yaml deleted file mode 100644 index 93b0fd1254..0000000000 --- a/kubernetes/aai/charts/champ/templates/service.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# 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.fullname" . }} - 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.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} - {{- end}} - selector: - app: {{ include "common.name" . }} - release: {{ .Release.Name }} diff --git a/kubernetes/aai/charts/champ/values.yaml b/kubernetes/aai/charts/champ/values.yaml deleted file mode 100644 index 91a1e52091..0000000000 --- a/kubernetes/aai/charts/champ/values.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# 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:1.0.0 - loggingImage: beats/filebeat:5.5.0 - -################################################################# -# Application configuration defaults. -################################################################# - -# application image -image: onap/champ:1.2.0 - -# 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 - name: champ - externalPort: 78 - internalPort: 9522 - nodePort: 78 - -ingress: - enabled: false - -resources: {} diff --git a/kubernetes/aai/charts/gizmo/.helmignore b/kubernetes/aai/charts/gizmo/.helmignore deleted file mode 100644 index f0c1319444..0000000000 --- a/kubernetes/aai/charts/gizmo/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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/gizmo/Chart.yaml b/kubernetes/aai/charts/gizmo/Chart.yaml deleted file mode 100644 index 4633b06dff..0000000000 --- a/kubernetes/aai/charts/gizmo/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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: Gizmo service -name: gizmo -version: 2.0.0 \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/resources/config/README.txt b/kubernetes/aai/charts/gizmo/resources/config/README.txt deleted file mode 100644 index 5cc01497f5..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -This directory contains all external configuration files that -need to be mounted into an application container. - -See the configmap.yaml in the templates directory for an example -of how to load (ie map) config files from this directory, into -Kubernetes, for distribution within the k8s cluster. - -See deployment.yaml in the templates directory for an example -of how the 'config mapped' files are then mounted into the -containers. diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 b/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 deleted file mode 100644 index dbf4fcacec..0000000000 Binary files a/kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 and /dev/null differ diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json b/kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json deleted file mode 100644 index d8b065e7f6..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "roles": [ - { - "name": "admin", - "functions": [ - { - "name": "crud", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" }, { "name": "PATCH"} ] - } - ], - - "users": [ - { - "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 b/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 deleted file mode 100644 index dbf4fcacec..0000000000 Binary files a/kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 and /dev/null differ diff --git a/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore deleted file mode 100644 index 9eec841aa2..0000000000 Binary files a/kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore and /dev/null differ diff --git a/kubernetes/aai/charts/gizmo/resources/config/crud-api.properties b/kubernetes/aai/charts/gizmo/resources/config/crud-api.properties deleted file mode 100644 index a86d47203a..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/crud-api.properties +++ /dev/null @@ -1,5 +0,0 @@ -# CRUD-API configuration - -crud.async.request.timeout=60000 -crud.async.response.process.poll.interval=1000 -crud.collection.properties.key=properties diff --git a/kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml b/kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml deleted file mode 100644 index 04f1210433..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml b/kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml deleted file mode 100644 index 9ad559c027..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml +++ /dev/null @@ -1,41 +0,0 @@ -filebeat.prospectors: -#it is mandatory, in our case it's log -- input_type: log - #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. - paths: - - /var/log/onap/*/*/*/*.log - - /var/log/onap/*/*/*.log - - /var/log/onap/*/*.log - #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive - ignore_older: 48h - # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit - clean_inactive: 96h - - -# Name of the registry file. If a relative path is used, it is considered relative to the -# data path. Else full qualified file name. -#filebeat.registry_file: ${path.data}/registry - - -output.logstash: - #List of logstash server ip addresses with port number. - #But, in our case, this will be the loadbalancer IP address. - #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. - hosts: ["logstash.{{ .Release.Name }}-log:5044"] - #If enable will do load balancing among availabe Logstash, automatically. - loadbalance: true - - #The list of root certificates for server verifications. - #If certificate_authorities is empty or not set, the trusted - #certificate authorities of the host system are used. - #ssl.certificate_authorities: $ssl.certificate_authorities - - #The path to the certificate for SSL client authentication. If the certificate is not specified, - #client authentication is not available. - #ssl.certificate: $ssl.certificate - - #The client certificate key used for client authentication. - #ssl.key: $ssl.key - - #The passphrase used to decrypt an encrypted key stored in the configured key file - #ssl.key_passphrase: $ssl.key_passphrase diff --git a/kubernetes/aai/charts/gizmo/resources/config/log/logback.xml b/kubernetes/aai/charts/gizmo/resources/config/log/logback.xml deleted file mode 100644 index f63afd3c6b..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/log/logback.xml +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - ${pattern} - - - - - - - - ${logDirectory}/${generalLogName}.log - - ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - INFO - - ${queueSize} - - - - - ${logDirectory}/${auditLogName}.log - - ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - - - ${logDirectory}/${errorLogName}.log - - ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - INFO - - - - ${queueSize} - - - - ${logDirectory}/${debugLogName}.log - - ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json deleted file mode 100644 index 8d00636d27..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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/gizmo/resources/config/model/edge_properties_v12.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json deleted file mode 100644 index 8d00636d27..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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/gizmo/resources/config/model/edge_properties_v13.json b/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json deleted file mode 100644 index 8d00636d27..0000000000 --- a/kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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/gizmo/templates/NOTES.txt b/kubernetes/aai/charts/gizmo/templates/NOTES.txt deleted file mode 100644 index 24371d08ab..0000000000 --- a/kubernetes/aai/charts/gizmo/templates/NOTES.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http://{{ . }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.externalPort }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} -{{- end }} diff --git a/kubernetes/aai/charts/gizmo/templates/configmap.yaml b/kubernetes/aai/charts/gizmo/templates/configmap.yaml deleted file mode 100644 index b988d31fd9..0000000000 --- a/kubernetes/aai/charts/gizmo/templates/configmap.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# 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" . }}-model-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/model/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-log-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-filebeat-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/templates/deployment.yaml b/kubernetes/aai/charts/gizmo/templates/deployment.yaml deleted file mode 100644 index 80b5390d08..0000000000 --- a/kubernetes/aai/charts/gizmo/templates/deployment.yaml +++ /dev/null @@ -1,142 +0,0 @@ -# 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: - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.global.repository | default .Values.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/crud-service/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/crud-service/dynamic/conf - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /opt/app/crud-service/config/crud-api.properties - subPath: crud-api.properties - name: {{ include "common.fullname" . }}-config - - mountPath: /opt/app/crud-service/config/model/ - name: {{ include "common.fullname" . }}-model-config - - mountPath: /opt/app/crud-service/config/auth - name: {{ include "common.fullname" . }}-auth-secret - - mountPath: /opt/app/crud-service/dynamic/conf/crud-beans.xml - name: {{ include "common.fullname" . }}-config - subPath: crud-beans.xml - - mountPath: /var/log/onap - name: {{ include "common.fullname" . }}-logs - - mountPath: /opt/app/crud-api/bundleconfig/etc/logback.xml - name: {{ include "common.fullname" . }}-logback-config - subPath: logback.xml - 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 }} - - - name: filebeat-onap - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: {{ include "common.fullname" . }}-logs - - mountPath: /usr/share/filebeat/data - name: {{ include "common.fullname" . }}-data-filebeat - - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: {{ include "common.fullname" . }}-filebeat-configmap - - name: {{ include "common.fullname" . }}-logs - emptyDir: {} - - name: {{ include "common.fullname" . }}-auth-secret - secret: - secretName: {{ include "common.fullname" . }}-auth - - name: {{ include "common.fullname" . }}-config - configMap: - name: {{ include "common.fullname" . }}-configmap - items: - - key: crud-api.properties - path: crud-api.properties - - key: crud-beans.xml - path: crud-beans.xml - - name: {{ include "common.fullname" . }}-logback-config - configMap: - name: {{ include "common.fullname" . }}-log-configmap - items: - - key: logback.xml - path: logback.xml - - name: {{ include "common.fullname" . }}-model-config - configMap: - name: {{ include "common.fullname" . }}-model-configmap - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/gizmo/templates/secrets.yaml b/kubernetes/aai/charts/gizmo/templates/secrets.yaml deleted file mode 100644 index f5d8ec8ba5..0000000000 --- a/kubernetes/aai/charts/gizmo/templates/secrets.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# 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" . }}-auth - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ (.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 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/templates/service.yaml b/kubernetes/aai/charts/gizmo/templates/service.yaml deleted file mode 100644 index f88a4e9533..0000000000 --- a/kubernetes/aai/charts/gizmo/templates/service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# 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.fullname" . }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: -spec: - type: {{ .Values.service.type }} - ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }} - name: {{ .Values.service.name }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} - {{- end}} - selector: - app: {{ include "common.name" . }} - release: {{ .Release.Name }} \ No newline at end of file diff --git a/kubernetes/aai/charts/gizmo/values.yaml b/kubernetes/aai/charts/gizmo/values.yaml deleted file mode 100644 index de842859fe..0000000000 --- a/kubernetes/aai/charts/gizmo/values.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# 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: - nodePortPrefix: 302 - loggingImage: beats/filebeat:5.5.0 - -################################################################# -# Application configuration defaults. -################################################################# - -# application image -image: "onap/gizmo:1.1-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: true - -readiness: - initialDelaySeconds: 10 - periodSeconds: 10 - -service: - type: NodePort - name: crud-service - internalPort: 9520 - nodePort: 66 - -ingress: - enabled: false - -resources: {} \ No newline at end of file -- cgit 1.2.3-korg