{{- if .Values.controller.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "bp-openclaw.fullname" . }}-controller
  labels:
    {{- include "bp-openclaw.labels" . | nindent 4 }}
    catalyst.openova.io/component: controller
spec:
  type: {{ .Values.service.type }}
  ports:
    - name: http
      port: {{ .Values.service.port }}
      targetPort: {{ .Values.service.targetPort }}
      protocol: TCP
  selector:
    {{- include "bp-openclaw.selectorLabels" . | nindent 4 }}
    catalyst.openova.io/component: controller
{{- end }}
