diff options
Diffstat (limited to 'kubernetes/portal')
19 files changed, 173 insertions, 41 deletions
diff --git a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/music.properties b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/music.properties index 95ece9e912..3fada2e063 100644 --- a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/music.properties +++ b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/music.properties @@ -13,7 +13,7 @@ music.serialize.compress = true #By default it's eventual music.atomic.get = false music.atomic.put = true -cassandra.host={{.Values.cassandra.service.name}}.{{.Release.Namespace}} -zookeeper.host={{.Values.zookeeper.service.name}}.{{.Release.Namespace}} +cassandra.host={{.Release.Name}}-{{.Values.cassandra.chart.name}}.{{.Release.Namespace}} +zookeeper.host={{.Release.Name}}-{{.Values.zookeeper.chart.name}}.{{.Release.Namespace}} cassandra.user={{.Values.cassandra.config.cassandraUsername}} cassandra.password={{.Values.cassandra.config.cassandraPassword}}
\ No newline at end of file diff --git a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/portal.properties b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/portal.properties index 1ef1febfcc..0e3381c61a 100755 --- a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/portal.properties +++ b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/portal.properties @@ -16,9 +16,14 @@ ueb_app_key = 7GkVcrO6sIDb3ngW ueb_app_secret = uCYgKjWKK5IxPGNNZzYSSWo9 ueb_app_mailbox_name = ECOMP-PORTAL-INBOX -ueb_url_list = dmaap.{{.Release.Namespace}} +ueb_url_list = {{.Values.messageRouter.chart.name}}.{{.Release.Namespace}} ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX # Consumer group name for UEB topic. # Use the special tag to generate a unique one for each sdk-app server. ueb_app_consumer_group_name = {UUID} + +role_access_centralized = remote + +ext_req_connection_timeout = 15000 +ext_req_read_timeout = 20000 diff --git a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties index a11ffa04d2..765ba02b57 100755 --- a/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties +++ b/kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties @@ -1,6 +1,6 @@ #mysql db.driver = org.mariadb.jdbc.Driver -db.connectionURL = jdbc:mariadb:failover://{{.Values.mariadb.service.name}}.{{.Release.Namespace}}:3306/portal +db.connectionURL = jdbc:mariadb:failover://{{.Release.Name}}-{{.Values.mariadb.chart.name}}.{{.Release.Namespace}}:3306/portal db.userName =root db.password =Aa123456 db.hib.dialect = org.hibernate.dialect.MySQLDialect @@ -82,7 +82,7 @@ notification_update_duration = 900 #Microservices Related Properties for Portal microservices.widget.protocol = http -microservices.widget.hostname = {{.Values.widget.service.name}}.{{.Release.Namespace}} +microservices.widget.hostname = {{.Release.Name}}-{{.Values.widget.chart.name}}.{{.Release.Namespace}} microservices.widget.username = widget_user microservices.widget.password = M+KcrCMVrR1rAxtiFE49n1uXC3FCkNBqFgeYsubEC/U= #This property won't be needed after consul is functional on VMs - diff --git a/kubernetes/portal/charts/portal-app/values.yaml b/kubernetes/portal/charts/portal-app/values.yaml index 75fa67b2af..ef925003b2 100644 --- a/kubernetes/portal/charts/portal-app/values.yaml +++ b/kubernetes/portal/charts/portal-app/values.yaml @@ -67,23 +67,23 @@ service: nodePort3: 14 mariadb: - nameOverride: portal-db - service: + chart: name: portal-db widget: - service: + chart: name: portal-widget - cassandra: - service: + chart: name: portal-cassandra config: cassandraUsername: root cassandraPassword: Aa123456 - zookeeper: - service: - name: portal-zk + chart: + name: portal-zookeeper +messageRouter: + chart: + name: message-router ingress: enabled: false diff --git a/kubernetes/portal/charts/portal-cassandra/templates/pv.yaml b/kubernetes/portal/charts/portal-cassandra/templates/pv.yaml new file mode 100644 index 0000000000..184728f8ad --- /dev/null +++ b/kubernetes/portal/charts/portal-cassandra/templates/pv.yaml @@ -0,0 +1,37 @@ +{{/* +# 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 -}} diff --git a/kubernetes/portal/charts/portal-cassandra/templates/pvc.yaml b/kubernetes/portal/charts/portal-cassandra/templates/pvc.yaml new file mode 100644 index 0000000000..e27c3311e9 --- /dev/null +++ b/kubernetes/portal/charts/portal-cassandra/templates/pvc.yaml @@ -0,0 +1,48 @@ +{{/* +# 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 -}} diff --git a/kubernetes/portal/charts/portal-cassandra/values.yaml b/kubernetes/portal/charts/portal-cassandra/values.yaml index 530fdfa6d9..f66b848274 100644 --- a/kubernetes/portal/charts/portal-cassandra/values.yaml +++ b/kubernetes/portal/charts/portal-cassandra/values.yaml @@ -50,6 +50,29 @@ readiness: initialDelaySeconds: 10 periodSeconds: 10 +## 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: <storageClass> + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + accessMode: ReadWriteMany + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: portal/cassandra/data + service: type: ClusterIP name: portal-cassandra diff --git a/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml b/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml index 4d58e43b28..bdb760d24d 100644 --- a/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml @@ -52,7 +52,7 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} env: - name: MYSQL_HOST - value: "{{ .Values.service.name }}" + value: "{{ include "common.fullname" . }}" - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: diff --git a/kubernetes/portal/charts/portal-mariadb/templates/job.yaml b/kubernetes/portal/charts/portal-mariadb/templates/job.yaml index 75d5bb0874..5dad1c0002 100644 --- a/kubernetes/portal/charts/portal-mariadb/templates/job.yaml +++ b/kubernetes/portal/charts/portal-mariadb/templates/job.yaml @@ -32,7 +32,7 @@ spec: restartPolicy: Never initContainers: - name: {{ include "common.name" . }}-init-readiness - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: "{{ .Values.global.readinessRepository }}/{{ .Values.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /root/ready.py @@ -47,11 +47,11 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }}-job - image: "{{ .Values.global.repository | default .Values.dockerHubRepository }}/{{ .Values.mariadbInitImage }}" + image: "{{ .Values.global.readinessRepository }}/{{ .Values.mariadbInitImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: DB_HOST - value: "{{ .Release.Name }}-{{ .Values.service.name }}" + value: "{{ include "common.fullname" . }}" - name: DB_USER value: {{ .Values.config.mariadbUser }} - name: DB_PASS @@ -60,11 +60,11 @@ spec: - name: SQL_SRC_DIR value: {{ .Values.config.sqlSourceDirectory }} - name: {{ include "common.name" . }}-oom-update-job - image: "{{ .Values.global.repository | default .Values.dockerHubRepository }}/{{ .Values.mariadbInitImage }}" + image: "{{ .Values.global.readinessRepository }}/{{ .Values.mariadbInitImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: DB_HOST - value: "{{ .Release.Name }}-{{ .Values.service.name }}" + value: "{{ include "common.fullname" . }}" - name: DB_USER value: {{ .Values.config.mariadbUser }} - name: DB_PORT diff --git a/kubernetes/portal/charts/portal-mariadb/values.yaml b/kubernetes/portal/charts/portal-mariadb/values.yaml index 54267fe2e8..c232e4ca4a 100644 --- a/kubernetes/portal/charts/portal-mariadb/values.yaml +++ b/kubernetes/portal/charts/portal-mariadb/values.yaml @@ -19,6 +19,7 @@ global: # global defaults nodePortPrefix: 302 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== persistence: {} + readinessRepository: oomk8s # application image @@ -26,9 +27,8 @@ repository: nexus3.onap.org:10001 image: onap/portal-db:2.1-STAGING-latest pullPolicy: Always -#mariadbInitImage: oomk8s/flyway:1.0 -dockerhubRepository: registry.hub.docker.com -mariadbInitImage: oomk8s/mariadb-client-init:2.0.0 +readinessImage: "readiness-check:1.1.1" +mariadbInitImage: "mariadb-client-init:2.0.0" # application configuration config: diff --git a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/music.properties b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/music.properties index 742b5ea328..59d438a669 100644 --- a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/music.properties +++ b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/music.properties @@ -14,7 +14,7 @@ music.serialize.compress = true music.atomic.get = false music.atomic.put = true -cassandra.host={{.Values.cassandra.service.name}}.{{.Release.Namespace}} -zookeeper.host={{.Values.zookeeper.service.name}}.{{.Release.Namespace}} +cassandra.host={{.Release.Name}}-{{.Values.cassandra.chart.name}}.{{.Release.Namespace}} +zookeeper.host={{.Release.Name}}-{{.Values.zookeeper.chart.name}}.{{.Release.Namespace}} cassandra.user={{.Values.cassandra.config.cassandraUsername}} cassandra.password={{.Values.cassandra.config.cassandraPassword}}
\ No newline at end of file diff --git a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/portal.properties b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/portal.properties index 32dd1f9c2a..4b6f251e8b 100755 --- a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/portal.properties +++ b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/portal.properties @@ -30,7 +30,7 @@ ecomp_rest_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi ueb_listeners_enable = false # UEB Configuration -ueb_url_list = dmaap.{{.Release.Namespace}} +ueb_url_list = {{.Values.messageRouter.chart.name}}.{{.Release.Namespace}} # ECOMP Portal listens on this UEB topic ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX # Replace these 3 default values with the ones for your specific App, diff --git a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/system.properties b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/system.properties index 6b8e685fcd..6fbf5b750e 100755 --- a/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/system.properties +++ b/kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/system.properties @@ -24,7 +24,7 @@ decryption_key = AGLDdG4D04BKm2IxIWEr8o== ########################################################################## db.driver = org.mariadb.jdbc.Driver -db.connectionURL = jdbc:mariadb://{{.Values.mariadb.service.name}}.{{.Release.Namespace}}:3306/ecomp_sdk +db.connectionURL = jdbc:mariadb://{{.Release.Name}}-{{.Values.mariadb.chart.name}}.{{.Release.Namespace}}:3306/ecomp_sdk db.userName = root db.password = Aa123456 db.min_pool_size = 5 diff --git a/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml b/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml index 09f2e45a25..1c94c78bb4 100644 --- a/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml @@ -38,7 +38,7 @@ spec: - /root/ready.py args: - --container-name - - {{ .Values.mariadb.nameOverride }} + - {{ .Values.mariadb.chart.name }} env: - name: NAMESPACE valueFrom: diff --git a/kubernetes/portal/charts/portal-sdk/values.yaml b/kubernetes/portal/charts/portal-sdk/values.yaml index e4556fa31c..010b4c11bd 100644 --- a/kubernetes/portal/charts/portal-sdk/values.yaml +++ b/kubernetes/portal/charts/portal-sdk/values.yaml @@ -60,21 +60,23 @@ service: internalPort: 8080 mariadb: - nameOverride: portal-db - service: + chart: name: portal-db - +widget: + chart: + name: portal-widget cassandra: - service: + chart: name: portal-cassandra config: cassandraUsername: root cassandraPassword: Aa123456 - zookeeper: - service: - name: portal-zk - + chart: + name: portal-zookeeper +messageRouter: + chart: + name: message-router ingress: enabled: false diff --git a/kubernetes/portal/charts/portal-widget/resources/config/deliveries/properties/ONAPWIDGETMS/application.properties b/kubernetes/portal/charts/portal-widget/resources/config/deliveries/properties/ONAPWIDGETMS/application.properties index 3f4f950a58..b7a20734c6 100644 --- a/kubernetes/portal/charts/portal-widget/resources/config/deliveries/properties/ONAPWIDGETMS/application.properties +++ b/kubernetes/portal/charts/portal-widget/resources/config/deliveries/properties/ONAPWIDGETMS/application.properties @@ -6,7 +6,7 @@ spring.http.multipart.max-request-size=128MB microservice.widget.location=/tmp ## App DB Properties -spring.datasource.url=jdbc:mysql://{{.Values.mariadb.service.name}}.{{include "common.namespace" .}}:3306/portal +spring.datasource.url=jdbc:mysql://{{.Release.Name}}-{{.Values.mariadb.chart.name}}.{{include "common.namespace" .}}:3306/portal spring.datasource.username=root spring.datasource.password=Aa123456 spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect diff --git a/kubernetes/portal/charts/portal-widget/templates/deployment.yaml b/kubernetes/portal/charts/portal-widget/templates/deployment.yaml index 0fb3c10384..bff7924e29 100644 --- a/kubernetes/portal/charts/portal-widget/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-widget/templates/deployment.yaml @@ -38,7 +38,7 @@ spec: - /root/ready.py args: - --container-name - - {{ .Values.mariadb.nameOverride }} + - {{ .Values.mariadb.chart.name }} env: - name: NAMESPACE valueFrom: diff --git a/kubernetes/portal/charts/portal-widget/values.yaml b/kubernetes/portal/charts/portal-widget/values.yaml index 3969dc8c2b..706dc2f74f 100644 --- a/kubernetes/portal/charts/portal-widget/values.yaml +++ b/kubernetes/portal/charts/portal-widget/values.yaml @@ -55,8 +55,7 @@ readiness: periodSeconds: 10 mariadb: - nameOverride: portal-db - service: + chart: name: portal-db service: diff --git a/kubernetes/portal/values.yaml b/kubernetes/portal/values.yaml index 5ec23e10d1..e22b3f9669 100644 --- a/kubernetes/portal/values.yaml +++ b/kubernetes/portal/values.yaml @@ -21,5 +21,23 @@ config: portal-mariadb: nameOverride: portal-db - service: - name: portal-db
\ No newline at end of file + +mariadb: + chart: + name: portal-db +widget: + chart: + name: portal-widget +cassandra: + chart: + name: portal-cassandra + config: + cassandraUsername: root + cassandraPassword: Aa123456 +zookeeper: + chart: + name: portal-zookeeper + +messageRouter: + chart: + name: message-router
\ No newline at end of file |