---
apiVersion: v1
kind: Service
metadata:
  name: "{{ ansible_operator_meta.name }}-api-svc"
  namespace: "{{ ansible_operator_meta.namespace }}"
  labels:
    app.kubernetes.io/name: '{{ deployment_type }}-api'
    app.kubernetes.io/instance: '{{ deployment_type }}-api-{{ ansible_operator_meta.name }}'
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: '{{ deployment_type }}'
    app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
spec:
  selector:
    app.kubernetes.io/name: '{{ deployment_type }}-api'
    app.kubernetes.io/instance: '{{ deployment_type }}-api-{{ ansible_operator_meta.name }}'
    app.kubernetes.io/component: api
    app.kubernetes.io/part-of: '{{ deployment_type }}'
    app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
  ports:
    - protocol: TCP
      targetPort: 24817
      name: api-24817
      port: 24817
