Ingress
Reference for the humanitec/ingress driver
Property
Description
Resource Type
ingress
Account Type
None

Inputs

Values

Name
Type
Description
api_version
string
[Optional] The API version of the ingress object to produce. Must be one of v1beta1 or v1 . Defaults to v1
class
string
[Optional] The ingress controller class. Will be inserted as an annotation or in the ingressClassName property depending on api_version.
annotations
object
[Optional] An object with values of type string that will be inserted as annotations on the generated Ingress object.
labels
object
[Optional] An object with values of type string that will be inserted as labels on the generated Ingress object.
no_tls
boolean
[Optional] Does not generate a TLS section even if a tls_secret_name is supplied. Useful if TLS termination happens on the Load Balancer.
tls_secret_name
string
[Optional] Overrides the Humanitec provided secret. Useful if secrets are injected by another mechanism e.g. Cert Manager or Rancher.

Secrets

None

Notes

If class is omitted, then the generated ingress object will not have an ingress class defined. See Default Ingress Class in the Kubernetes documentation for possible behaviours.

Example

To create a resource definition that adds NGINX specific annotations to generated ingress objects in the development environment type:
1
curl https://api.humanitec.io/orgs/${HUMANITEC_ORG}/resources/defs \
2
-X POST \
3
-H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
4
-H "Content-Type: application/json" \
5
--data-binary '
6
{
7
"id": "custom-ingress",
8
"name": "Custom Ingress",
9
"type": "ingress",
10
"criteria": [
11
{
12
"env_type": "development"
13
}
14
],
15
"driver_type": "humanitec/ingress",
16
"driver_inputs": {
17
"values": {
18
"api_version": "v1",
19
"class": "nginx",
20
"annotations": {
21
"nginx.ingress.kubernetes.io/rewrite-target": "/$2",
22
"nginx.ingress.kubernetes.io/cors-allow-headers": "Keep-Alive,Authorization"
23
}
24
}
25
}
26
}'
Copied!
Last modified 1mo ago