Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts/metabase] feat: ServiceMonitor #87

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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