|
| 1 | +schema IngressRule: |
| 2 | + """ IngressRule represents the rules mapping the paths under a specified host to the related backend services. |
| 3 | + Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. |
| 4 | +
|
| 5 | + Attributes |
| 6 | + ---------- |
| 7 | + host: str, default is Undefined, optional. |
| 8 | + Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations |
| 9 | + from the "host" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can |
| 10 | + only apply to the IP in the Spec of the parent Ingress. 2. The : delimiter is not respected because ports are not |
| 11 | + allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in |
| 12 | + the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, |
| 13 | + the Ingress routes all traffic based on the specified IngressRuleValue. |
| 14 | + Host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") |
| 15 | + or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. ".foo.com"). The wildcard |
| 16 | + character '' must appear by itself as the first DNS label and matches only a single label. You cannot have a |
| 17 | + wildcard label by itself (e.g. Host == "*"). Requests will be matched against the Host field in the following |
| 18 | + way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is |
| 19 | + a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the |
| 20 | + first label) of the wildcard rule. |
| 21 | + http: HTTPIngressRuleValue, default is Undefined, optional. |
| 22 | + HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where |
| 23 | + parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' |
| 24 | + and before the first '?' or '#'. |
| 25 | + """ |
| 26 | + |
| 27 | + # Host is the fully qualified domain name of a network host, as defined by RFC 3986. |
| 28 | + host?: str |
| 29 | + |
| 30 | + # HTTPIngressRuleValue is a list of http selectors pointing to backends. |
| 31 | + http?: HTTPIngressRuleValue |
| 32 | + |
| 33 | + |
| 34 | +schema HTTPIngressRuleValue: |
| 35 | + """ HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: |
| 36 | + http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will |
| 37 | + be used to match against everything after the last '/' and before the first '?' or '#'. |
| 38 | +
|
| 39 | + Attributes |
| 40 | + ---------- |
| 41 | + paths: [HTTPIngressPath], default is Undefined, required. |
| 42 | + Paths is a collection of paths that map requests to backends. |
| 43 | + """ |
| 44 | + |
| 45 | + # Paths is a collection of paths that map requests to backends. |
| 46 | + paths: [HTTPIngressPath] |
| 47 | + |
| 48 | + |
| 49 | +schema HTTPIngressPath: |
| 50 | + """ HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. |
| 51 | +
|
| 52 | + Attributes |
| 53 | + ---------- |
| 54 | + backend: IngressBackend, default is Undefined, required. |
| 55 | + Backend defines the referenced service endpoint to which the traffic will be forwarded to. |
| 56 | + pathType: str, default is Undefined, required. |
| 57 | + PathType determines the interpretation of the path matching. PathType can be one of the following values: |
| 58 | + * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is |
| 59 | + done on a path element by element basis. A path element refers is the list of labels in the path split by the '/' |
| 60 | + separator. A request is a match for path p if every p is an element-wise prefix of p of the request path. Note |
| 61 | + that if the last element of the path is a substring of the last element in request path, it is not a match |
| 62 | + (e.g. /foo/bar matches /foo/bar/baz, but does not match /foo/barbaz). |
| 63 | + ImplementationSpecific: Interpretation of the Path matching is up to the IngressClass. Implementations can treat |
| 64 | + this as a separate PathType or treat it identically to Prefix or Exact path types. Implementations are required |
| 65 | + to support all path types. |
| 66 | + path: str, default is Undefined, optional. |
| 67 | + Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the |
| 68 | + conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when |
| 69 | + using PathType with value "Exact" or "Prefix". |
| 70 | + """ |
| 71 | + |
| 72 | + # Backend defines the referenced service endpoint to which the traffic will be forwarded to. |
| 73 | + backend: IngressBackend |
| 74 | + |
| 75 | + # PathType determines the interpretation of the path matching. |
| 76 | + pathType: str |
| 77 | + |
| 78 | + # Path is matched against the path of an incoming request. |
| 79 | + path?: str |
| 80 | + |
| 81 | + check: |
| 82 | + pathType in ["Exact", "Prefix", "ImplementationSpecific"] if pathType, "pathType value is invalid" |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
0 commit comments