This article provides instructions to create AutoStopping rules for Kubernetes with the Ambassador ingress controller.
Make sure to meet the following prerequisites before you create an AutoStopping rule for Ambassador.
- Make sure you are running at the least version 1.0.5 of
autostopping-controllerin your Kubernetes cluster.
- Ambassador mapping is configured and is routing traffic to the service as expected.
- You should have access to edit the Ambassador mapping.
Set up your cluster
Create an AutoStopping rule in your cluster, either through the Harness UI or by applying YAML directly on the cluster of the form:
After applying the YAML, an AutoStopping Rule is created in your cluster for service echo which is running on port 8080.
Changes in Ambassador Mapping
After Ambassador Mapping is added as a first class entity to AutoStopping, these changes will be automated.
After creating the AutoStopping Rule, make the following changes in your Ambassador Mapping:
Change the destination and add an extra request header:
After configuration, your ingressRoute looks like the following:
Now your traffic flows through the autostopping-router and the AutoStopping rule takes actions based on activity and inactivity.