You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/ingressclass.md
+50-8Lines changed: 50 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,12 +66,54 @@ spec:
66
66
```
67
67
In this case only HAProxy Ingress Controllers with `--ingress.class` set to "haproxy" are going to implement the previous Ingress object.
68
68
69
-
## Eligibility rules
70
-
- If the `--ingress.class` argument of the controller is not configured:
71
-
- **Accept** Ingress resource when neither `ingress.class` annotation nor `ingressClassName` fields are set.
72
-
- **Accept** Ingress resource when `ingress.class` annotation is not set but `ingressClassName` field matches.
73
-
- If the `--ingress.class` argument of the controller is configured:
74
-
- **Accept** Ingress resource when neither `ingress.class` annotation nor `ingressClassName` fields are set but controller argument `--EmptyIngressClass` is enabled.
75
-
- **Accept** Ingress resource when --`ingress.class` argument is equal to `ingress.class` annotation.
76
-
- **Accept** Ingress resource when `ingressClassName` field matches.
69
+
## Ingress eligibility rules
70
+
71
+
### Inputs
72
+
73
+
#### Controller
74
+
- [`--ingress.class`](./controller.md#--ingressclass): CLI param of the Ingress Controller to select Ingress resources.
75
+
- [`--EmptyIngressClass`](./controller.md#--empty-ingress-class): CLI param of the Ingress Controller to select Ingress resources with ingress class config.
76
+
77
+
#### Ingress resource
78
+
- [`ingress.class`](https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation): annotation which can be set in the ingress resource.
79
+
- [`ingressClassName`](https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation): field in the ingress resource that reference a kubernetes IngressClass.
80
+
81
+
#### IngressClass resource
82
+
- [`is-default-class`](https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class): annotation in ingressClass resource.
83
+
- [`controller`](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class): field in the ingressClass resource.
84
+
85
+
### Prerequisites
86
+
A **matching default IngressClass** is true when a **valid IngressClass** resource is available in the cluster and its `is-default-class` annotation is enabled.
87
+
A **matching IngressClass** is true when the `ingressClassName` field of an Ingress resource points to a **valid IngressClass**.
88
+
A **valid IngressClass** is true when the `controller` field of the IngressClass is equal to:
89
+
- "*haproxy.org/ingress-controller*"if `--ingress.class` argument is empty
90
+
- "*haproxy.org/ingress-controller/<--ingress.class value>*"if `--ingress.class` argument is not empty.
91
+
92
+
### Rules
93
+
- If the `--ingress.class` controller param is not set (empty):
94
+
- **Accept** Ingress resource with:
95
+
- no `ingress.class` annotation
96
+
- no `ingressClassName` field.
97
+
- no IngressClass resource with `is-default-class` enabled.
98
+
- **Accept** Ingress resource with:
99
+
- no `ingress.class` annotation
100
+
- no `ingressClassName` field.
101
+
- a "matching default IngressClass"
102
+
- **Accept** Ingress resource with:
103
+
- no `ingress.class` annotation
104
+
- a "matching IngressClass"
105
+
- If the `--ingress.class` controller param is set (not empty):
106
+
- **Accept** Ingress resource with:
107
+
- an `ingress.class` annotation equal to the `--ingress.class` argument.
108
+
- **Accept** Ingress resource with:
109
+
- no `ingress.class` annotation
110
+
- no `ingressClassName` field.
111
+
- `--EmptyIngressClass` controller param is enabled.
0 commit comments