rancher-partner-charts/charts/kubecost/cost-analyzer/2.4.2/templates/aggregator-service.yaml

29 lines
801 B
YAML

{{- if not (eq (include "aggregator.deployMethod" .) "disabled") -}}
kind: Service
apiVersion: v1
metadata:
name: {{ template "aggregator.serviceName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "aggregator.commonLabels" . | nindent 4 }}
{{- if .Values.kubecostAggregator.service.labels }}
{{- toYaml .Values.kubecostAggregator.service.labels | nindent 4 }}
{{- end }}
spec:
selector:
{{ include "aggregator.selectorLabels" . | nindent 4 }}
type: "ClusterIP"
ports:
- name: tcp-api
port: 9004
targetPort: 9004
{{- if or .Values.saml.enabled .Values.oidc.enabled}}
- name: apiserver
port: 9008
targetPort: 9008
{{- end }}
{{- with .Values.kubecostAggregator.extraPorts }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}