Links

ingress

Reference for humanitec/ingress Workload Profile Feature
The ingress feature defines how the ingress routing should be configured for the workload. The schema is similar but not the same as the that of the IngressSpec object.

Description

The top level of the ingress feature only contains the property rules. This contains a map of DNS resource IDs to rule objects.
The resource IDs must be specified using the full ID - e.g. shared.api-dns or externals.www-dns.
As with the current IngressSpec object, only HTTP rules are supported. Therefore for each DNS resource key, there is a value of an object with a single property of http and a value of a map of HTTP rules.
The map of rules has keys of HTTP paths. These are interpreted based on the path type. Path types can be as follows:
Type
Description
Exact
Matches the URL path exactly.
Prefix
Matches based on a URL path prefix split by /.
ImplementationSpecific
Interpretation of the Path matching is up to the Ingress Controller
default
A Humanitec extension. Implies that all traffic is matched. This can be used with a path of *.
In practice, different Ingress Controllers can follow different behaviors to those described above. Check the documentation of your ingress controller.
The rule supports the following properties:
Property
Type
Description
port
Integer
The port on the associated service to direct traffic to. Must be in range 1 - 65535.
type
String
One of the types specified above.

Example

This example shows an ingress configuration for a workload that implements part of a shared API. It also exposes a diagnostic endpoint on a different DNS name.
{
"rules": {
"shared.api-dns": {
"http": {
"/customers": {
"port": 8080,
"type": "Prefix"
},
"/profiles": {
"port": 8080,
"type": "Prefix"
}
}
},
"externals.diagnostics-dns": {
"http": {
"*": {
"port": 14781,
"type": "default"
}
}
}
}
}
Last modified 1yr ago