apiVersion: v1
kind: Service
metadata:
  name: {{ include "karpenter.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "karpenter.labels" . | nindent 4 }}
  {{- with .Values.additionalAnnotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: ClusterIP
  ports:
    - name: http-metrics
      port: {{ .Values.controller.metrics.port }}
      targetPort: metrics
      protocol: TCP
  selector:
    {{- include "karpenter.selectorLabels" . | nindent 4 }}
