[prometheus-adapter] Template prometheus.url & rename files (#205)

- Template `prometheus.url` to allow it to contain dynamic variables like release name
- Remove `custom-metrics` from the file name of template files that are not custom metrics API specific

Signed-off-by: Steven Sheehy <steven.sheehy@hedera.com>
This commit is contained in:
Steven Sheehy
2020-12-02 10:14:54 -06:00
committed by GitHub
parent fdabb4c843
commit 88f225679c
14 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus-adapter
version: 2.7.1
version: 2.7.2
appVersion: v0.7.0
description: A Helm chart for k8s prometheus adapter
home: https://github.com/DirectXMan12/k8s-prometheus-adapter
@@ -26,7 +26,7 @@ spec:
{{- end }}
name: {{ template "k8s-prometheus-adapter.name" . }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/custom-metrics-configmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
@@ -48,7 +48,7 @@ spec:
{{- end }}
- --cert-dir=/tmp/cert
- --logtostderr=true
- --prometheus-url={{ .Values.prometheus.url }}{{ if .Values.prometheus.port }}:{{ .Values.prometheus.port }}{{end}}{{ .Values.prometheus.path }}
- --prometheus-url={{ tpl .Values.prometheus.url . }}{{ if .Values.prometheus.port }}:{{ .Values.prometheus.port }}{{end}}{{ .Values.prometheus.path }}
- --metrics-relist-interval={{ .Values.metricsRelistInterval }}
- --v={{ .Values.logLevel }}
- --config=/etc/adapter/config.yaml
+1
View File
@@ -18,6 +18,7 @@ priorityClassName: ""
# Url to access prometheus
prometheus:
# Value is templated
url: http://prometheus.default.svc
port: 9090
path: ""