mirror of https://git.rancher.io/charts
29 lines
1.2 KiB
YAML
29 lines
1.2 KiB
YAML
{{- if and .Values.prometheus.enabled .Values.prometheus.thanosServiceExternal.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-external
|
|
namespace: {{ template "kube-prometheus-stack.namespace" . }}
|
|
labels:
|
|
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
|
|
{{- if .Values.prometheus.thanosServiceExternal.labels }}
|
|
{{ toYaml .Values.prometheus.thanosServiceExternal.labels | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.prometheus.thanosServiceExternal.annotations }}
|
|
annotations:
|
|
{{ toYaml .Values.prometheus.thanosServiceExternal.annotations | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.prometheus.thanosServiceExternal.type }}
|
|
ports:
|
|
- name: {{ .Values.prometheus.thanosServiceExternal.portName }}
|
|
port: {{ .Values.prometheus.thanosServiceExternal.port }}
|
|
targetPort: {{ .Values.prometheus.thanosServiceExternal.targetPort }}
|
|
{{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }}
|
|
nodePort: {{ .Values.prometheus.thanosServiceExternal.nodePort }}
|
|
{{- end }}
|
|
selector:
|
|
app.kubernetes.io/name: prometheus
|
|
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
|
|
{{- end }}
|