mirror of https://git.rancher.io/charts
120 lines
5.9 KiB
Diff
120 lines
5.9 KiB
Diff
--- charts-original/templates/_pod.tpl
|
|
+++ charts/templates/_pod.tpl
|
|
@@ -1,4 +1,3 @@
|
|
-
|
|
{{- define "grafana.pod" -}}
|
|
{{- if .Values.schedulerName }}
|
|
schedulerName: "{{ .Values.schedulerName }}"
|
|
@@ -21,9 +20,9 @@
|
|
{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }}
|
|
- name: init-chown-data
|
|
{{- if .Values.initChownData.image.sha }}
|
|
- image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}@sha256:{{ .Values.initChownData.image.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}@sha256:{{ .Values.initChownData.image.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }}
|
|
securityContext:
|
|
@@ -42,9 +41,9 @@
|
|
{{- if .Values.dashboards }}
|
|
- name: download-dashboards
|
|
{{- if .Values.downloadDashboardsImage.sha }}
|
|
- image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}@sha256:{{ .Values.downloadDashboardsImage.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}@sha256:{{ .Values.downloadDashboardsImage.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }}
|
|
command: ["/bin/sh"]
|
|
@@ -79,11 +78,16 @@
|
|
{{- if .Values.sidecar.datasources.enabled }}
|
|
- name: {{ template "grafana.name" . }}-sc-datasources
|
|
{{- if .Values.sidecar.image.sha }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
|
|
+ {{- if .Values.sidecar.datasources.envFromSecret }}
|
|
+ envFrom:
|
|
+ - secretRef:
|
|
+ name: {{ tpl .Values.sidecar.datasources.envFromSecret . }}
|
|
+ {{- end }}
|
|
env:
|
|
- name: METHOD
|
|
value: LIST
|
|
@@ -118,9 +122,9 @@
|
|
{{- if .Values.sidecar.notifiers.enabled }}
|
|
- name: {{ template "grafana.name" . }}-sc-notifiers
|
|
{{- if .Values.sidecar.image.sha }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
|
|
env:
|
|
@@ -163,9 +167,9 @@
|
|
{{- if .Values.sidecar.dashboards.enabled }}
|
|
- name: {{ template "grafana.name" . }}-sc-dashboard
|
|
{{- if .Values.sidecar.image.sha }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
|
|
env:
|
|
@@ -205,9 +209,9 @@
|
|
{{- end}}
|
|
- name: {{ .Chart.Name }}
|
|
{{- if .Values.image.sha }}
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}@sha256:{{ .Values.image.sha }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}@sha256:{{ .Values.image.sha }}"
|
|
{{- else }}
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
+ image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- if .Values.command }}
|
|
@@ -307,7 +311,7 @@
|
|
{{- end }}
|
|
ports:
|
|
- name: {{ .Values.service.portName }}
|
|
- containerPort: {{ .Values.service.port }}
|
|
+ containerPort: {{ .Values.service.targetPort }}
|
|
protocol: TCP
|
|
- name: {{ .Values.podPortName }}
|
|
containerPort: 3000
|
|
@@ -388,17 +392,17 @@
|
|
{{- with .Values.extraContainers }}
|
|
{{ tpl . $ | indent 2 }}
|
|
{{- end }}
|
|
-{{- with .Values.nodeSelector }}
|
|
-nodeSelector:
|
|
-{{ toYaml . | indent 2 }}
|
|
+nodeSelector: {{ include "linux-node-selector" . | nindent 2 }}
|
|
+{{- if .Values.nodeSelector }}
|
|
+{{ toYaml .Values.nodeSelector | indent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 2 }}
|
|
{{- end }}
|
|
-{{- with .Values.tolerations }}
|
|
-tolerations:
|
|
-{{ toYaml . | indent 2 }}
|
|
+tolerations: {{ include "linux-node-tolerations" . | nindent 2 }}
|
|
+{{- if .Values.tolerations }}
|
|
+{{ toYaml .Values.tolerations | indent 2 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: config
|