summaryrefslogtreecommitdiffstats
path: root/kubernetes/modeling/charts/modeling-etsicatalog
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/modeling/charts/modeling-etsicatalog')
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml21
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml25
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml4
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml2
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml15
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml4
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/values.yaml34
7 files changed, 86 insertions, 19 deletions
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml
new file mode 100644
index 0000000000..c777feeaa2
--- /dev/null
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml
@@ -0,0 +1,21 @@
+# Copyright © 2020 Samung Electronics
+#
+# 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: ~5.x-0
+ repository: '@local'
+ - name: mariadb-galera
+ version: ~5.x-0
+ repository: '@local'
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml
index 08d5e139b1..fb31b8b65e 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml
@@ -20,7 +20,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
@@ -28,7 +28,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
annotations:
sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
spec:
@@ -49,6 +49,11 @@ spec:
name: {{ include "common.name" . }}-readiness
containers:
- name: {{ include "common.name" . }}
+ command:
+ - bash
+ args:
+ - -c
+ - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ports:
@@ -68,14 +73,12 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
env:
- - name: MSB_ADDR
- value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
- - name: MYSQL_ADDR
- value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
- - name: MYSQL_AUTH
- value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
- - name: REDIS_ADDR
- value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
+ - name: MSB_ADDR
+ value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+ - name: MYSQL_ADDR
+ value: {{ (index .Values "mariadb-galera" "service" "name") }}:{{ (index .Values "mariadb-galera" "service" "internalPort") }}
+ - name: MYSQL_ROOT_PASSWORD
+ {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 12}}
volumeMounts:
- name: {{ include "common.fullname" . }}-etsicatalog
mountPath: /service/modeling/etsicatalog/static
@@ -130,7 +133,7 @@ spec:
- name: {{ include "common.fullname" . }}-filebeat-conf
configMap:
- name: {{ .Release.Name }}-modeling-filebeat-configmap
+ name: {{ include "common.release" . }}-modeling-filebeat-configmap
- name: {{ include "common.fullname" . }}-data-filebeat
emptyDir: {}
imagePullSecrets:
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml
index 68696fbccd..d672025068 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml
@@ -23,7 +23,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- release: "{{ .Release.Name }}"
+ release: "{{ include "common.release" . }}"
heritage: "{{ .Release.Service }}"
name: {{ include "common.fullname" . }}
spec:
@@ -34,6 +34,6 @@ spec:
persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
storageClassName: "{{ include "common.fullname" . }}-data"
hostPath:
- path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath }}
{{- end -}}
{{- end -}}
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml
index d3d5d9e0a4..e04a0b3ed3 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml
@@ -22,7 +22,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ .Release.Name }}"
+ release: "{{ include "common.release" . }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.persistence.annotations }}
annotations:
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml
new file mode 100644
index 0000000000..d053c484be
--- /dev/null
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# 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.
+
+{{ include "common.secret" . }}
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml
index 7f0a3ad15c..c4aad67beb 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml
@@ -20,7 +20,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
annotations:
msb.onap.org/service-info: '[
@@ -72,4 +72,4 @@ spec:
{{- end}}
selector:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml
index 3217389755..05f73e841c 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml
+++ b/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml
@@ -22,6 +22,37 @@ global:
loggingRepository: docker.elastic.co
loggingImage: beats/filebeat:5.5.0
+ config:
+ msbServiceName: msb-iag
+ msbPort: 80
+
+ persistence:
+ mountPath: /dockerdata-nfs
+
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+ - uid: "db-root-pass"
+ externalSecret: '{{- include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" (index .Values "mariadb-galera" "nameOverride")) }}'
+ type: password
+
+#################################################################
+# Dependencies configuration
+#################################################################
+
+mariadb-galera:
+ nameOverride: modeling-mariadb
+ service:
+ name: modeling-db
+ portName: modeling-db
+ internalPort: 3306
+ nfsprovisionerPrefix: modeling
+ persistence:
+ mountSubPath: modeling/data
+ enabled: true
+ disableNfsProvisioner: true
+
#################################################################
# Application configuration defaults.
#################################################################
@@ -38,9 +69,6 @@ istioSidecar: true
# flag to enable debugging - application support required
debugEnabled: false
-# application configuration
-config: {}
-
# default number of instances
replicaCount: 1