From 54668628a12b389d40853c58330977a70bd4795d Mon Sep 17 00:00:00 2001 From: Jimmy Forsyth Date: Mon, 5 Aug 2019 12:01:16 -0400 Subject: Disable non-workflow mS in helm charts Issue-ID: AAI-2558 Signed-off-by: Jimmy Forsyth Change-Id: I06b4049b2e5c0bae734b4619abd6298a99ae2a11 --- components/aai-modelloader/.helmignore | 21 +++ components/aai-modelloader/Chart.yaml | 18 +++ .../resources/config/auth/aai-os-cert.p12 | Bin 0 -> 4357 bytes .../resources/config/auth/babel-client-cert.p12 | Bin 0 -> 2817 bytes .../resources/config/auth/tomcat_keystore | Bin 0 -> 2483 bytes .../resources/config/log/logback.xml | 168 +++++++++++++++++++++ .../resources/config/model-loader.properties | 46 ++++++ .../aai-modelloader/templates/configmap.yaml | 39 +++++ .../aai-modelloader/templates/deployment.yaml | 109 +++++++++++++ components/aai-modelloader/templates/secret.yaml | 27 ++++ components/aai-modelloader/templates/service.yaml | 43 ++++++ components/aai-modelloader/values.yaml | 80 ++++++++++ 12 files changed, 551 insertions(+) create mode 100644 components/aai-modelloader/.helmignore create mode 100644 components/aai-modelloader/Chart.yaml create mode 100644 components/aai-modelloader/resources/config/auth/aai-os-cert.p12 create mode 100644 components/aai-modelloader/resources/config/auth/babel-client-cert.p12 create mode 100644 components/aai-modelloader/resources/config/auth/tomcat_keystore create mode 100644 components/aai-modelloader/resources/config/log/logback.xml create mode 100644 components/aai-modelloader/resources/config/model-loader.properties create mode 100644 components/aai-modelloader/templates/configmap.yaml create mode 100644 components/aai-modelloader/templates/deployment.yaml create mode 100644 components/aai-modelloader/templates/secret.yaml create mode 100644 components/aai-modelloader/templates/service.yaml create mode 100644 components/aai-modelloader/values.yaml (limited to 'components/aai-modelloader') diff --git a/components/aai-modelloader/.helmignore b/components/aai-modelloader/.helmignore new file mode 100644 index 0000000..daebc7d --- /dev/null +++ b/components/aai-modelloader/.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/components/aai-modelloader/Chart.yaml b/components/aai-modelloader/Chart.yaml new file mode 100644 index 0000000..e3061ee --- /dev/null +++ b/components/aai-modelloader/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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 modelloader +name: aai-modelloader +version: 5.0.0 diff --git a/components/aai-modelloader/resources/config/auth/aai-os-cert.p12 b/components/aai-modelloader/resources/config/auth/aai-os-cert.p12 new file mode 100644 index 0000000..ee57120 Binary files /dev/null and b/components/aai-modelloader/resources/config/auth/aai-os-cert.p12 differ diff --git a/components/aai-modelloader/resources/config/auth/babel-client-cert.p12 b/components/aai-modelloader/resources/config/auth/babel-client-cert.p12 new file mode 100644 index 0000000..e64895e Binary files /dev/null and b/components/aai-modelloader/resources/config/auth/babel-client-cert.p12 differ diff --git a/components/aai-modelloader/resources/config/auth/tomcat_keystore b/components/aai-modelloader/resources/config/auth/tomcat_keystore new file mode 100644 index 0000000..e1d24d9 Binary files /dev/null and b/components/aai-modelloader/resources/config/auth/tomcat_keystore differ diff --git a/components/aai-modelloader/resources/config/log/logback.xml b/components/aai-modelloader/resources/config/log/logback.xml new file mode 100644 index 0000000..72b5dab --- /dev/null +++ b/components/aai-modelloader/resources/config/log/logback.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + ${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 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/aai-modelloader/resources/config/model-loader.properties b/components/aai-modelloader/resources/config/model-loader.properties new file mode 100644 index 0000000..246e528 --- /dev/null +++ b/components/aai-modelloader/resources/config/model-loader.properties @@ -0,0 +1,46 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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. + +# Model Loader Distribution Client Configuration +ml.distribution.ACTIVE_SERVER_TLS_AUTH=false +ml.distribution.ASDC_ADDRESS=sdc-be.{{.Release.Namespace}}:8443 +ml.distribution.CONSUMER_GROUP=aai-ml-group +ml.distribution.CONSUMER_ID=aai-ml +ml.distribution.ENVIRONMENT_NAME=AUTO +ml.distribution.KEYSTORE_PASSWORD= +ml.distribution.KEYSTORE_FILE=asdc-client.jks +ml.distribution.PASSWORD=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp +ml.distribution.POLLING_INTERVAL=30 +ml.distribution.POLLING_TIMEOUT=20 +ml.distribution.USER=aai +ml.distribution.ARTIFACT_TYPES=MODEL_QUERY_SPEC,TOSCA_CSAR +ml.distribution.MSG_BUS_ADDRESSES=message-router.{{.Release.Namespace}} + +# Model Loader AAI REST Client Configuration +ml.aai.BASE_URL=https://aai.{{.Release.Namespace}}:8443 +ml.aai.MODEL_URL=/aai/v*/service-design-and-creation/models/model/ +ml.aai.NAMED_QUERY_URL=/aai/v*/service-design-and-creation/named-queries/named-query/ +ml.aai.VNF_IMAGE_URL=/aai/v*/service-design-and-creation/vnf-images +ml.aai.KEYSTORE_FILE=aai-os-cert.p12 +ml.aai.KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o +ml.aai.AUTH_USER=ModelLoader +ml.aai.AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw + +# Model Loader Babel REST Client Configuration\r +ml.babel.BASE_URL=https://aai-babel.{{.Release.Namespace}}:9516 +ml.babel.GENERATE_ARTIFACTS_URL=/services/babel-service/v1/app/generateArtifacts +ml.babel.KEYSTORE_FILE=babel-client-cert.p12 +ml.babel.KEYSTORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +ml.babel.TRUSTSTORE_FILE=tomcat_keystore +ml.babel.TRUSTSTORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 diff --git a/components/aai-modelloader/templates/configmap.yaml b/components/aai-modelloader/templates/configmap.yaml new file mode 100644 index 0000000..cdb01fb --- /dev/null +++ b/components/aai-modelloader/templates/configmap.yaml @@ -0,0 +1,39 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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" . }}-prop + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/model-loader.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-log + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }} diff --git a/components/aai-modelloader/templates/deployment.yaml b/components/aai-modelloader/templates/deployment.yaml new file mode 100644 index 0000000..f34693f --- /dev/null +++ b/components/aai-modelloader/templates/deployment.yaml @@ -0,0 +1,109 @@ +# Copyright © 2018 Amdocs, AT&T +# Modifications Copyright © 2018 Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "common.name" . }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: CONFIG_HOME + value: /opt/app/model-loader/config/ + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/model-loader/config/model-loader.properties + subPath: model-loader.properties + name: {{ include "common.fullname" . }}-prop-config + - mountPath: /opt/app/model-loader/config/auth/ + name: {{ include "common.fullname" . }}-auth-config + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/model-loader/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + resources: +{{ include "common.resources" . }} + + # 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 + resources: +{{ include "common.resources" . }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-prop-config + configMap: + name: {{ include "common.fullname" . }}-prop + - name: {{ include "common.fullname" . }}-auth-config + secret: + secretName: {{ include "common.fullname" . }} + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} + - name: aai-filebeat + emptyDir: {} + - name: {{ include "common.fullname" . }}-log-conf + configMap: + name: {{ include "common.fullname" . }}-log + restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/components/aai-modelloader/templates/secret.yaml b/components/aai-modelloader/templates/secret.yaml new file mode 100644 index 0000000..6084ca3 --- /dev/null +++ b/components/aai-modelloader/templates/secret.yaml @@ -0,0 +1,27 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }} diff --git a/components/aai-modelloader/templates/service.yaml b/components/aai-modelloader/templates/service.yaml new file mode 100644 index 0000000..567d42d --- /dev/null +++ b/components/aai-modelloader/templates/service.yaml @@ -0,0 +1,43 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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 }} + - port: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.portName2 }} + {{- else -}} + - port: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + - port: {{ .Values.service.internalPort2 }} + name: {{ .Values.service.portName2 }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/components/aai-modelloader/values.yaml b/components/aai-modelloader/values.yaml new file mode 100644 index 0000000..5911a16 --- /dev/null +++ b/components/aai-modelloader/values.yaml @@ -0,0 +1,80 @@ +# Copyright © 2018 Amdocs, Bell Canada, 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. + +# Default values for modelloader. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + + +# application image +repository: nexus3.onap.org:10001 +image: onap/model-loader:1.4.0 +pullPolicy: Always +restartPolicy: Always +flavor: small +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + portName: aai-modelloader + externalPort: 8080 + internalPort: 8080 + nodePort: 10 + portName2: aai-modelloader-ssl + externalPort2: 8443 + internalPort2: 8443 + nodePort2: 29 + +ingress: + enabled: false + + +resources: + small: + limits: + cpu: 2 + memory: 4Gi + requests: + cpu: 0.5 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 8Gi + requests: + cpu: 1 + memory: 1536Mi + unlimited: {} -- cgit 1.2.3-korg