Configure Controller Policy
This doc shows you how to configure a basic controller policy that manages an application. There are many policy knobs not covered by this document. To see a full specification of everything you can configure, check out the Controller Policies reference.
Make sure you have the following environment variables set.
|The k8s name of your application's Deployment or StatefulSet|
|The k8s namespace your application is deployed into.|
Defining and Deploying A Policy
You specify a policy as a k8s Custom Resource. To define an example policy that tries to ensure your application's processing latency is kept under 1 minute, run:
$ echo "apiVersion: \"application.responsive.dev/v1\"
- type: EXPECTED_LATENCY
- type: THREAD_SATURATION
" >> policy.yaml
Then, to apply the policy:
$ kubectl apply -f policy.yaml