apiVersion: v1
kind: Service
metadata:
  name: {{ template "kube-ops-view.fullname" . }}
{{- if .Values.service.annotations }}
  annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
spec:
  type: {{ .Values.service.type }}
  ports:
  - port: {{ .Values.service.externalPort }}
    targetPort: {{ .Values.service.internalPort }}
    protocol: TCP
  selector:
    app: {{ template "kube-ops-view.fullname" . }}
