Skip to content

Commit

Permalink
Ability for custom dnsConfig to prometheus (prometheus-community#643)
Browse files Browse the repository at this point in the history
Signed-off-by: Stavros Foteinopoulos <[email protected]>
  • Loading branch information
stafot authored Feb 9, 2021
1 parent 5d418e0 commit b58ddf5
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: prometheus
version: 13.2.1
version: 13.3.0
appVersion: 2.24.0
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/alertmanager/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ spec:
{{- if .Values.alertmanager.nodeSelector }}
nodeSelector:
{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.alertmanager.dnsConfig }}
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.alertmanager.securityContext }}
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/node-exporter/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ spec:
{{- if .Values.nodeExporter.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.nodeExporter.dnsConfig }}
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.nodeExporter.securityContext }}
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/pushgateway/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ spec:
{{- if .Values.pushgateway.nodeSelector }}
nodeSelector:
{{ toYaml .Values.pushgateway.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.pushgateway.dnsConfig }}
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.pushgateway.securityContext }}
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/server/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ spec:
{{- if .Values.server.hostAliases }}
hostAliases:
{{ toYaml .Values.server.hostAliases | indent 8 }}
{{- end }}
{{- if .Values.server.dnsConfig }}
dnsConfig:
{{ toYaml .Values.server.dnsConfig | indent 8 }}
{{- end }}
{{- if .Values.server.securityContext }}
securityContext:
Expand Down
47 changes: 47 additions & 0 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ alertmanager:
# cpu: 10m
# memory: 32Mi

# Custom DNS configuration to be added to alertmanager pods
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0

## Security context to be added to alertmanager pods
##
securityContext:
Expand Down Expand Up @@ -528,6 +540,18 @@ nodeExporter:
# cpu: 100m
# memory: 30Mi

# Custom DNS configuration to be added to node-exporter pods
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0

## Security context to be added to node-exporter pods
##
securityContext:
Expand Down Expand Up @@ -931,6 +955,17 @@ server:
# containerPolicies:
# - containerName: 'prometheus-server'

# Custom DNS configuration to be added to prometheus server pods
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0
## Security context to be added to server pods
##
securityContext:
Expand Down Expand Up @@ -1103,6 +1138,18 @@ pushgateway:
# cpu: 10m
# memory: 32Mi

# Custom DNS configuration to be added to push-gateway pods
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0

## Security context to be added to push-gateway pods
##
securityContext:
Expand Down

0 comments on commit b58ddf5

Please sign in to comment.