From c53b1fa86d8b6a38fa75629d5a8d8ef86f9a5052 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Fri, 17 May 2019 21:24:41 +0800 Subject: [PATCH] Add a configmap for mariadb ingress controller The configmap is for mariab ingress controller configuration. It is to enable the capability of overriding default nginx configurations in the controller. Change-Id: I25eb8a237a6f8ad63bde725b1d4f31a928fa7c49 Signed-off-by: Yi Wang --- .../bin/_mariadb-ingress-controller.sh.tpl | 1 + mariadb/templates/configmap-ingress-conf.yaml | 27 +++++++++++++++++++ mariadb/values.yaml | 3 +++ 3 files changed, 31 insertions(+) create mode 100755 mariadb/templates/configmap-ingress-conf.yaml diff --git a/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl b/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl index 4b3d47b6d..3e560c6b1 100644 --- a/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl +++ b/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl @@ -28,6 +28,7 @@ function start () { --election-id=${RELEASE_NAME} \ --ingress-class=${INGRESS_CLASS} \ --default-backend-service=${POD_NAMESPACE}/${ERROR_PAGE_SERVICE} \ + --configmap=${POD_NAMESPACE}/mariadb-ingress-conf \ --tcp-services-configmap=${POD_NAMESPACE}/mariadb-services-tcp } diff --git a/mariadb/templates/configmap-ingress-conf.yaml b/mariadb/templates/configmap-ingress-conf.yaml new file mode 100755 index 000000000..64ffdd190 --- /dev/null +++ b/mariadb/templates/configmap-ingress-conf.yaml @@ -0,0 +1,27 @@ +{{/* +Copyright 2019 The Openstack-Helm Authors. + +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 .Values.manifests.configmap_ingress_conf }} +{{- $envAll := . }} + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mariadb-ingress-conf +data: +{{ toYaml .Values.conf.ingress_conf | indent 2 }} +{{- end }} diff --git a/mariadb/values.yaml b/mariadb/values.yaml index 186c6a94f..a598181ac 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -269,6 +269,8 @@ conf: - --number-char-cols=1 - --number-int-cols=1 ingress: null + ingress_conf: + worker-processes: "auto" backup: enabled: true base_path: /var/backup @@ -388,6 +390,7 @@ network_policy: manifests: configmap_bin: true configmap_etc: true + configmap_ingress_conf: true configmap_services_tcp: true deployment_error: true deployment_ingress: true