Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/coredns fix prometheus metrics (#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleh-ozimok authored and mgoodness committed Sep 2, 2017
1 parent 5851c51 commit 2da12db
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: coredns
version: 0.3.0
version: 0.4.0
description: CoreDNS is a DNS server that chains middleware and provides Kubernetes DNS Services
keywords:
- coredns
Expand Down
2 changes: 1 addition & 1 deletion stable/coredns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data:
health
{{- end }}
{{- if eq "prometheus" $key }}
prometheus localhost:{{ $middleware.port }}
prometheus 0.0.0.0:{{ $middleware.port }}
{{- end }}
{{- if eq "proxy" $key }}
proxy . /etc/resolv.conf
Expand Down
5 changes: 5 additions & 0 deletions stable/coredns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ spec:
name: dns-tcp
protocol: TCP
{{- end }}
{{- if .Values.middleware.prometheus.enabled }}
- containerPort: {{ .Values.middleware.prometheus.port }}
name: metrics
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
path: /health
Expand Down
5 changes: 5 additions & 0 deletions stable/coredns/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ spec:
port: 53
protocol: TCP
{{- end }}
{{- if .Values.middleware.prometheus.enabled }}
- name: metrics
port: {{ .Values.middleware.prometheus.port }}
protocol: TCP
{{- end }}
type: {{ default "ClusterIP" .Values.serviceType }}

0 comments on commit 2da12db

Please sign in to comment.