kind: Service
apiVersion: v1
metadata:
  name: "{{ name }}"
  namespace: "{{ _amlen_namespace }}"
  labels:
    app: "{{ app_name }}"
spec:
  clusterIP: None
  selector:
    app: "{{ app_name }}"
  publishNotReadyAddresses: True
  ports:
{% for key, value in amlen_messaging_ports.items() %}
    - port: {{value.internal if value.__class__.__name__ == "dict" else value}}
      protocol: TCP
      name: "{{key}}"
{% endfor %}
{% for key, value in amlen_ha_ports.items() %}
    - port: {{ value }}
      protocol: TCP
      name: "{{key}}"
{% endfor %}
{% for key, value in amlen_service_ports.items() %}
    - port: {{value}}
      protocol: TCP
      name: "{{key}}"
{% endfor %}
