summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-galera
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-galera')
-rw-r--r--kubernetes/common/mariadb-galera/templates/servicemonitor.yaml38
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml6
-rw-r--r--kubernetes/common/mariadb-galera/values.yaml3
3 files changed, 8 insertions, 39 deletions
diff --git a/kubernetes/common/mariadb-galera/templates/servicemonitor.yaml b/kubernetes/common/mariadb-galera/templates/servicemonitor.yaml
index 6c3b41f5a5..6d1ed40e13 100644
--- a/kubernetes/common/mariadb-galera/templates/servicemonitor.yaml
+++ b/kubernetes/common/mariadb-galera/templates/servicemonitor.yaml
@@ -1,5 +1,5 @@
{{/*
-# Copyright © 2020 Bitnami, Orange
+# Copyright © 2021 Bitnami, Orange, Bell Canada
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,38 +14,6 @@
# limitations under the License.
*/}}
-{{- if default false (and .Values.global.metrics.enabled .Values.global.metrics.custom_resources) }}
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
- name: {{ template "common.fullname" . }}
- {{- if .Values.metrics.serviceMonitor.namespace }}
- namespace: {{ .Values.metrics.serviceMonitor.namespace }}
- {{- else }}
- namespace: {{ include "common.namespace" . }}
- {{- end }}
- labels: {{- include "common.labels" . | nindent 4 }}
- {{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
- {{ $key }}: {{ $value | quote }}
- {{- end }}
-spec:
- selector:
- matchLabels: {{- include "common.matchLabels" . | nindent 6 }}
- endpoints:
- - port: metrics
- {{- if .Values.metrics.serviceMonitor.interval }}
- interval: {{ .Values.metrics.serviceMonitor.interval }}
- {{- end }}
- {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
- scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
- {{- end }}
- {{- if .Values.metrics.serviceMonitor.relabelings }}
- relabelings: {{- include "common.tplValue" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
- {{- end }}
- {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
- metricRelabelings: {{- include "common.tplValue" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
- {{- end }}
- namespaceSelector:
- matchNames:
- - {{ .Release.Namespace }}
+{{- if .Values.metrics.serviceMonitor.enabled }}
+{{ include "common.serviceMonitor" . }}
{{- end }}
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 7b0d90a9aa..9227e182b6 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -223,7 +223,7 @@ spec:
{{- end }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
{{- if .Values.affinity }}
- affinity: {{- include "common.tplvalues" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
+ affinity: {{- include "common.tplValue" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
@@ -231,10 +231,10 @@ spec:
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
- nodeSelector: {{- include "common.tplvalues" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
+ nodeSelector: {{- include "common.tplValue" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
- tolerations: {{- include "common.tplvalues" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
+ tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
{{- end }}
volumes:
- name: previous-boot
diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml
index 4c77efc83f..ed9977acd9 100644
--- a/kubernetes/common/mariadb-galera/values.yaml
+++ b/kubernetes/common/mariadb-galera/values.yaml
@@ -86,9 +86,10 @@ service:
##
type: ClusterIP
headless: {}
+ internalPort: &dbPort 3306
ports:
- name: mysql
- port: 3306
+ port: *dbPort
headlessPorts:
- name: galera
port: 4567