{{- if .Values.dbManager.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "katib.dbManager.serviceName" . }}
  namespace: {{ include "katib.namespace" . }}
  labels:
    {{- include "katib.dbManager.labels" . | nindent 4 }}
  {{- with .Values.dbManager.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.dbManager.service.type }}
  ports:
    - port: {{ .Values.dbManager.service.port }}
      protocol: TCP
      name: {{ .Values.dbManager.port.name }}
  selector:
    {{- include "katib.dbManager.selectorLabels" . | nindent 4 }}
{{- end }}