summaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/charts
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-02-10 14:52:49 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-10 14:52:49 +0000
commit9e18bcba2b6dc5b4b4f4fa38671d0d2fdb6f1602 (patch)
treed15aeb13b67d44992ac22efc951772fe056f8ab2 /kubernetes/dmaap/charts
parent8719c9de7b732ce4c9249d42adc0f33e2365a4fb (diff)
parent01b0408764cee1a6e8488ec453c63a5965be4fe0 (diff)
Merge "dmaap datarouter common mariadb-galera chart"
Diffstat (limited to 'kubernetes/dmaap/charts')
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/.helmignore21
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/Chart.yaml18
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/conf.d/mariadb1.cnf193
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/docker-entrypoint-initdb.d/sql_init_01.sql144
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/NOTES.txt33
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/configmap.yaml39
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/deployment.yaml107
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pv.yaml37
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pvc.yaml48
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/secrets.yaml28
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/service.yaml38
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/values.yaml80
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/resources/config/provserver.properties2
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/templates/deployment.yaml2
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/requirements.yaml4
-rw-r--r--kubernetes/dmaap/charts/dmaap-data-router/values.yaml38
16 files changed, 31 insertions, 801 deletions
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/.helmignore b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/.helmignore
deleted file mode 100644
index f0c1319444..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/.helmignore
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/Chart.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/Chart.yaml
deleted file mode 100644
index 9e4a05d3b8..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/Chart.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-apiVersion: v1
-description: DMaaP Data Router MariaDB Instance
-name: dmaap-dr-db
-version: 1.0
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/conf.d/mariadb1.cnf b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/conf.d/mariadb1.cnf
deleted file mode 100644
index ff2c63740b..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/conf.d/mariadb1.cnf
+++ /dev/null
@@ -1,193 +0,0 @@
-# Example MySQL config file for medium systems.
-#
-# This is for a system with memory 8G where MySQL plays
-# an important part, or systems up to 128M where MySQL is used together with
-# other programs (such as a web server)
-#
-# In this file, you can use all long options that a program supports.
-# If you want to know which options a program supports, run the program
-# with the "--help" option.
-
-# The following options will be passed to all MySQL clients
-##[client]
-##user = root
-##port = 3306
-##socket = //opt/app/mysql/mysql.sock
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-##performance_schema
-
-slow_query_log =ON
-long_query_time =2
-slow_query_log_file =//var/lib/mysql/slow_query.log
-
-skip-external-locking
-explicit_defaults_for_timestamp = true
-skip-symbolic-links
-local-infile = 0
-key_buffer_size = 16M
-max_allowed_packet = 4M
-table_open_cache = 100
-sort_buffer_size = 512K
-net_buffer_length = 8K
-read_buffer_size = 256K
-read_rnd_buffer_size = 512K
-myisam_sort_buffer_size = 8M
-max_connections = 300
-lower_case_table_names = 1
-thread_stack = 256K
-thread_cache_size = 25
-query_cache_size = 8M
-query_cache_type = 0
-query_prealloc_size = 512K
-query_cache_limit = 1M
-
-# Password validation
-##plugin-load-add=simple_password_check.so
-##simple_password_check_other_characters=0
-
-# Audit Log settings
-plugin-load-add=server_audit.so
-server_audit=FORCE_PLUS_PERMANENT
-server_audit_file_path=//var/lib/mysql/audit.log
-server_audit_file_rotate_size=50M
-server_audit_events=CONNECT,QUERY,TABLE
-server_audit_logging=on
-
-# Don't listen on a TCP/IP port at all. This can be a security enhancement,
-# if all processes that need to connect to mysqld run on the same host.
-# All interaction with mysqld must be made via Unix sockets or named pipes.
-# Note that using this option without enabling named pipes on Windows
-# (via the "enable-named-pipe" option) will render mysqld useless!
-#
-#skip-networking
-
-# Replication Master Server (default)
-# binary logging is required for replication
-##log-bin=//var/lib/mysql/mysql-bin
-
-# binary logging format - mixed recommended
-binlog_format=row
-
-# required unique id between 1 and 2^32 - 1
-# defaults to 1 if master-host is not set
-# but will not function as a master if omitted
-
-# Replication Slave (comment out master section to use this)
-#
-# To configure this host as a replication slave, you can choose between
-# two methods :
-#
-# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
-# the syntax is:
-#
-# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
-# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
-#
-# where you replace <host>, <user>, <password> by quoted strings and
-# <port> by the master's port number (3306 by default).
-#
-# Example:
-#
-# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
-# MASTER_USER='joe', MASTER_PASSWORD='secret';
-#
-# OR
-#
-# 2) Set the variables below. However, in case you choose this method, then
-# start replication for the first time (even unsuccessfully, for example
-# if you mistyped the password in master-password and the slave fails to
-# connect), the slave will create a master.info file, and any later
-# change in this file to the variables' values below will be ignored and
-# overridden by the content of the master.info file, unless you shutdown
-# the slave server, delete master.info and restart the slaver server.
-# For that reason, you may want to leave the lines below untouched
-# (commented) and instead use CHANGE MASTER TO (see above)
-#
-# required unique id between 2 and 2^32 - 1
-# (and different from the master)
-# defaults to 2 if master-host is set
-# but will not function as a slave if omitted
-#server-id = 2
-#
-# The replication master for this slave - required
-#master-host = <hostname>
-#
-# The username the slave will use for authentication when connecting
-# to the master - required
-#master-user = <username>
-#
-# The password the slave will authenticate with when connecting to
-# the master - required
-#master-password = <password>
-#
-# The port the master is listening on.
-# optional - defaults to 3306
-#master-port = <port>
-#
-# binary logging - not required for slaves, but recommended
-#log-bin=mysql-bin
-
-# Uncomment the following if you are using InnoDB tables
-##innodb_data_home_dir = //opt/app/mysql/data
-##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
-##innodb_log_group_home_dir = //opt/app/mysql/iblogs
-# You can set .._buffer_pool_size up to 50 - 80 %
-# of RAM but beware of setting memory usage too high
-#innodb_buffer_pool_size = 6380M
-#innodb_additional_mem_pool_size = 2M
-# Set .._log_file_size to 25 % of buffer pool size
-innodb_log_file_size = 150M
-innodb_log_files_in_group = 3
-innodb_log_buffer_size = 8M
-#innodb_flush_log_at_trx_commit = 1
-innodb_lock_wait_timeout = 50
-innodb_autoextend_increment = 100
-expire_logs_days = 8
-open_files_limit = 2000
-transaction-isolation=READ-COMMITTED
-####### Galera parameters #######
-## Galera Provider configuration
-wsrep_provider=/usr/lib/galera/libgalera_smm.so
-wsrep_provider_options="gcache.size=1G; gcache.page_size=1G"
-## Galera Cluster configuration
-wsrep_cluster_name="MSO-automated-tests-cluster"
-wsrep_cluster_address="gcomm://"
-#wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
-##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
-## Galera Synchronization configuration
-wsrep_sst_method=rsync
-#wsrep_sst_method=xtrabackup-v2
-#wsrep_sst_auth="sstuser:Mon#2o!6"
-## Galera Node configuration
-wsrep_node_name="mariadb1"
-##wsrep_node_address="192.169.3.184"
-wsrep_on=ON
-## Status notification
-#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
-#######
-
-
-[mysqldump]
-quick
-max_allowed_packet = 16M
-
-[mysql]
-no-auto-rehash
-# Remove the next comment character if you are not familiar with SQL
-#safe-updates
-
-[myisamchk]
-key_buffer_size = 20971520
-
-##[mysqlhotcopy]
-##interactive-timeout
-##[mysqld_safe]
-##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
-##log-error=//opt/app/mysql/log/mysqld.log
-
-general_log_file = /var/log/mysql/mysql.log
-general_log = 1
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/docker-entrypoint-initdb.d/sql_init_01.sql b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/docker-entrypoint-initdb.d/sql_init_01.sql
deleted file mode 100644
index e7fade9eb8..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/resources/config/mariadb/docker-entrypoint-initdb.d/sql_init_01.sql
+++ /dev/null
@@ -1,144 +0,0 @@
-USE `datarouter`;
-
-CREATE TABLE FEEDS (
- FEEDID INT UNSIGNED NOT NULL PRIMARY KEY,
- GROUPID INT(10) UNSIGNED NOT NULL DEFAULT 0,
- NAME VARCHAR(255) NOT NULL,
- VERSION VARCHAR(20) NOT NULL,
- DESCRIPTION VARCHAR(1000),
- BUSINESS_DESCRIPTION VARCHAR(1000) DEFAULT NULL,
- AUTH_CLASS VARCHAR(32) NOT NULL,
- PUBLISHER VARCHAR(8) NOT NULL,
- SELF_LINK VARCHAR(256),
- PUBLISH_LINK VARCHAR(256),
- SUBSCRIBE_LINK VARCHAR(256),
- LOG_LINK VARCHAR(256),
- DELETED BOOLEAN DEFAULT FALSE,
- LAST_MOD TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- SUSPENDED BOOLEAN DEFAULT FALSE,
- CREATED_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP
-);
-
-CREATE TABLE FEED_ENDPOINT_IDS (
- FEEDID INT UNSIGNED NOT NULL,
- USERID VARCHAR(20) NOT NULL,
- PASSWORD VARCHAR(32) NOT NULL
-);
-
-CREATE TABLE FEED_ENDPOINT_ADDRS (
- FEEDID INT UNSIGNED NOT NULL,
- ADDR VARCHAR(44) NOT NULL
-);
-
-CREATE TABLE SUBSCRIPTIONS (
- SUBID INT UNSIGNED NOT NULL PRIMARY KEY,
- FEEDID INT UNSIGNED NOT NULL,
- GROUPID INT(10) UNSIGNED NOT NULL DEFAULT 0,
- DELIVERY_URL VARCHAR(256),
- DELIVERY_USER VARCHAR(20),
- DELIVERY_PASSWORD VARCHAR(32),
- DELIVERY_USE100 BOOLEAN DEFAULT FALSE,
- METADATA_ONLY BOOLEAN DEFAULT FALSE,
- SUBSCRIBER VARCHAR(8) NOT NULL,
- SELF_LINK VARCHAR(256),
- LOG_LINK VARCHAR(256),
- LAST_MOD TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- SUSPENDED BOOLEAN DEFAULT FALSE,
- CREATED_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP
-
-);
-
-CREATE TABLE PARAMETERS (
- KEYNAME VARCHAR(32) NOT NULL PRIMARY KEY,
- VALUE VARCHAR(4096) NOT NULL
-);
-
-CREATE TABLE LOG_RECORDS (
- TYPE ENUM('pub', 'del', 'exp', 'pbf', 'dlx') NOT NULL,
- EVENT_TIME BIGINT NOT NULL, /* time of the publish request */
- PUBLISH_ID VARCHAR(64) NOT NULL, /* unique ID assigned to this publish attempt */
- FEEDID INT UNSIGNED NOT NULL, /* pointer to feed in FEEDS */
- REQURI VARCHAR(256) NOT NULL, /* request URI */
- METHOD ENUM('DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'POST', 'TRACE') NOT NULL, /* HTTP method */
- CONTENT_TYPE VARCHAR(256) NOT NULL, /* content type of published file */
- CONTENT_LENGTH BIGINT NOT NULL, /* content length of published file */
-
- FEED_FILEID VARCHAR(256), /* file ID of published file */
- REMOTE_ADDR VARCHAR(40), /* IP address of publishing endpoint */
- USER VARCHAR(50), /* user name of publishing endpoint */
- STATUS SMALLINT, /* status code returned to delivering agent */
-
- DELIVERY_SUBID INT UNSIGNED, /* pointer to subscription in SUBSCRIPTIONS */
- DELIVERY_FILEID VARCHAR(256), /* file ID of file being delivered */
- RESULT SMALLINT, /* result received from subscribing agent */
-
- ATTEMPTS INT, /* deliveries attempted */
- REASON ENUM('notRetryable', 'retriesExhausted', 'diskFull', 'other'),
-
- RECORD_ID BIGINT UNSIGNED NOT NULL PRIMARY KEY, /* unique ID for this record */
- CONTENT_LENGTH_2 BIGINT,
-
- INDEX (FEEDID) USING BTREE,
- INDEX (DELIVERY_SUBID) USING BTREE,
- INDEX (RECORD_ID) USING BTREE
-) ENGINE = MyISAM;
-
-CREATE TABLE INGRESS_ROUTES (
- SEQUENCE INT UNSIGNED NOT NULL,
- FEEDID INT UNSIGNED NOT NULL,
- USERID VARCHAR(20),
- SUBNET VARCHAR(44),
- NODESET INT UNSIGNED NOT NULL
-);
-
-CREATE TABLE EGRESS_ROUTES (
- SUBID INT UNSIGNED NOT NULL PRIMARY KEY,
- NODEID INT UNSIGNED NOT NULL
-);
-
-CREATE TABLE NETWORK_ROUTES (
- FROMNODE INT UNSIGNED NOT NULL,
- TONODE INT UNSIGNED NOT NULL,
- VIANODE INT UNSIGNED NOT NULL
-);
-
-CREATE TABLE NODESETS (
- SETID INT UNSIGNED NOT NULL,
- NODEID INT UNSIGNED NOT NULL
-);
-
-CREATE TABLE NODES (
- NODEID INT UNSIGNED NOT NULL PRIMARY KEY,
- NAME VARCHAR(255) NOT NULL,
- ACTIVE BOOLEAN DEFAULT TRUE
-);
-
-CREATE TABLE GROUPS (
- GROUPID INT UNSIGNED NOT NULL PRIMARY KEY,
- AUTHID VARCHAR(100) NOT NULL,
- NAME VARCHAR(50) NOT NULL,
- DESCRIPTION VARCHAR(255),
- CLASSIFICATION VARCHAR(20) NOT NULL,
- MEMBERS TINYTEXT,
- LAST_MOD TIMESTAMP DEFAULT CURRENT_TIMESTAMP
-);
-
-INSERT INTO PARAMETERS VALUES
- ('ACTIVE_POD', '{{.Values.global.config.dmaapDrProv.name}}'),
- ('PROV_ACTIVE_NAME', '{{.Values.global.config.dmaapDrProv.name}}'),
- ('STANDBY_POD', ''),
- ('PROV_NAME', '{{.Values.global.config.dmaapDrProv.name}}'),
- ('NODES', '{{.Values.global.config.dmaapDrNode.name}}'),
- ('PROV_DOMAIN', '{{ include "common.namespace" . }}'),
- ('DELIVERY_INIT_RETRY_INTERVAL', '10'),
- ('DELIVERY_MAX_AGE', '86400'),
- ('DELIVERY_MAX_RETRY_INTERVAL', '3600'),
- ('DELIVERY_RETRY_RATIO', '2'),
- ('LOGROLL_INTERVAL', '300'),
- ('PROV_AUTH_ADDRESSES', '{{.Values.global.config.dmaapDrProv.name}}|{{.Values.global.config.dmaapDrNode.name}}'),
- ('PROV_AUTH_SUBJECTS', ''),
- ('PROV_MAXFEED_COUNT', '10000'),
- ('PROV_MAXSUB_COUNT', '100000'),
- ('PROV_REQUIRE_CERT', 'false'),
- ('PROV_REQUIRE_SECURE', 'false'),
- ('_INT_VALUES', 'LOGROLL_INTERVAL|PROV_MAXFEED_COUNT|PROV_MAXSUB_COUNT|DELIVERY_INIT_RETRY_INTERVAL|DELIVERY_MAX_RETRY_INTERVAL|DELIVERY_RETRY_RATIO|DELIVERY_MAX_AGE');
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/NOTES.txt b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/NOTES.txt
deleted file mode 100644
index 71879412d0..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/NOTES.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright © 2018 AT&T Intellectual Property. All rights reserved.
-#
-# 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.
-
-1. Get the application URL by running these commands:
-{{- if .Values.ingress.enabled }}
-{{- range .Values.ingress.hosts }}
- http://{{ . }}
-{{- end }}
-{{- else if contains "NodePort" .Values.global.config.mariadb.servicetype }}
- export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
- export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
- echo http://$NODE_IP:$NODE_PORT
-{{- else if contains "LoadBalancer" .Values.global.config.mariadb.servicetype }}
- NOTE: It may take a few minutes for the LoadBalancer IP to be available.
- You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
- echo http://$SERVICE_IP:{{.Values.global.config.mariadb.externalPort}}
-{{- else if contains "ClusterIP" .Values.global.config.mariadb.servicetype }}
- export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
- echo "Visit http://127.0.0.1:8080 to use your application"
- kubectl port-forward $POD_NAME 8080:{{.Values.global.config.mariadb.internalPort}}
-{{- end }}
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/configmap.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/configmap.yaml
deleted file mode 100644
index dd75846932..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/configmap.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-mdb-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/mariadb/conf.d/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-mdb-initd-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/mariadb/docker-entrypoint-initdb.d/sql_init_01.sql").AsConfig . | indent 2 }}
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/deployment.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/deployment.yaml
deleted file mode 100644
index bf544916ef..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/deployment.yaml
+++ /dev/null
@@ -1,107 +0,0 @@
-# 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.
-
-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 }}
- template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
- spec:
- containers:
- - name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports:
- - containerPort: {{.Values.global.config.mariadb.internalPort}}
- # disable liveness probe when breakpoints set in debugger
- # so K8s doesn't restart unresponsive container
- {{- if eq .Values.liveness.enabled true }}
- args:
- - --lower-case-table-names=1
- - --wait_timeout=28800
- livenessProbe:
- tcpSocket:
- port: {{.Values.global.config.mariadb.internalPort}}
- initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end -}}
- readinessProbe:
- tcpSocket:
- port: {{.Values.global.config.mariadb.internalPort}}
- initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.readiness.periodSeconds }}
- env:
- - name: MYSQL_ROOT_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ template "common.fullname" . }}-secret
- key: db-root-password
- - name: MYSQL_USER
- value: {{.Values.global.config.mariadb.userName}}
- - name: MYSQL_DATABASE
- value: {{.Values.global.config.mariadb.mysqlDatabase}}
- - name: MYSQL_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ template "common.fullname" . }}-secret
- key: db-user-password
- volumeMounts:
- - mountPath: /docker-entrypoint-initdb.d/sql_init_01.sql
- name: docker-entrypoint-initdb
- subPath: sql_init_01.sql
- - mountPath: /etc/mysql/conf.d
- name: mariadb-conf
- - mountPath: /var/lib/mysql
- name: mariadb-data
- resources:
-{{ include "common.resources" . | indent 12 }}
- {{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
- {{- end -}}
- {{- if .Values.affinity }}
- affinity:
-{{ toYaml .Values.affinity | indent 10 }}
- {{- end }}
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: docker-entrypoint-initdb
- configMap:
- name: {{ include "common.fullname" . }}-mdb-initd-configmap
- - name: mariadb-conf
- configMap:
- name: {{ include "common.fullname" . }}-mdb-configmap
- - name: mariadb-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/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pv.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pv.yaml
deleted file mode 100644
index da117f4919..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pv.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-{{/*
-# 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/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pvc.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pvc.yaml
deleted file mode 100644
index e27c3311e9..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/pvc.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-{{/*
-# 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/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/secrets.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/secrets.yaml
deleted file mode 100644
index bc93b9ecc9..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/secrets.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.fullname" . }}-secret
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-type: Opaque
-data:
- db-root-password: {{ .Values.global.config.mariadb.mariadbRootPassword | b64enc | quote }}
- db-user-password: {{ .Values.global.config.mariadb.userPassword | b64enc | quote }}
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/service.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/service.yaml
deleted file mode 100644
index 53fed469f9..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/templates/service.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{.Values.global.config.mariadb.name}}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- type: {{.Values.global.config.mariadb.servicetype}}
- ports:
- {{if eq .Values.global.config.mariadb.servicetype "NodePort" -}}
- - port: {{.Values.global.config.mariadb.internalPort}}
- nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
- {{- else -}}
- - port: {{.Values.global.config.mariadb.externalPort}}
- targetPort: {{.Values.global.config.mariadb.internalPort}}
- {{- end}}
- name: {{.Values.global.config.mariadb.name}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ .Release.Name }} \ No newline at end of file
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/values.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/values.yaml
deleted file mode 100644
index 03a46acdc6..0000000000
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-db/values.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-# 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.
-
-# Default values for mariadb.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-global: # global defaults
- persistence: {}
-
-# application image
-repository: nexus3.onap.org:10001
-image: mariadb:10.2.14
-pullPolicy: Always
-
-# application configuration - see parent values chart
-
-# flag to enable debugging - application support required
-debugEnabled: false
-
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
- initialDelaySeconds: 30
- periodSeconds: 10
- # necessary to disable liveness probe when setting breakpoints
- # in debugger so K8s doesn't restart unresponsive container
- enabled: true
-
-readiness:
- initialDelaySeconds: 30
- periodSeconds: 10
-
-## Persist data to a persitent volume
-persistence:
- enabled: true
- volumeReclaimPolicy: Retain
- accessMode: ReadWriteMany
- size: 1Gi
- mountPath: /dockerdata-nfs
- mountSubPath: dmaap/dr-db/data
-
-ingress:
- enabled: false
-
-# Resource Limit flavor -By Default using small
-flavor: small
-# Segregation for Different environment (Small and Large)
-resources:
- small:
- limits:
- cpu: 2000m
- memory: 4Gi
- requests:
- cpu: 500m
- memory: 1Gi
- large:
- limits:
- cpu: 4000m
- memory: 8Gi
- requests:
- cpu: 1000m
- memory: 2Gi
- unlimited: {}
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/resources/config/provserver.properties b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/resources/config/provserver.properties
index 6bde746d66..dea4862acd 100644
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/resources/config/provserver.properties
+++ b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/resources/config/provserver.properties
@@ -44,6 +44,6 @@ org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
# Database access
org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver
-org.onap.dmaap.datarouter.db.url = jdbc:mariadb://{{.Values.global.config.mariadb.name}}:{{.Values.global.config.mariadb.externalPort}}/datarouter
+org.onap.dmaap.datarouter.db.url = jdbc:mariadb://{{.Values.global.config.dmaapDrDb.mariadbServiceName}}:{{.Values.global.config.dmaapDrDb.mariadbServicePort}}/datarouter
org.onap.dmaap.datarouter.db.login = datarouter
org.onap.dmaap.datarouter.db.password = datarouter
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/templates/deployment.yaml b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/templates/deployment.yaml
index 7fd60ea501..b223872a3c 100644
--- a/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/templates/deployment.yaml
+++ b/kubernetes/dmaap/charts/dmaap-data-router/charts/dmaap-dr-prov/templates/deployment.yaml
@@ -35,7 +35,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - {{.Values.global.config.mariadb.name}}
+ - {{.Values.global.config.dmaapDrDb.mariadbContName}}
env:
- name: NAMESPACE
valueFrom:
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/requirements.yaml b/kubernetes/dmaap/charts/dmaap-data-router/requirements.yaml
index 5da3738b55..506aa83aa2 100644
--- a/kubernetes/dmaap/charts/dmaap-data-router/requirements.yaml
+++ b/kubernetes/dmaap/charts/dmaap-data-router/requirements.yaml
@@ -16,4 +16,8 @@ dependencies:
- name: common
version: ~3.0.0
repository: '@local'
+ - name: mariadb-galera
+ alias: mariadb
+ version: ~3.0.0
+ repository: '@local'
diff --git a/kubernetes/dmaap/charts/dmaap-data-router/values.yaml b/kubernetes/dmaap/charts/dmaap-data-router/values.yaml
index 7f29f931fb..1a4feec659 100644
--- a/kubernetes/dmaap/charts/dmaap-data-router/values.yaml
+++ b/kubernetes/dmaap/charts/dmaap-data-router/values.yaml
@@ -16,24 +16,12 @@
# DMaap Data Router Global config defaults.
#################################################################
global:
- persistence: {}
env:
name: AUTO
ubuntuInitRepository: oomk8s
ubuntuInitImage: ubuntu-init:1.0.0
config:
-# dr db configuration
- mariadb:
- servicetype: ClusterIP
- name: dmaap-dr-db
- portName: dr-db-port
- internalPort: 3306
- externalPort: 3306
- mariadbRootPassword: datarouter
- userName: datarouter
- userPassword: datarouter
- mysqlDatabase: datarouter
# dr provisioning server configuration
dmaapDrProv:
servicetype: NodePort
@@ -51,8 +39,32 @@ global:
servicetype: ClusterIP
name: dmaap-dr-node
externalPort: 8080
- internalPort: 8080
externalPort2: 8443
+ internalPort: 8080
internalPort2: 8443
portName: dr-node-port
portName2: dr-node-port2
+# dr-prov db configuration
+ dmaapDrDb:
+ mariadbServiceName: dmaap-dr-db-svc
+ mariadbServicePort: 3306
+ mariadbContName: dmaap-dr-db
+
+# mariadb-galera configuration
+mariadb:
+ name: dmaap-dr-db
+ nameOverride: dmaap-dr-db
+ replicaCount: 2
+ config:
+ mariadbRootPassword: datarouter
+ userName: datarouter
+ userPassword: datarouter
+ mysqlDatabase: datarouter
+ service:
+ name: dmaap-dr-db-svc
+ portName: dmaap-dr-db-svc
+ nfsprovisionerPrefix: dmaap-dr-db
+ persistence:
+ size: 1Gi
+ mountSubPath: data-router/dr-db-data
+ disableNfsProvisioner: true \ No newline at end of file