{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    konghq.com/methods: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, TRACE
    konghq.com/protocols: http
  name: {{ include "cluster-proxy.fullname" . }}
  namespace: {{ .Release.Namespace }}
spec:
  ingressClassName: kong
  rules:
  - http:
      paths:
      - backend:
          service:
            name: {{ include "cluster-proxy.fullname" . }}
            port:
              number: 80
        path: /proxy
        pathType: Prefix
{{- end }}