Ingress

Reference for the humanitec/ingress driver

This generates Kubernetes Ingress objects.

Property

Description

Resource Type

ingress

Account Type

local

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.

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:

curl https://api.humanitec.io/orgs/my-org/resources/dynamic \
-X POST \
-H "Authorization: Bearer $HUMANITEC_TOKEN" \
-H "Content-Type: application/json" \
--data-binary '
{
"id": "custom-ingress",
"name": "Custom Ingress",
"type": "ingress",
"criteria": [
{
"env_type": "development"
}
],
"driver_type": "humanitec/ingress",
"driver_params": {
"values": {
"api_version": "v1",
"class": "nginx",
"annotations": {
"nginx.ingress.kubernetes.io/rewrite-target": "/$2",
"nginx.ingress.kubernetes.io/cors-allow-headers": "Keep-Alive,Authorization"
}
}
}
}'