mirror of https://git.rancher.io/charts
62 lines
3.3 KiB
Diff
62 lines
3.3 KiB
Diff
--- charts-original/templates/prometheus/prometheus.yaml
|
|
+++ charts/templates/prometheus/prometheus.yaml
|
|
@@ -32,7 +32,7 @@
|
|
{{ toYaml .Values.prometheus.prometheusSpec.apiserverConfig | indent 4}}
|
|
{{- end }}
|
|
{{- if .Values.prometheus.prometheusSpec.image }}
|
|
- image: {{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}
|
|
+ image: {{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}
|
|
version: {{ .Values.prometheus.prometheusSpec.image.tag }}
|
|
{{- if .Values.prometheus.prometheusSpec.image.sha }}
|
|
sha: {{ .Values.prometheus.prometheusSpec.image.sha }}
|
|
@@ -56,11 +56,16 @@
|
|
externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}"
|
|
{{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }}
|
|
externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}"
|
|
+{{- else if not (or (kindIs "invalid" .Values.global.cattle.url) (kindIs "invalid" .Values.global.cattle.clusterId)) }}
|
|
+ externalUrl: "{{ .Values.global.cattle.url }}/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ .Values.namespaceOverride }}/services/http:{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/proxy"
|
|
{{- else }}
|
|
externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}
|
|
{{- end }}
|
|
+{{- if .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
|
|
+ ignoreNamespaceSelectors: {{ .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
|
|
+{{- end }}
|
|
+ nodeSelector: {{ include "linux-node-selector" . | nindent 4 }}
|
|
{{- if .Values.prometheus.prometheusSpec.nodeSelector }}
|
|
- nodeSelector:
|
|
{{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }}
|
|
{{- end }}
|
|
paused: {{ .Values.prometheus.prometheusSpec.paused }}
|
|
@@ -216,8 +221,8 @@
|
|
- {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]}
|
|
{{- end }}
|
|
{{- end }}
|
|
+ tolerations: {{ include "linux-node-tolerations" . | nindent 4 }}
|
|
{{- if .Values.prometheus.prometheusSpec.tolerations }}
|
|
- tolerations:
|
|
{{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }}
|
|
@@ -250,7 +255,7 @@
|
|
{{- end }}
|
|
{{- if .Values.prometheus.prometheusSpec.containers }}
|
|
containers:
|
|
-{{ toYaml .Values.prometheus.prometheusSpec.containers | indent 4 }}
|
|
+{{ tpl .Values.prometheus.prometheusSpec.containers $ | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.prometheus.prometheusSpec.initContainers }}
|
|
initContainers:
|
|
@@ -266,6 +271,7 @@
|
|
{{- if .Values.prometheus.prometheusSpec.disableCompaction }}
|
|
disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }}
|
|
{{- end }}
|
|
+{{- if .Values.prometheus.prometheusSpec.portName }}
|
|
portName: {{ .Values.prometheus.prometheusSpec.portName }}
|
|
{{- end }}
|
|
{{- if .Values.prometheus.prometheusSpec.volumes }}
|
|
@@ -310,3 +316,4 @@
|
|
{{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
|
|
allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
|
|
{{- end }}
|
|
+{{- end }}
|