forked from prometheus-community/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from junotx/node-exporter
[prometheus-node-exporter] support to use global.imageRegistry and global.nodeSelector for process-exporter and calico-exporter
- Loading branch information
Showing
12 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
charts/prometheus-node-exporter/charts/calico-exporter/templates/_images.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- define "calico-exporter.common.image" -}} | ||
{{- if .Values.image.digest }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- else if .Values.registry }} | ||
{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- else }} | ||
{{- printf "%s:%s@%s" .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- end }} | ||
{{- else }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.image.repository .Values.image.tag }} | ||
{{- else if .Values.registry }} | ||
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository .Values.image.tag }} | ||
{{- else }} | ||
{{- printf "%s:%s" .Values.image.repository .Values.image.tag }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "calico-exporter.kubeRbacProxy.image" }} | ||
{{- $imageDict := dict "Values" (dict "image" .Values.kubeRbacProxy.image "global" .Values.global) }} | ||
{{- include "calico-exporter.common.image" $imageDict }} | ||
{{- end }} | ||
|
||
{{- define "calico-exporter.imagePullSecrets" -}} | ||
{{- if .Values.imagePullSecrets }} | ||
{{- toYaml .Values.imagePullSecrets }} | ||
{{- else if and .Values.global .Values.global.imagePullSecrets }} | ||
{{- toYaml .Values.global.imagePullSecrets }} | ||
{{- end }} | ||
{{- end -}} |
16 changes: 16 additions & 0 deletions
16
charts/prometheus-node-exporter/charts/calico-exporter/templates/_node-selector.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- define "calico-exporter.common.nodeSelectors.nodeSelector" -}} | ||
{{- if and .global .global.nodeSelector }} | ||
{{- $nodeSelector := .global.nodeSelector -}} | ||
{{- if .nodeSelector }} | ||
{{- $nodeSelector = merge .nodeSelector $nodeSelector -}} | ||
{{- end -}} | ||
{{- toYaml $nodeSelector }} | ||
{{- else }} | ||
{{- toYaml .nodeSelector }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- define "calico-exporter.nodeSelector" -}} | ||
{{- $_dict := (dict "nodeSelector" .Values.nodeSelector "global" .Values.global) }} | ||
{{- include "calico-exporter.common.nodeSelectors.nodeSelector" $_dict }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
charts/prometheus-node-exporter/charts/prometheus-process-exporter/templates/_images.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- define "prometheus-process-exporter.common.image" -}} | ||
{{- if .Values.image.digest }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- else if .Values.registry }} | ||
{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- else }} | ||
{{- printf "%s:%s@%s" .Values.image.repository .Values.image.tag .Values.image.digest }} | ||
{{- end }} | ||
{{- else }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.image.repository .Values.image.tag }} | ||
{{- else if .Values.registry }} | ||
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository .Values.image.tag }} | ||
{{- else }} | ||
{{- printf "%s:%s" .Values.image.repository .Values.image.tag }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters