# helm_charts_admission-service.yaml
{{- if and .Values.admissionService.create .Values.deployments.admissionController }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ template "admission-controller.service.name" . }}
  labels:
    app.kubernetes.io/name: {{ include "admission-controller.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "couchbase-operator.chart" . }}
spec:
  selector:
    app.kubernetes.io/name : {{ template "admission-controller.name" . }}
  ports:
  - protocol: TCP
    port: {{ .Values.admissionService.port }}
    targetPort: {{ .Values.admissionService.targetPort }}
{{- end }}