apiVersion: v1
kind: Service
metadata:
  name: {{ include "certctl.fullname" . }}-server
  labels:
    {{- include "certctl.labels" . | nindent 4 }}
    app.kubernetes.io/component: server
  {{- with .Values.server.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.server.service.type }}
  ports:
    - port: {{ .Values.server.service.port }}
      targetPort: https
      protocol: TCP
      name: https
  selector:
    {{- include "certctl.serverSelectorLabels" . | nindent 4 }}
