mirror of https://git.rancher.io/rke2-charts
63 lines
2.5 KiB
Diff
63 lines
2.5 KiB
Diff
--- charts-original/templates/deployment.yaml
|
|
+++ charts/templates/deployment.yaml
|
|
@@ -9,7 +9,7 @@
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
|
{{- if .Values.isClusterService }}
|
|
- k8s-app: {{ .Chart.Name | quote }}
|
|
+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }}
|
|
kubernetes.io/cluster-service: "true"
|
|
kubernetes.io/name: "CoreDNS"
|
|
{{- end }}
|
|
@@ -31,14 +31,14 @@
|
|
matchLabels:
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
{{- if .Values.isClusterService }}
|
|
- k8s-app: {{ .Chart.Name | quote }}
|
|
+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }}
|
|
{{- end }}
|
|
app.kubernetes.io/name: {{ template "coredns.name" . }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- if .Values.isClusterService }}
|
|
- k8s-app: {{ .Chart.Name | quote }}
|
|
+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }}
|
|
{{- end }}
|
|
app.kubernetes.io/name: {{ template "coredns.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
@@ -49,7 +49,6 @@
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
{{- if .Values.isClusterService }}
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
|
- scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
|
|
{{- end }}
|
|
{{- if .Values.podAnnotations }}
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
@@ -69,9 +68,15 @@
|
|
affinity:
|
|
{{ toYaml .Values.affinity | indent 8 }}
|
|
{{- end }}
|
|
- {{- if .Values.tolerations }}
|
|
+ {{- if or (.Values.isClusterService) (.Values.tolerations) }}
|
|
tolerations:
|
|
+ {{- if .Values.isClusterService }}
|
|
+ - key: CriticalAddonsOnly
|
|
+ operator: Exists
|
|
+ {{- end }}
|
|
+ {{- if .Values.tolerations }}
|
|
{{ toYaml .Values.tolerations | indent 8 }}
|
|
+ {{- end }}
|
|
{{- end }}
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector:
|
|
@@ -79,7 +84,7 @@
|
|
{{- end }}
|
|
containers:
|
|
- name: "coredns"
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args: [ "-conf", "/etc/coredns/Corefile" ]
|
|
volumeMounts:
|