{{- if .Values.apiServerService.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "freeleaps-secret-operator.fullname" . }}-vault-service
  labels:
    {{- include "freeleaps-secret-operator.labels" . | nindent 4 }}
spec:
  type: {{ .Values.apiServerService.service.type }}
  ports:
    - port: {{ .Values.apiServerService.service.port }}
      targetPort: {{ .Values.operator.apiServerPort }}
      protocol: TCP
      name: api
  selector:
    {{- include "freeleaps-secret-operator.selectorLabels" . | nindent 4 }}
{{- end }}
