Skip to content

Commit

Permalink
apps: config option to set hostAliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavan-Gunda committed Nov 20, 2023
1 parent 49d066d commit 9264dd1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/config/common-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ hnc:
## Prometheus configuration.
## Prometheus collects metrics and pushes it to Thanos.
prometheusBlackboxExporter:
# Hostaliases allow to add additional DNS entries to be injected directly into pods.
# This will take precedence over your implemented DNS solution
hostAliases: []
# - ip: 192.168.1.1
# hostNames:
# - test.example.com
# - another.example.net
resources:
requests:
cpu: 10m
Expand Down
11 changes: 11 additions & 0 deletions helmfile/values/prometheus-blackbox-exporter-sc.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,14 @@ serviceMonitor:
scrapeTimeout: 30s
module: http_401
{{- end }}

{{- with .Values.prometheusBlackboxExporter.hostAliases }}
hostAliases:
{{- range . }}
- ip: {{ .ip }}
hostNames:
{{- range .hostNames }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions helmfile/values/prometheus-blackbox-exporter-wc.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@ serviceMonitor:
module: http_401
{{- end }}
{{- end }}

{{- with .Values.prometheusBlackboxExporter.hostAliases }}
hostAliases:
{{- range . }}
- ip: {{ .ip }}
hostNames:
{{- range .hostNames }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 9264dd1

Please sign in to comment.