Skip to content

Commit

Permalink
feature: make headless service configurable (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasSchwalb authored Oct 12, 2023
1 parent 901b19e commit 3973a4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/helm/templates/monitor/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ metadata:
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{ if .Values.service.headless }}
clusterIP: None
{{ end }}
ports:
- name: metrics
port: {{ .Values.service.metricsPort }}
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ image:
# -- service only expose a metrics endpoint for prometheus to scrape,
# trivy-operator does not have a user interface.
service:
headless: true
metricsPort: 80
# -- annotations added to the operator's service
annotations: {}
Expand Down

0 comments on commit 3973a4d

Please sign in to comment.