From 15d2967f90766eca5739eb6c9c276f894db4c5da Mon Sep 17 00:00:00 2001 From: jjangga0214 Date: Wed, 15 Nov 2023 12:56:40 +0900 Subject: [PATCH 1/3] feat: ServiceMonitor Close #83 --- charts/metabase/templates/service.yaml | 6 ++++++ charts/metabase/templates/servicemonitor.yaml | 19 +++++++++++++++++++ charts/metabase/values.yaml | 6 ++++++ 3 files changed, 31 insertions(+) create mode 100644 charts/metabase/templates/servicemonitor.yaml diff --git a/charts/metabase/templates/service.yaml b/charts/metabase/templates/service.yaml index dbcd2cd..af63ae2 100644 --- a/charts/metabase/templates/service.yaml +++ b/charts/metabase/templates/service.yaml @@ -26,6 +26,12 @@ spec: {{- end}} protocol: TCP name: {{ .Values.service.name }} +{{- if .Values.monitoring.enabled }} + - port: {{ .Values.monitoring.port }} + targetPort: {{ .Values.monitoring.port }} + protocol: TCP + name: metrics +{{- end }} selector: app: {{ template "metabase.name" . }} release: {{ .Release.Name }} diff --git a/charts/metabase/templates/servicemonitor.yaml b/charts/metabase/templates/servicemonitor.yaml new file mode 100644 index 0000000..b3e135d --- /dev/null +++ b/charts/metabase/templates/servicemonitor.yaml @@ -0,0 +1,19 @@ +{{- if .Values.monitoring.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "metabase.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "metabase.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ template "metabase.name" . }} + release: {{ .Release.Name }} + endpoints: + - path: /metrics + port: metrics +{{- end }} diff --git a/charts/metabase/values.yaml b/charts/metabase/values.yaml index 3665368..c053204 100644 --- a/charts/metabase/values.yaml +++ b/charts/metabase/values.yaml @@ -27,7 +27,10 @@ listen: monitoring: enabled: false + serviceMonitor: + enabled: false port: 9191 + ssl: # If you have an ssl certificate and would prefer to have Metabase run over HTTPS enabled: false @@ -148,6 +151,9 @@ service: {} # Used to add custom annotations to the Service. # service.beta.kubernetes.io/aws-load-balancer-internal: "0.0.0.0/0" + loadBalancerSourceRanges: + {} + ingress: enabled: false # The ingress class name, if you use multiple ingress controllers: From c32be59101ca5bf92f30fe6399d82f83c144b0f5 Mon Sep 17 00:00:00 2001 From: jjangga0214 Date: Wed, 15 Nov 2023 13:51:33 +0900 Subject: [PATCH 2/3] chore(metabase): bump version --- charts/metabase/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/metabase/Chart.yaml b/charts/metabase/Chart.yaml index 4fdf8a5..c1cd9db 100644 --- a/charts/metabase/Chart.yaml +++ b/charts/metabase/Chart.yaml @@ -3,7 +3,7 @@ description: The easy, open source way for everyone in your company to ask questions and learn from data. name: metabase -version: 2.9.0 +version: 2.10.0 appVersion: v0.47.2 maintainers: - name: pmint93 From 6dcf037df8ba380e117cec0c0de7e9e863cdcd92 Mon Sep 17 00:00:00 2001 From: jjangga0214 Date: Wed, 15 Nov 2023 18:17:16 +0900 Subject: [PATCH 3/3] style(metabase): fix [trailing-spaces] --- charts/metabase/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/metabase/values.yaml b/charts/metabase/values.yaml index c053204..71ab820 100644 --- a/charts/metabase/values.yaml +++ b/charts/metabase/values.yaml @@ -30,7 +30,7 @@ monitoring: serviceMonitor: enabled: false port: 9191 - + ssl: # If you have an ssl certificate and would prefer to have Metabase run over HTTPS enabled: false