Prometheus: use endpoints section and lookups to set port

This PS moves prometheus to use the endpoints section and lookups
to set the port it serves on.

Change-Id: Ifae665e21128dd566da5a68b9904a94a68df4018
This commit is contained in:
Steve Wilkerson 2018-03-05 10:11:08 -06:00
parent d681396412
commit 083f8fd8d6
3 changed files with 3 additions and 4 deletions

View File

@ -31,7 +31,7 @@ metadata:
spec:
ports:
- name: prom-metrics
port: {{ .Values.network.prometheus.port }}
port: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ if .Values.network.prometheus.node_port.enabled }}
nodePort: {{ .Values.network.prometheus.node_port.port }}
{{ end }}

View File

@ -121,11 +121,11 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.prometheus | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
ports:
- name: prom-metrics
containerPort: {{ .Values.network.prometheus.port }}
containerPort: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
httpGet:
path: /status
port: {{ .Values.network.prometheus.port }}
port: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 30
timeoutSeconds: 30
volumeMounts:

View File

@ -160,7 +160,6 @@ network:
node_port:
enabled: false
port: 30900
port: 9090
storage:
enabled: true