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

[stable/coredns] separate creation of prometheus service from operator #22804

Merged
merged 1 commit into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: coredns
version: 1.12.0
version: 1.13.0
appVersion: 1.6.9
description: CoreDNS is a DNS server that chains plugins and provides Kubernetes DNS Services
keywords:
Expand Down
2 changes: 2 additions & 0 deletions stable/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The command removes all the Kubernetes components associated with the chart and
| `resources.requests.cpu` | Container requested CPU | `100m` |
| `resources.requests.memory` | Container requested memory | `128Mi` |
| `serviceType` | Kubernetes Service type | `ClusterIP` |
| `prometheus.service.enabled` | Set this to `true` to create Service for Prometheus metrics | `false` |
| `prometheus.service.annotations` | Annotations to add to the metrics Service | `{prometheus.io/scrape: "true", prometheus.io/port: "9153"}`|
| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | {} |
| `prometheus.monitor.namespace` | Selector to select which namespaces the Endpoints objects are discovered from. | `""` |
Expand Down
4 changes: 2 additions & 2 deletions stable/coredns/templates/service-metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.prometheus.monitor.enabled }}
{{- if .Values.prometheus.service.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -18,7 +18,7 @@ metadata:
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{ toYaml .Values.prometheus.service.annotations | indent 4 }}
spec:
selector:
app.kubernetes.io/instance: {{ .Release.Name | quote }}
Expand Down
5 changes: 5 additions & 0 deletions stable/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ resources:
serviceType: "ClusterIP"

prometheus:
service:
enabled: false
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9153"
monitor:
enabled: false
additionalLabels: {}
Expand Down