Skip to content

Commit 0cdf8b8

Browse files
swwolfWolf Wolfschütz
andauthored
Fix PromExporter with TLS enabled Monitor (#991)
Co-authored-by: Wolf Wolfschütz <[email protected]>
1 parent a8a8add commit 0cdf8b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

helm/charts/nats/files/stateful-set/prom-exporter-container.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ args:
2727
{{- if .Values.config.gateway.enabled }}
2828
- -gatewayz
2929
{{- end }}
30-
- http://localhost:{{ .Values.config.monitor.port }}/
30+
{{- $monitorProto := ternary "https" "http" .Values.config.monitor.tls.enabled }}
31+
- {{ $monitorProto }}://{{ .Values.promExporter.monitorDomain }}:{{ .Values.config.monitor.port }}/

helm/charts/nats/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ config:
238238
tls:
239239
# config.nats.tls must be enabled also
240240
# when enabled, monitoring port will use HTTPS with the options from config.nats.tls
241+
# if promExporter is also enabled, consider setting promExporter.monitorDomain
241242
enabled: false
242243

243244
profiling:
@@ -391,6 +392,9 @@ promExporter:
391392
fullImageName:
392393

393394
port: 7777
395+
# if config.monitor.tls.enabled is set to true, monitorDomain must be set to the common name
396+
# or a SAN used in the tls certificate
397+
monitorDomain: localhost
394398
# env var map, see nats.env for an example
395399
env: {}
396400

0 commit comments

Comments
 (0)