--- 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,13 @@ 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 }} + 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 }} @@ -232,8 +234,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 }} @@ -266,7 +268,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: @@ -282,6 +284,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 }} @@ -326,3 +329,4 @@ {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} {{- end }} +{{- end }}