Skip to content

Commit

Permalink
fix: don't use the default cluster dns domain in urls
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Oct 26, 2023
1 parent 6e16e14 commit 1eec710
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
exporters:
otlphttp:
endpoint: http://${LOGS_METADATA_SVC}.${NAMESPACE}.svc.cluster.local.:4318
endpoint: http://${LOGS_METADATA_SVC}.${NAMESPACE}:4318
sending_queue:
queue_size: 10
# this improves load balancing at the cost of more network traffic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
exporters:
otlphttp:
endpoint: http://${LOGS_METADATA_SVC}.${NAMESPACE}.svc.cluster.local.:4318
endpoint: http://${LOGS_METADATA_SVC}.${NAMESPACE}:4318
sending_queue:
queue_size: 10
# this improves load balancing at the cost of more network traffic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $scrapeConfigsPresent := or $collectorConfig.kubelet.enabled $collectorConfig.cAdvisor.enabled $collectorConfig.annotatedPods.enabled -}}
exporters:
otlphttp:
endpoint: http://${METADATA_METRICS_SVC}.${NAMESPACE}.svc.cluster.local.:4318
endpoint: http://${METADATA_METRICS_SVC}.${NAMESPACE}:4318
sending_queue:
queue_size: 10000
num_consumers: 10
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/sumologic/templates/_helpers/_metrics.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Generate list of remoteWrite endpoints for telegraf configuration
{{- $endpoints := list -}}
{{- $kps := get .Values "kube-prometheus-stack" -}}
{{- range $remoteWrite := $kps.prometheus.prometheusSpec.remoteWrite }}
{{- $endpoints = append $endpoints ($remoteWrite.url | trimPrefix "http://$(METADATA_METRICS_SVC).$(NAMESPACE).svc.cluster.local.:9888" | quote) -}}
{{- $endpoints = append $endpoints ($remoteWrite.url | trimPrefix "http://$(METADATA_METRICS_SVC).$(NAMESPACE):9888" | quote) -}}
{{- end }}
{{- range $remoteWrite := $kps.prometheus.prometheusSpec.additionalRemoteWrite }}
{{- $endpoints = append $endpoints ($remoteWrite.url | trimPrefix "http://$(METADATA_METRICS_SVC).$(NAMESPACE).svc.cluster.local.:9888" | quote) -}}
{{- $endpoints = append $endpoints ($remoteWrite.url | trimPrefix "http://$(METADATA_METRICS_SVC).$(NAMESPACE):9888" | quote) -}}
{{- end -}}
{{- range $endpoint := .Values.metadata.metrics.config.additionalEndpoints }}
{{- $endpoints = append $endpoints ($endpoint | quote) -}}
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ kube-prometheus-stack:
action: replace
remoteWrite:
## infrastructure metrics
- url: http://$(METADATA_METRICS_SVC).$(NAMESPACE).svc.cluster.local.:9888/prometheus.metrics
- url: http://$(METADATA_METRICS_SVC).$(NAMESPACE):9888/prometheus.metrics
remoteTimeout: 5s

serviceMonitor:
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/yamls/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ nodes:
dataDir: /tmp/etcd
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
networking:
dnsDomain: "my.cluster"

0 comments on commit 1eec710

Please sign in to comment.