{{- if .Values.vault.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pipelines.vault.name" . }}
  labels:
    {{- include "pipelines.labels" . | nindent 4 }}
    component: {{ include "pipelines.vault.name" . }}
spec:
  type: ClusterIP
  ports:
    - name: http
      port: {{ .Values.vault.service.port }}
      targetPort: 30100
      protocol: TCP
    - name: server
      port: 30101
      protocol: TCP  
  selector:
    {{- include "pipelines.selectorLabels" . | nindent 4 }}
    component: {{ include "pipelines.vault.name" . }}
{{- end }}
