Skip to content

Commit

Permalink
feat: make IngressClass creation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sdd-el committed Jan 29, 2025
1 parent c52d29d commit 08c6099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/apisix-ingress-controller/templates/ingress-class.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.config.kubernetes.createIngressClass }}
{{ 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")}}
Expand All @@ -10,3 +11,4 @@ metadata:
name: {{ .Values.config.kubernetes.ingressClass | quote }}
spec:
controller: apisix.apache.org/apisix-ingress # fix: https://github.com/apache/apisix-ingress-controller/issues/1653
{{- end }}
2 changes: 2 additions & 0 deletions charts/apisix-ingress-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ config:
# only the leader will watch and delivery resource changes,
# other instances (as candidates) stand by.
electionId: "ingress-apisix-leader"
# Set to false to disable IngressClass creation
createIngressClass: true
# -- The class of an Ingress object is set using the field IngressClassName in
# Kubernetes clusters version v1.18.0 or higher or the annotation
# "kubernetes.io/ingress.class" (deprecated).
Expand Down

0 comments on commit 08c6099

Please sign in to comment.