From 587ff479bc30f58ae00af64005f5e0260e99d1b7 Mon Sep 17 00:00:00 2001 From: jmac Date: Tue, 26 Mar 2019 00:35:39 +0000 Subject: prep Change-Id: I93651f6074a2c31785a01b65669be88e76c07d2d Signed-off-by: jmac Issue-ID: OOM-1359 --- kubernetes/selfservice/templates/deployment.yaml | 2 +- .../resources/config/overrides/override.yaml | 14 +++ .../charts/so-bpmn-infra/templates/deployment.yaml | 4 +- .../so/charts/so-bpmn-infra/templates/service.yaml | 5 +- kubernetes/so/charts/so-bpmn-infra/values.yaml | 10 +- .../so/charts/so-catalog-db-adapter/values.yaml | 6 +- .../so/charts/so-multivim-adapter/Chart.yaml | 18 +++ .../config/overrides/azure_key_mapping.json | 25 ++++ .../config/overrides/azure_value_mapping.json | 4 + .../resources/config/overrides/override.yaml | 97 +++++++++++++++ .../so-multivim-adapter/templates/configmap.yaml | 39 +++++++ .../so-multivim-adapter/templates/deployment.yaml | 130 +++++++++++++++++++++ .../charts/so-multivim-adapter/templates/pv.yaml | 36 ++++++ .../charts/so-multivim-adapter/templates/pvc.yaml | 47 ++++++++ .../so-multivim-adapter/templates/service.yaml | 41 +++++++ .../so/charts/so-multivim-adapter/values.yaml | 105 +++++++++++++++++ .../so-sdc-controller/templates/deployment.yaml | 9 ++ .../so/charts/so-sdc-controller/templates/pv.yaml | 36 ++++++ .../so/charts/so-sdc-controller/templates/pvc.yaml | 47 ++++++++ kubernetes/so/charts/so-sdc-controller/values.yaml | 20 ++++ 20 files changed, 686 insertions(+), 9 deletions(-) create mode 100755 kubernetes/so/charts/so-multivim-adapter/Chart.yaml create mode 100644 kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_key_mapping.json create mode 100644 kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_value_mapping.json create mode 100755 kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/override.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/templates/configmap.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/templates/deployment.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/templates/pv.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/templates/pvc.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/templates/service.yaml create mode 100755 kubernetes/so/charts/so-multivim-adapter/values.yaml create mode 100755 kubernetes/so/charts/so-sdc-controller/templates/pv.yaml create mode 100755 kubernetes/so/charts/so-sdc-controller/templates/pvc.yaml diff --git a/kubernetes/selfservice/templates/deployment.yaml b/kubernetes/selfservice/templates/deployment.yaml index e9588e4c0f..cd7c3f8b24 100644 --- a/kubernetes/selfservice/templates/deployment.yaml +++ b/kubernetes/selfservice/templates/deployment.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image:"{{ .Values.global.selfserviceRepository }}/{{ .Values.image }}" + image: "{{ .Values.global.selfserviceRepository }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: {{ .Values.deployerVolumePath }}/resources diff --git a/kubernetes/so/charts/so-bpmn-infra/resources/config/overrides/override.yaml b/kubernetes/so/charts/so-bpmn-infra/resources/config/overrides/override.yaml index a9eac31405..84829e7f8c 100755 --- a/kubernetes/so/charts/so-bpmn-infra/resources/config/overrides/override.yaml +++ b/kubernetes/so/charts/so-bpmn-infra/resources/config/overrides/override.yaml @@ -43,6 +43,18 @@ bpelURL: http://so-bpmn-infra.{{ include "common.namespace" . }}:8081 msb-ip: msb-iag.{{ include "common.namespace" . }} msb-port: 80 mso: + use: + qualified: + host: false + multivim: + timeout: PT30M + adapters: + vnf: + rest: + endpoint: http://so-multivim-adapter.{{ include "common.namespace" . }}:8088/multivim/rest/v1/vnf + has: + timeout: 30 + endpoint: http://localhost:8080/api/oof/v1/placement msoKey: 07a7159d3bf51a0e53be7a8f89699be7 correlation: timeout: 60 @@ -152,6 +164,8 @@ mso: generic-vnf: version: '14' v14: + cloud-region: + uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner customer: uri: /aai/v14/business/customers/customer generic-query: diff --git a/kubernetes/so/charts/so-bpmn-infra/templates/deployment.yaml b/kubernetes/so/charts/so-bpmn-infra/templates/deployment.yaml index ad3a19f37e..d11fe2b6a4 100755 --- a/kubernetes/so/charts/so-bpmn-infra/templates/deployment.yaml +++ b/kubernetes/so/charts/so-bpmn-infra/templates/deployment.yaml @@ -51,7 +51,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: {{ include "common.repository" . }}/{{ .Values.image }} + image: "{{ .Values.repository }}/{{ .Values.image }}" resources: {{ include "common.resources" . | indent 12 }} env: @@ -85,6 +85,8 @@ spec: secretKeyRef: name: {{ .Release.Name}}-so-db-secrets key: mariadb.admin.password + - name: JVM_ARGS + value: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address={{ .Values.service.internalPort2 }} envFrom: - configMapRef: name: {{ include "common.fullname" . }}-configmap diff --git a/kubernetes/so/charts/so-bpmn-infra/templates/service.yaml b/kubernetes/so/charts/so-bpmn-infra/templates/service.yaml index 741614886c..bf423c6fab 100755 --- a/kubernetes/so/charts/so-bpmn-infra/templates/service.yaml +++ b/kubernetes/so/charts/so-bpmn-infra/templates/service.yaml @@ -26,8 +26,11 @@ spec: ports: {{if eq .Values.service.type "NodePort" -}} - port: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }} name: {{ .Values.service.portName }} + - port: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.portName2 }} {{- else -}} - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/so/charts/so-bpmn-infra/values.yaml b/kubernetes/so/charts/so-bpmn-infra/values.yaml index 047179eb1b..1cb73e662f 100755 --- a/kubernetes/so/charts/so-bpmn-infra/values.yaml +++ b/kubernetes/so/charts/so-bpmn-infra/values.yaml @@ -26,8 +26,8 @@ global: ################################################################# # Application configuration defaults. ################################################################# -repository: nexus3.onap.org:10001 -image: onap/so/bpmn-infra:1.3.6 +repository: oomk8s +image: sbn-oaz:latest pullPolicy: Always replicaCount: 1 @@ -36,10 +36,14 @@ containerPort: 8081 logPath: ./logs/bpmn/ app: so-bpmn-infra service: - type: ClusterIP + type: NodePort internalPort: 8081 externalPort: 8081 + nodePort: "04" portName: so-bpmn-port + internalPort2: 5005 + nodePort2: "05" + portName2: so-bpmn-debug updateStrategy: type: RollingUpdate maxUnavailable: 1 diff --git a/kubernetes/so/charts/so-catalog-db-adapter/values.yaml b/kubernetes/so/charts/so-catalog-db-adapter/values.yaml index e294ee406c..ce630510e8 100755 --- a/kubernetes/so/charts/so-catalog-db-adapter/values.yaml +++ b/kubernetes/so/charts/so-catalog-db-adapter/values.yaml @@ -17,7 +17,7 @@ global: nodePortPrefix: 302 nodePortPrefixExt: 304 - repository: nexus3.onap.org:10001 + repository: oomk8s readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 persistence: @@ -26,8 +26,8 @@ global: ################################################################# # Application configuration defaults. ################################################################# -repository: nexus3.onap.org:10001 -image: onap/so/catalog-db-adapter:1.3.6 +repository: oomk8s +image: cda-oaz:latest pullPolicy: Always replicaCount: 1 diff --git a/kubernetes/so/charts/so-multivim-adapter/Chart.yaml b/kubernetes/so/charts/so-multivim-adapter/Chart.yaml new file mode 100755 index 0000000000..82ffec2b8b --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2018 AT&T USA +# +# 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 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: so-multivim-adapter +version: 3.0.0 \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_key_mapping.json b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_key_mapping.json new file mode 100644 index 0000000000..064579270d --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_key_mapping.json @@ -0,0 +1,25 @@ +{ + "image_name":"vm_image_offer", + "flavor_name":"vm_size", + "public_net_id":"azure_virtual_network_name", + "unprotected_private_subnet_id":"azure_virtual_unprotected_subnet_name", + "protected_private_subnet_id":"azure_virtual_protected_subnet_name", + "onap_private_subnet_id":"azure_virtual_private_subnet_name", + "unprotected_private_net_cidr":"azure_virtual_unprotected_network_cidr", + "protected_private_net_cidr":"azure_virtual_protected_network_cidr", + "onap_private_net_cidr":"azure_virtual_private_network_cidr", + "vfw_private_ip_0":"vfw_unprotected_private_ip", + "vfw_private_ip_1":"vfw_protected_private_ip", + "vfw_name_0":"fw_vm_name", + "vsn_name_0":"sinc_vm_name", + "pub_key":"vm_public_key_data", + "vpg_name_0":"pg_vm_name", + "vlb_image_name":"vm_image_offer", + "vlb_flavor_name":"vm_size", + "vlb_private_net_id":"azure_virtual_vlb_vdns_subnet_name", + "pktgen_private_net_id":"azure_virtual_vpg_vlb_subnet_name", + "vlb_private_net_cidr":"azure_virtual_vlb_vdns_network_cidr", + "pktgen_private_net_cidr":"azure_virtual_vpg_vlb_network_cidr", + "vlb_name_0":"lb_vm_name", + "vdns_name_0":"dns_vm_name" +} \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_value_mapping.json b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_value_mapping.json new file mode 100644 index 0000000000..a5d0cf4110 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/azure_value_mapping.json @@ -0,0 +1,4 @@ +{ + "ubuntu16-ecomp.qcow2":"UbuntuServer", + "m1.medium":"Standard_D2" +} \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/override.yaml b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/override.yaml new file mode 100755 index 0000000000..38c72792f1 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/resources/config/overrides/override.yaml @@ -0,0 +1,97 @@ +# Copyright © 2018 AT&T USA +# +# 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. +server: + port: {{ index .Values.containerPort }} + tomcat: + max-threads: 50 +spring: + datasource: + url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb + username: ${DB_ADMIN_USERNAME} + password: ${DB_ADMIN_PASSWORD} + driver-class-name: org.mariadb.jdbc.Driver + dbcp2: + initial-size: 5 + max-total: 20 + validation-query: select 1 + test-on-borrow: true + jpa: + show-sql: true + hibernate: + dialect: org.hibernate.dialect.MySQL5Dialect + ddl-auto: validate + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + jackson: + serialization: + fail-on-empty-beans: false + security: + usercredentials: + - + username: sdnc + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: SDNC-Client + - + username: sitecontrol + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: SiteControl-Client + - + username: bpel + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPEL-Client + - + username: sniro + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: SNIRO-Client + - + username: apih + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: MSO-Client + - + username: mso_admin + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: ACTUATOR +mso: + logPath: ./logs/multivim + site-name: multivimEnv + async: + core-pool-size: 50 + max-pool-size: 50 + queue-capacity: 500 + db: + auth: Basic YnBlbDpwYXNzd29yZDEk + +#Actuator +management: + context-path: /manage + +#MultiVim +org: + onap: + so: + adapters: + multivim: + csarDirPath: /app/ASDC/ + msb: + endpoint: + url: http://msb-iag:80/api/multicloud-azure/v1 + create: + pollInterval: 15 + pollTimeout: 30 + bpelauth: A7FC9B308B7AF7A269072BA729A345625E0381E3071DE7EE50603677CB69C515 + sockettimeout: 30 + connecttimeout: 30 + retrycount: 5 + retryinterval: 15 + retrylist: 408,429,500,502,503,504,900 \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/templates/configmap.yaml b/kubernetes/so/charts/so-multivim-adapter/templates/configmap.yaml new file mode 100755 index 0000000000..b94f35f553 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/templates/configmap.yaml @@ -0,0 +1,39 @@ +# Copyright © 2018 AT&T USA +# +# 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 +data: + LOG_PATH: {{ index .Values.logPath }} + APP: {{ index .Values.app }} +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-app-configmap + 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/overrides/*").AsConfig . | indent 2 }} diff --git a/kubernetes/so/charts/so-multivim-adapter/templates/deployment.yaml b/kubernetes/so/charts/so-multivim-adapter/templates/deployment.yaml new file mode 100755 index 0000000000..c7e74eba54 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/templates/deployment.yaml @@ -0,0 +1,130 @@ +# Copyright © 2018 AT&T USA +# +# 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.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} +spec: + replicas: {{ index .Values.replicaCount }} + minReadySeconds: {{ index .Values.minReadySeconds }} + strategy: + type: {{ index .Values.updateStrategy.type }} + rollingUpdate: + maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }} + maxSurge: {{ index .Values.updateStrategy.maxSurge }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.mariadb.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ .Values.repository }}/{{ .Values.image }}" + resources: +{{ include "common.resources" . | indent 12 }} + env: + - name: DB_HOST + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.readwrite.host + - name: DB_PORT + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.readwrite.port + - name: DB_USERNAME + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.readwrite.rolename + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.readwrite.password + - name: DB_ADMIN_USERNAME + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.admin.rolename + - name: DB_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Release.Name}}-so-db-secrets + key: mariadb.admin.password + - name: JVM_ARGS + value: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address={{ .Values.service.internalPort2 }} -Dso.config.path=/app/config/ + envFrom: + - configMapRef: + name: {{ include "common.fullname" . }}-configmap + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - name: logs + mountPath: /app/logs + - name: config + mountPath: /app/config + readOnly: true + - name: asdc-data + mountPath: /app/ASDC + livenessProbe: + httpGet: + path: {{- index .Values.livenessProbe.path|indent 2}} + port: {{ index .Values.containerPort }} + scheme: {{- index .Values.livenessProbe.scheme| indent 2}} + initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}} + periodSeconds: {{ index .Values.livenessProbe.periodSeconds}} + timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}} + successThreshold: {{ index .Values.livenessProbe.successThreshold}} + failureThreshold: {{ index .Values.livenessProbe.failureThreshold}} + ports: + - containerPort: {{ index .Values.containerPort }} + name: {{ .Values.service.portName }} + protocol: TCP + volumes: + - name: logs + emptyDir: {} + - name: config + configMap: + name: {{ include "common.fullname" . }}-app-configmap + - name: asdc-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/so/charts/so-multivim-adapter/templates/pv.yaml b/kubernetes/so/charts/so-multivim-adapter/templates/pv.yaml new file mode 100755 index 0000000000..d1e1b04121 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/templates/pv.yaml @@ -0,0 +1,36 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +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 }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- end -}} \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/templates/pvc.yaml b/kubernetes/so/charts/so-multivim-adapter/templates/pvc.yaml new file mode 100755 index 0000000000..74ba690fa6 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/templates/pvc.yaml @@ -0,0 +1,47 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + name: {{ include "common.fullname" . }} + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} \ No newline at end of file diff --git a/kubernetes/so/charts/so-multivim-adapter/templates/service.yaml b/kubernetes/so/charts/so-multivim-adapter/templates/service.yaml new file mode 100755 index 0000000000..bf423c6fab --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2018 AT&T USA +# +# 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.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + - port: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.portName2 }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/so/charts/so-multivim-adapter/values.yaml b/kubernetes/so/charts/so-multivim-adapter/values.yaml new file mode 100755 index 0000000000..ddbf719309 --- /dev/null +++ b/kubernetes/so/charts/so-multivim-adapter/values.yaml @@ -0,0 +1,105 @@ +# Copyright © 2018 AT&T USA +# +# 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: + nodePortPrefix: 302 + nodePortPrefixExt: 304 + repository: nexus3.onap.org:10001 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + persistence: + mountPath: /dockerdata-nfs + +################################################################# +# Application configuration defaults. +################################################################# +image: mva-oaz:latest +pullPolicy: Always +repository: oomk8s + +replicaCount: 1 +minReadySeconds: 10 +containerPort: 8088 +logPath: ./logs/multivim/ +app: multivim-adapter +## Persist data to a persitent volume +persistence: + enabled: true + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + volumeReclaimPolicy: Retain + ## database data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + accessMode: ReadWriteMany + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: mso/asdc/data +service: + type: NodePort + internalPort: 8088 + externalPort: 8088 + nodePort: "06" + portName: so-mvim-port + internalPort2: 5005 + nodePort2: "07" + portName2: so-mvim-debug +updateStrategy: + type: RollingUpdate + maxUnavailable: 1 + maxSurge: 1 +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + memory: 4Gi + cpu: 2000m + requests: + memory: 1Gi + cpu: 500m + large: + limits: + memory: 8Gi + cpu: 4000m + requests: + memory: 2Gi + cpu: 1000m + unlimited: {} +livenessProbe: + path: /manage/health + port: 8088 + scheme: HTTP + initialDelaySeconds: 600 + periodSeconds: 60 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 +mariadb: + nameOverride: so-mariadb +ingress: + enabled: false +nodeSelector: {} +tolerations: [] +affinity: {} diff --git a/kubernetes/so/charts/so-sdc-controller/templates/deployment.yaml b/kubernetes/so/charts/so-sdc-controller/templates/deployment.yaml index ad3a19f37e..4583bfcd75 100755 --- a/kubernetes/so/charts/so-sdc-controller/templates/deployment.yaml +++ b/kubernetes/so/charts/so-sdc-controller/templates/deployment.yaml @@ -95,6 +95,8 @@ spec: - name: config mountPath: /app/config readOnly: true + - name: asdc-data + mountPath: /app/ASDC livenessProbe: httpGet: path: {{- index .Values.livenessProbe.path|indent 2}} @@ -115,5 +117,12 @@ spec: - name: config configMap: name: {{ include "common.fullname" . }}-app-configmap + - name: asdc-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/so/charts/so-sdc-controller/templates/pv.yaml b/kubernetes/so/charts/so-sdc-controller/templates/pv.yaml new file mode 100755 index 0000000000..d1e1b04121 --- /dev/null +++ b/kubernetes/so/charts/so-sdc-controller/templates/pv.yaml @@ -0,0 +1,36 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +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 }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- end -}} \ No newline at end of file diff --git a/kubernetes/so/charts/so-sdc-controller/templates/pvc.yaml b/kubernetes/so/charts/so-sdc-controller/templates/pvc.yaml new file mode 100755 index 0000000000..74ba690fa6 --- /dev/null +++ b/kubernetes/so/charts/so-sdc-controller/templates/pvc.yaml @@ -0,0 +1,47 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + name: {{ include "common.fullname" . }} + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} \ No newline at end of file diff --git a/kubernetes/so/charts/so-sdc-controller/values.yaml b/kubernetes/so/charts/so-sdc-controller/values.yaml index 81c2b3f953..ecf0416645 100755 --- a/kubernetes/so/charts/so-sdc-controller/values.yaml +++ b/kubernetes/so/charts/so-sdc-controller/values.yaml @@ -35,6 +35,26 @@ minReadySeconds: 10 containerPort: 8085 logPath: ./logs/sdc/ app: sdc-controller +## Persist data to a persitent volume +persistence: + enabled: true + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + volumeReclaimPolicy: Retain + ## database data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + accessMode: ReadWriteMany + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: mso/asdc/data service: type: ClusterIP internalPort: 8085 -- cgit 1.2.3-korg