{{- if .Values.controller.create -}}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "sealed-secrets.fullname" . }}
  namespace: {{ template "sealed-secrets.namespace" . }}
  labels:
    app.kubernetes.io/name: {{ template "sealed-secrets.name" . }}
    helm.sh/chart: {{ template "sealed-secrets.chart" . }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/version: {{ .Chart.AppVersion }}
spec:
  ports:
    - port: 8080
      targetPort: 8080
  selector:
    app.kubernetes.io/name: {{ template "sealed-secrets.name" . }}
  type: ClusterIP
{{- end }}
