ceph-csi/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml
wilmardo afda225d75 refactor: Merge 1.13 and 1.14 Helm charts and improve charts
Signed-off-by: wilmardo <info@wilmardenouden.nl>
2019-09-26 12:17:00 +02:00

42 lines
1.6 KiB
YAML

{{- if .Values.provisioner.grpcMetrics.service.enabled -}}
apiVersion: v1
kind: Service
metadata:
{{- if .Values.provisioner.grpcMetrics.service.annotations }}
annotations:
{{ toYaml .Values.provisioner.grpcMetrics.service.annotations | indent 4 }}
{{- end }}
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-grpc-metrics
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.provisioner.grpcMetrics.service.clusterIP }}
clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}"
{{- end }}
{{- if .Values.provisioner.grpcMetrics.service.externalIPs }}
externalIPs:
{{ toYaml .Values.provisioner.grpcMetrics.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.provisioner.grpcMetrics.service.loadBalancerIP }}
loadBalancerIP: "{{ .Values.provisioner.grpcMetrics.service.loadBalancerIP }}"
{{- end }}
{{- if .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
ports:
- name: grpc-metrics
port: {{ .Values.provisioner.grpcMetrics.service.servicePort }}
targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
type: "{{ .Values.provisioner.grpcMetrics.service.type }}"
{{- end -}}