Bump all infrastructure components (#1355)
diff --git a/charts/coredns/templates/_helpers.tpl b/charts/coredns/templates/_helpers.tpl
index 6dc6833..e6f7491 100644
--- a/charts/coredns/templates/_helpers.tpl
+++ b/charts/coredns/templates/_helpers.tpl
@@ -224,3 +224,14 @@
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "coredns.clusterRoleName" -}}
+{{- if and .Values.clusterRole .Values.clusterRole.nameOverride -}}
+ {{ .Values.clusterRole.nameOverride }}
+{{- else -}}
+ {{ template "coredns.fullname" . }}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/charts/coredns/templates/clusterrole.yaml b/charts/coredns/templates/clusterrole.yaml
index c33762c..ecdeafa 100644
--- a/charts/coredns/templates/clusterrole.yaml
+++ b/charts/coredns/templates/clusterrole.yaml
@@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: {{ template "coredns.fullname" . }}
+ name: {{ template "coredns.clusterRoleName" . }}
labels: {{- include "coredns.labels" . | nindent 4 }}
rules:
- apiGroups:
diff --git a/charts/coredns/templates/clusterrolebinding.yaml b/charts/coredns/templates/clusterrolebinding.yaml
index 36fa21c..ebeaf14 100644
--- a/charts/coredns/templates/clusterrolebinding.yaml
+++ b/charts/coredns/templates/clusterrolebinding.yaml
@@ -2,12 +2,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ template "coredns.fullname" . }}
+ name: {{ template "coredns.clusterRoleName" . }}
labels: {{- include "coredns.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "coredns.fullname" . }}
+ name: {{ template "coredns.clusterRoleName" . }}
subjects:
- kind: ServiceAccount
name: {{ template "coredns.serviceAccountName" . }}
diff --git a/charts/coredns/templates/configmap.yaml b/charts/coredns/templates/configmap.yaml
index 67654c6..e37858c 100644
--- a/charts/coredns/templates/configmap.yaml
+++ b/charts/coredns/templates/configmap.yaml
@@ -1,4 +1,5 @@
{{- if .Values.deployment.enabled }}
+{{- if not .Values.deployment.skipConfig }}
---
apiVersion: v1
kind: ConfigMap
@@ -33,3 +34,4 @@
{{ .filename }}: {{ toYaml .contents | indent 4 }}
{{- end }}
{{- end }}
+{{- end }}
diff --git a/charts/coredns/templates/deployment.yaml b/charts/coredns/templates/deployment.yaml
index 1b3f86f..86db59f 100644
--- a/charts/coredns/templates/deployment.yaml
+++ b/charts/coredns/templates/deployment.yaml
@@ -29,12 +29,16 @@
maxUnavailable: {{ .Values.rollingUpdate.maxUnavailable }}
maxSurge: {{ .Values.rollingUpdate.maxSurge }}
selector:
+ {{- if .Values.deployment.selector }}
+ {{- toYaml .Values.deployment.selector | nindent 4 }}
+ {{- else }}
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- if .Values.isClusterService }}
k8s-app: {{ template "coredns.k8sapplabel" . }}
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}
+ {{- end }}
template:
metadata:
labels:
diff --git a/charts/coredns/templates/poddisruptionbudget.yaml b/charts/coredns/templates/poddisruptionbudget.yaml
index 9cc62c1..136d804 100644
--- a/charts/coredns/templates/poddisruptionbudget.yaml
+++ b/charts/coredns/templates/poddisruptionbudget.yaml
@@ -13,6 +13,7 @@
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
+ {{- if not .Values.podDisruptionBudget.selector }}
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name | quote }}
@@ -20,5 +21,6 @@
k8s-app: {{ template "coredns.k8sapplabel" . }}
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}
+ {{- end }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end }}
diff --git a/charts/coredns/templates/service-metrics.yaml b/charts/coredns/templates/service-metrics.yaml
index 1fc7b2d..0ae9a15 100644
--- a/charts/coredns/templates/service-metrics.yaml
+++ b/charts/coredns/templates/service-metrics.yaml
@@ -23,11 +23,15 @@
{{- end }}
spec:
selector:
+ {{- if .Values.prometheus.service.selector }}
+ {{- toYaml .Values.prometheus.service.selector | nindent 4 }}
+ {{- else }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- if .Values.isClusterService }}
k8s-app: {{ template "coredns.k8sapplabel" . }}
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}
+ {{- end }}
ports:
- name: metrics
port: 9153
diff --git a/charts/coredns/templates/service.yaml b/charts/coredns/templates/service.yaml
index e9c5b96..95babce 100644
--- a/charts/coredns/templates/service.yaml
+++ b/charts/coredns/templates/service.yaml
@@ -20,11 +20,15 @@
{{- end }}
spec:
selector:
+ {{- if .Values.service.selector }}
+ {{- toYaml .Values.service.selector | nindent 4 }}
+ {{- else }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- if .Values.isClusterService }}
k8s-app: {{ template "coredns.k8sapplabel" . }}
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}
+ {{- end }}
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
diff --git a/charts/coredns/templates/servicemonitor.yaml b/charts/coredns/templates/servicemonitor.yaml
index b5fc642..53f8bdb 100644
--- a/charts/coredns/templates/servicemonitor.yaml
+++ b/charts/coredns/templates/servicemonitor.yaml
@@ -21,6 +21,9 @@
- {{ .Release.Namespace }}
{{- end }}
selector:
+ {{- if .Values.prometheus.monitor.selector }}
+ {{- toYaml .Values.prometheus.monitor.selector | nindent 4 }}
+ {{- else }}
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- if .Values.isClusterService }}
@@ -28,6 +31,7 @@
{{- end }}
app.kubernetes.io/name: {{ template "coredns.name" . }}
app.kubernetes.io/component: metrics
+ {{- end }}
endpoints:
- port: metrics
{{- if .Values.prometheus.monitor.interval }}