Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion traefik/templates/ingressclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
{{- include "traefik.labels" . | nindent 4 }}
name: {{ .Values.ingressClass.name | default (include "traefik.fullname" .) }}
spec:
controller: traefik.io/ingress-controller
controller: {{ .Values.ingressClass.controller }}
{{- end -}}
21 changes: 21 additions & 0 deletions traefik/tests/ingressclass-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,24 @@ tests:
- equal:
path: metadata.name
value: nondefaultname
- it: should use default controller value
asserts:
- isKind:
of: IngressClass
- isAPIVersion:
of: networking.k8s.io/v1
- equal:
path: spec.controller
value: traefik.io/ingress-controller
- it: should be possible to provide a custom controller value
set:
ingressClass:
controller: traefik.io/ingress-controller-internal
asserts:
- isKind:
of: IngressClass
- isAPIVersion:
of: networking.k8s.io/v1
- equal:
path: spec.controller
value: traefik.io/ingress-controller-internal
5 changes: 5 additions & 0 deletions traefik/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,11 @@
},
"name": {
"type": "string"
},
"controller": {
"description": "The controller value for the IngressClass. This allows running multiple Traefik instances with different IngressClasses.",
"type": "string",
"default": "traefik.io/ingress-controller"
}
},
"additionalProperties": false
Expand Down
3 changes: 3 additions & 0 deletions traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ ingressClass: # @schema additionalProperties: false
enabled: true
isDefaultClass: true
name: ""
# -- The controller value for the IngressClass. This allows running multiple Traefik instances with different IngressClasses.
# @default -- `traefik.io/ingress-controller`
controller: traefik.io/ingress-controller

core: # @schema additionalProperties: false
# -- Can be used to use globally v2 router syntax. Deprecated since v3.4 /!\.
Expand Down
Loading