From c45f137178ae3138fb46e85abfd5b98bd5726d70 Mon Sep 17 00:00:00 2001 From: "Javier J. Salmeron Garcia" Date: Fri, 12 Oct 2018 15:54:55 +0200 Subject: [PATCH 1/2] [bitnami/mysql] Enable metrics and move the scraping to the pods --- bitnami/mysql/Chart.yaml | 2 +- bitnami/mysql/templates/master-statefulset.yaml | 9 +++++++++ bitnami/mysql/templates/master-svc.yaml | 4 ---- bitnami/mysql/templates/slave-statefulset.yaml | 9 +++++++++ bitnami/mysql/templates/slave-svc.yaml | 4 ---- bitnami/mysql/values-production.yaml | 2 +- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/bitnami/mysql/Chart.yaml b/bitnami/mysql/Chart.yaml index 2e0fc41ad..4b1e634ef 100644 --- a/bitnami/mysql/Chart.yaml +++ b/bitnami/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 4.0.6 +version: 4.0.7 appVersion: 5.7.23 description: Chart to create a Highly available MySQL cluster keywords: diff --git a/bitnami/mysql/templates/master-statefulset.yaml b/bitnami/mysql/templates/master-statefulset.yaml index 57682c1e0..d05988abe 100644 --- a/bitnami/mysql/templates/master-statefulset.yaml +++ b/bitnami/mysql/templates/master-statefulset.yaml @@ -26,6 +26,15 @@ spec: component: "master" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} +{{- if or .Values.master.annotations .Values.metrics.enabled }} + annotations: + {{- if .Values.master.annotations }} +{{ toYaml .Values.master.annotations | indent 8 }} + {{- end }} + {{- if .Values.metrics.annotations }} +{{ toYaml .Values.metrics.annotations | indent 8 }} + {{- end }} +{{- end }} spec: {{- if .Values.securityContext.enabled }} securityContext: diff --git a/bitnami/mysql/templates/master-svc.yaml b/bitnami/mysql/templates/master-svc.yaml index f170a8d95..0aabbec27 100644 --- a/bitnami/mysql/templates/master-svc.yaml +++ b/bitnami/mysql/templates/master-svc.yaml @@ -8,10 +8,6 @@ metadata: chart: {{ template "mysql.chart" . }} release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} -{{- if .Values.metrics.enabled }} - annotations: -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/bitnami/mysql/templates/slave-statefulset.yaml b/bitnami/mysql/templates/slave-statefulset.yaml index b49de33ec..229add4c6 100644 --- a/bitnami/mysql/templates/slave-statefulset.yaml +++ b/bitnami/mysql/templates/slave-statefulset.yaml @@ -27,6 +27,15 @@ spec: component: "slave" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} +{{- if or .Values.slave.annotations .Values.metrics.enabled }} + annotations: + {{- if .Values.slave.annotations }} +{{ toYaml .Values.slave.annotations | indent 8 }} + {{- end }} + {{- if .Values.metrics.annotations }} +{{ toYaml .Values.metrics.annotations | indent 8 }} + {{- end }} +{{- end }} spec: {{- if .Values.securityContext.enabled }} securityContext: diff --git a/bitnami/mysql/templates/slave-svc.yaml b/bitnami/mysql/templates/slave-svc.yaml index 78cbb7b63..392712fd0 100644 --- a/bitnami/mysql/templates/slave-svc.yaml +++ b/bitnami/mysql/templates/slave-svc.yaml @@ -9,10 +9,6 @@ metadata: component: "slave" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} -{{- if .Values.metrics.enabled }} - annotations: -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/bitnami/mysql/values-production.yaml b/bitnami/mysql/values-production.yaml index f40e585d9..d232e26af 100644 --- a/bitnami/mysql/values-production.yaml +++ b/bitnami/mysql/values-production.yaml @@ -237,7 +237,7 @@ slave: failureThreshold: 3 metrics: - enabled: false + enabled: true image: registry: docker.io repository: prom/mysqld-exporter From e2bebe81a1abc6baa6c0b0a98cbc04cec5c10e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Wed, 21 Nov 2018 13:29:47 +0100 Subject: [PATCH 2/2] Update Chart.yaml --- bitnami/mysql/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitnami/mysql/Chart.yaml b/bitnami/mysql/Chart.yaml index 4b1e634ef..915e44ac7 100644 --- a/bitnami/mysql/Chart.yaml +++ b/bitnami/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 4.0.7 +version: 4.1.0 appVersion: 5.7.23 description: Chart to create a Highly available MySQL cluster keywords: