Skip to content

Commit 4bb3943

Browse files
committed
DOC/MINOR: update ingress eligibility rules in documentation
1 parent 089e252 commit 4bb3943

File tree

1 file changed

+50
-8
lines changed

1 file changed

+50
-8
lines changed

documentation/ingressclass.md

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,54 @@ spec:
6666
```
6767
In this case only HAProxy Ingress Controllers with `--ingress.class` set to "haproxy" are going to implement the previous Ingress object.
6868

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.
112+
- **Accept** Ingress resource with:
113+
- no `ingress.class` annotation
114+
- no `ingressClassName` field.
115+
- a "matching default IngressClass"
116+
- **Accept** Ingress resource with:
117+
- no `ingress.class` annotation
118+
- a "matching IngressClass"
77119
- **Ignore** Ingress resource otherwise.

0 commit comments

Comments
 (0)