diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-01-31 14:26:54 +0100 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-02-01 00:10:01 +0100 |
commit | 43893f5e389b648063d88977ae5fba9364df85c3 (patch) | |
tree | f766f073da8b4a68042727667c42139b70ac38d5 /kubernetes/modeling | |
parent | e74ed5cd24df70e1e9b137eadf8e32d5c89f236b (diff) |
[Modeling] Move mariadb-galera to etsicatalog
etsicatalog is the only component inside modeling which use this DB
thus there is no point to keep it outside of this component.
Passwords and other bad stuff is left intentionally as this is just a
first patch for this transition.
Issue-ID: OOM-2286
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Change-Id: I4f592b736a86c7acf9ee43b0f6e136e5f1506847
Diffstat (limited to 'kubernetes/modeling')
-rw-r--r-- | kubernetes/modeling/Makefile | 21 | ||||
-rw-r--r-- | kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml | 21 | ||||
-rw-r--r-- | kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml | 4 | ||||
-rw-r--r-- | kubernetes/modeling/charts/modeling-etsicatalog/values.yaml | 31 | ||||
-rw-r--r-- | kubernetes/modeling/requirements.yaml | 3 | ||||
-rw-r--r-- | kubernetes/modeling/values.yaml | 33 |
6 files changed, 74 insertions, 39 deletions
diff --git a/kubernetes/modeling/Makefile b/kubernetes/modeling/Makefile new file mode 100644 index 0000000000..82f7cf43d0 --- /dev/null +++ b/kubernetes/modeling/Makefile @@ -0,0 +1,21 @@ +# Copyright © 2020 Samsung Electrinics +# +# 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. + +make-modeling: make-modeling-etsicatalog + +make-modeling-etsicatalog: + cd charts && helm dep up modeling-etsicatalog && helm lint modeling-etsicatalog +clean: + @find . -type f -name '*.tgz' -delete + @find . -type f -name '*.lock' -delete 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 b3bf3e8d5f..d8790e7d5b 100644 --- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml +++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml @@ -71,9 +71,9 @@ spec: - name: MSB_ADDR value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}" - name: MYSQL_ADDR - value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}" + value: "{{ .Values.config.dbServiceName }}:{{ .Values.config.dbPort }}" - name: MYSQL_AUTH - value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}" + value: "{{ .Values.config.dbUser }}:{{ index .Values "mariadb-galera" "config" "mariadbRootPassword" }}" - name: REDIS_ADDR value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}" volumeMounts: diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml index 3217389755..2244d5f3d9 100644 --- a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml +++ b/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml @@ -22,6 +22,32 @@ global: loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 + config: + msbServiceName: msb-iag + msbPort: 80 + redisServiceName: vfc-redis + redisPort: 6379 + + persistence: + mountPath: /dockerdata-nfs + +################################################################# +# Dependencies configuration +################################################################# + +mariadb-galera: + config: + mariadbRootPassword: secretpassword + nameOverride: modeling-mariadb + service: + name: modeling-db + portName: modeling-db + nfsprovisionerPrefix: modeling + persistence: + mountSubPath: modeling/data + enabled: true + disableNfsProvisioner: true + ################################################################# # Application configuration defaults. ################################################################# @@ -39,7 +65,10 @@ istioSidecar: true debugEnabled: false # application configuration -config: {} +config: + dbServiceName: modeling-db + dbPort: 3306 + dbUser: root # default number of instances replicaCount: 1 diff --git a/kubernetes/modeling/requirements.yaml b/kubernetes/modeling/requirements.yaml index c2c445c4e5..79d7de4dd3 100644 --- a/kubernetes/modeling/requirements.yaml +++ b/kubernetes/modeling/requirements.yaml @@ -16,6 +16,3 @@ dependencies: - name: common version: ~5.x-0 repository: '@local' - - name: mariadb-galera - version: ~5.x-0 - repository: '@local' diff --git a/kubernetes/modeling/values.yaml b/kubernetes/modeling/values.yaml index 6fb407c933..0a1aec01cc 100644 --- a/kubernetes/modeling/values.yaml +++ b/kubernetes/modeling/values.yaml @@ -13,15 +13,6 @@ # limitations under the License. global: - config: - msbServiceName: msb-iag - msbPort: 80 - dbServiceName: modeling-db - dbPort: 3306 - dbUser: root - mariadbRootPassword: secretpassword - redisServiceName: vfc-redis - redisPort: 6379 persistence: mountPath: /dockerdata-nfs @@ -29,27 +20,3 @@ global: config: logstashServiceName: log-ls logstashPort: 5044 - -mariadb-galera: - nameOverride: modeling-mariadb - service: - name: modeling-db - portName: modeling-db - nfsprovisionerPrefix: modeling - persistence: - mountSubPath: modeling/data - enabled: true - disableNfsProvisioner: true - -######################################### -# by duan -#catalog: -# config: -# dbPodName: modeling-db -# dbServiceName: modeling-db -modeling: - config: - dbPodName: modeling-db - dbServiceName: modeling-db - -######################################### |