26 lines
830 B
YAML
26 lines
830 B
YAML
{{- if .Values.networkCosts }}
|
|
{{- if .Values.networkCosts.enabled }}
|
|
{{- if .Values.networkCosts.prometheusScrape }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "cost-analyzer.networkCostsName" . }}
|
|
annotations:
|
|
prometheus.io/scrape: "{{ .Values.networkCosts.prometheusScrape }}"
|
|
prometheus.io/port: {{ (quote .Values.networkCosts.port) | default (quote 3001) }}
|
|
labels:
|
|
app: {{ template "cost-analyzer.networkCostsName" . -}}
|
|
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
|
|
spec:
|
|
clusterIP: None
|
|
ports:
|
|
- name: metrics
|
|
port: {{ .Values.networkCosts.port | default 3001 }}
|
|
protocol: TCP
|
|
targetPort: {{ .Values.networkCosts.port | default 3001 }}
|
|
selector:
|
|
app: {{ template "cost-analyzer.networkCostsName" . }}
|
|
type: ClusterIP
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |