{{- $serviceType := .Values.service.type -}} apiVersion: v1 kind: Service metadata: name: {{ .Values.service.name }} labels: {{- include "pmm.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.service.finalizers }} finalizers: {{- toYaml . | nindent 8 }} {{- end }} spec: type: {{ $serviceType | default "ClusterIP" }} {{- with .Values.service.ports }} ports: {{- toYaml . | nindent 8 }} {{- end }} selector: {{- include "pmm.selectorLabels" . | nindent 4 }} {{- if .Values.ingress.enabled }} --- apiVersion: v1 kind: Service metadata: name: {{ .Values.service.name }}-grpc labels: {{- include "pmm.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.service.finalizers }} finalizers: {{- toYaml . | nindent 8 }} {{- end }} spec: type: {{ $serviceType | default "ClusterIP" }} {{- with .Values.service.ports }} ports: {{- toYaml . | nindent 8 }} {{- end }} selector: {{- include "pmm.selectorLabels" . | nindent 4 }} --- {{- end }}