{{ if or (eq .Values.config.kubernetes.ingressVersion "") (eq .Values.config.kubernetes.ingressVersion "networking/v1")}}
apiVersion: networking.k8s.io/v1
{{- else if (eq .Values.config.kubernetes.ingressVersion "networking/v1beta1")}}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: {{ .Values.config.kubernetes.ingressVersion }}
{{- end }}
kind: IngressClass
metadata:
  name: {{ .Values.config.kubernetes.ingressClass | quote }}
spec:
  controller: apisix.apache.org/apisix-ingress # fix: https://github.com/apache/apisix-ingress-controller/issues/1653
