Skip to content

Commit

Permalink
[zipkin-helm] option to enable serviceMonitor for zipkin
Browse files Browse the repository at this point in the history
Signed-off-by: mshivanna_tdx <[email protected]>
  • Loading branch information
mshivanna_tdx committed Feb 20, 2024
1 parent 3038dc9 commit 53022a5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
37 changes: 37 additions & 0 deletions charts/zipkin/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{- /*
Copyright 2023 The OpenZipkin Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
*/}}
{{- if .Values.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "zipkin.serviceAccountName" . }}
namespace: {{ include "zipkin.namespace" . }}
labels:
{{- include "zipkin.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.labels }}
{{- (toYaml .Values.serviceMonitor.labels | nindent 4) }}
{{- end }}
spec:
endpoints:
- interval: {{ .Values.serviceMonitor.interval }}
port: {{ .Values.serviceMonitor.port }}
path: {{ .Values.serviceMonitor.path }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
selector:
matchLabels:
{{- include "zipkin.selectorLabels" . | nindent 8 }}
namespaceSelector:
matchNames:
- {{ include "zipkin.namespace" . }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/zipkin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ service:
type: ClusterIP
port: 9411


serviceMonitor:
# If `true`, a ServiceMonitor resource for the zipkin is created
enabled: true
# Additional labels for the ServiceMonitor
labels: {}
# release: prometheus
# Interval at which Prometheus scrapes metrics
interval: 10s
# Timeout for scraping
scrapeTimeout: 10s
# The path at which metrics are served
path: '/prometheus'
# The Service port at which metrics are served
port: http-query

ingress:
enabled: false
annotations:
Expand Down

0 comments on commit 53022a5

Please sign in to comment.