---
# ClusterIP service targeting the consul server pods' HTTP API (8500).
# The HashiCorp chart only ships consul-ui (also 8500 via the server pods)
# and the headless consul-server; this named service gives the Gateway a
# stable API backend. Consul serves both the HTTP API and the UI (at /ui/)
# on this same port, so routing the API hostname here preserves the UI too.
apiVersion: v1
kind: Service
metadata:
  name: consul-http
  namespace: consul
  labels:
    app.kubernetes.io/name: consul
    app.kubernetes.io/instance: consul
spec:
  type: ClusterIP
  selector:
    app: consul
    component: server
    release: consul
  ports:
    - name: http
      port: 8500
      protocol: TCP
      targetPort: 8500
