Skip to content

Commit

Permalink
Merge pull request #87 from jjangga0214/feat/service-monitor
Browse files Browse the repository at this point in the history
[charts/metabase] feat: ServiceMonitor
  • Loading branch information
pmint93 authored Nov 15, 2023
2 parents da1bc38 + 6dcf037 commit b366504
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/metabase/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions charts/metabase/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
19 changes: 19 additions & 0 deletions charts/metabase/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 6 additions & 0 deletions charts/metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b366504

Please sign in to comment.