Skip to content

Commit

Permalink
Merge pull request #559 from dani-CO-CN/serviceMonitor
Browse files Browse the repository at this point in the history
feat: add servicemonitor for prometheus
  • Loading branch information
gthao313 authored Oct 12, 2023
2 parents 9a3b279 + 15a6f48 commit f428336
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ spec:
ports:
- port: 80
targetPort: 8080
name: main
selector:
brupop.bottlerocket.aws/component: brupop-controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.prometheus.controller.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: brupop-controller
namespace: {{ .Values.namespace }}
labels:
app.kubernetes.io/component: brupop-controller
app.kubernetes.io/managed-by: brupop
app.kubernetes.io/part-of: brupop
brupop.bottlerocket.aws/component: brupop-controller
spec:
endpoints:
- port: main
namespaceSelector:
matchNames:
- {{ .Values.namespace }}
selector:
matchLabels:
brupop.bottlerocket.aws/component: brupop-controller
{{- end }}

5 changes: 5 additions & 0 deletions deploy/charts/bottlerocket-update-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ logging:
apiserver:
tracing_filter: "info"

prometheus:
controller:
serviceMonitor:
enabled: false

resources:
agent:
resources:
Expand Down

0 comments on commit f428336

Please sign in to comment.