Skip to content

The repo includes a set of Vertical Pod Autoscaler (VPA) recommenders pluggable with the default VPA on OpenShift.

License

Notifications You must be signed in to change notification settings

soxhub/predictive-vpa-recommenders-archived

 
 

Repository files navigation

predictive-vpa-recommenders

The repo includes a set of Vertical Pod Autoscaler (VPA) recommenders pluggable with the default VPA on OpenShift 4.11+.

Prerequisites

Installation

Install on OpenShift 4.11+

  1. Install the VPA Operator from OperatorHub alt text

  2. Create an example workload and its VPA cr that uses default recommender.

oc apply -f manifests/examples/test-periodic-recommender.yaml
  1. Create a same workload managed by a VPA CR that uses the predictive recommender.
oc apply -f manifests/examples/pando-test-periodic-recommender.yaml
  1. Create a SA and corresponding rolebindings for the recommender to access the metrics.
oc apply -f manifests/openshift/recommender-sa.yaml
  1. Grant the recommender SA the permission to access the metrics.
oc adm policy add-cluster-role-to-user cluster-monitoring-view -z predictive-recommender -n openshift-vertical-pod-autoscaler
  1. Obtain the thanos-querier service to allow prometheus data access for the predictive VPA recommender.
PROM_SECRET=`oc get secret -n openshift-vertical-pod-autoscaler | grep  predictive-recommender-token | head -n 1 | awk '{print $1 }'`
PROM_TOKEN=`echo $(oc get secret $PROM_SECRET -n openshift-vertical-pod-autoscaler -o json | jq -r '.data.token') | base64 -d`
PROM_HOST=`oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host'`

Replace the PROM_TOKEN and PROM_HOST with their values in manifests/openshift/pando-recommender.yaml. Then, replace the ${DEFAULT_NAMESPACE} by default or any other namespace where the VPA is deployed.

  1. Deploy the predictive VPA recommender
oc create -f manifests/openshift/pando-recommender.yaml

Install on Kubernetes 1.22+

About

The repo includes a set of Vertical Pod Autoscaler (VPA) recommenders pluggable with the default VPA on OpenShift.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Dockerfile 0.5%