Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 5.3 KB

File metadata and controls

79 lines (53 loc) · 5.3 KB

Tutorial

Usage

Check out the project's github action "Build and Integrate". It has an example of building the docker image for the ingress controller. It also demonstrates the usage of the ingress controller throught integration tests. A Kubernetes cluster is setup with applications and ingress controller for them.

ConfigMap

The above also shows example of configuring Apache Traffic Server reloadable configurations using kubernetes configmap resource.

Namespaces for Ingresses

You can specifiy the list of namespaces to look for ingress object by providing an environment variable called INGRESS_NS. The default is all, which tells the controller to look for ingress objects in all namespaces. Alternatively you can provide a comma-separated list of namespaces for the controller to look for ingresses. Similarly you can specifiy a comma-separated list of namespaces to ignore while the controller is looking for ingresses by providing INGRESS_IGNORE_NS.

Snippet

You can attach ATS lua script to an ingress object and ATS will execute it for requests matching the routing rules defined in the ingress object. This can be enabled by providing an environment variable called SNIPPET in the deployment.

Ingress Class

You can provide an environment variable called INGRESS_CLASS in the deployment to specify the ingress class. The above contains an example commented out in the deployment yaml file. Only ingress object with parameter ingressClassName in spec section with value equal to the environment variable value will be used by ATS for routing.

Customizing Logging and TLS

You can specify a different logging.yaml and sni.yaml by providing environment variable LOG_CONFIG_FNAME and SSL_SERVERNAME_FNAME respsectively. The new contents of them can be provided through a ConfigMap and loaded to a volume mounted for the ATS container (Example here ). Similarly certificates needed for the connection between ATS and origin can be provided through a Secret that loaded to a volume mounted for the ATS container as well (Example here ). To refresh these certificates we may need to override the entrypoint with our own command and add extra script to watch for changes in those secret in order to reload ATS (Example here ).

Customizing Plugins

You can specify extra plugins for plugin.config by providing environment variable EXTRA_PLUGIN_FNAME. Its contents can be provided through a ConfigMap and loaded to a volume mounted for the ATS container (Example here ).

Enabling Controller Debug Log

You can enable debug for the controller by providing environment variable INGRESS_DEBUG.

Resync Period of Controller

You can adjust the resync period for the controller by providing environment variable RESYNC_PRIOD.

Integrating with Fluentd and Prometheus

Fluentd can be used to capture the traffic server access logs. Prometheus can be used to capture metrics. Please checkout the below projects for examples.

Helm Chart

An example of Helm Chart is provided here and is unsupported for now