Giter VIP home page Giter VIP logo

vertical-pod-autoscaler-operator's Introduction

Vertical Pod Autoscaler Operator

The vertical-pod-autoscaler-operator manages deployments and configurations of the OpenShift Vertical Pod Autoscaler's three controllers. The three controllers are:

  • Recommender, which monitors the current and past resource consumption and provides recommended values for containers' CPU and memory requests.
  • Admission Plugin, which sets the correct resource requests on new pods using data from the Recommender. The recommended request values will be applied to new pods which are being restarted (after an eviction by the Updater) or by any other pod restart.
  • Updater, which checks which of the managed pods have incorrect resources set, and evicts any it finds so that the pods can be recreated by their controllers with the updated resource requests.

Custom Resource Definitions

The operator manages the following custom resource:

  • VerticalPodAutoscalerController: This is a singleton resource which controls the configuration of the cluster's VPA 3 controller instances. The operator will only respond to the VerticalPodAutoscalerController resource named "default" in the managed namespace, i.e. the value of the WATCH_NAMESPACE environment variable. (Example)

    Many of fields in the spec for VerticalPodAutoscalerController resources correspond to command-line arguments of the three VPA controllers and also control which controllers should be run. The example linked above results in the following invocation:

      Command:
        recommender
      Args:
        --safetyMarginFraction=0.15
        --podMinCPUMillicores=25
        --podMinMemoryMb=250
    
      Command:
        admission-plugin
    
      Command:
        updater
    

Development

## Build, Test, & Run
$ make build
$ make test

$ export WATCH_NAMESPACE=openshift-vertical-pod-autoscaler
$ ./bin/vertical-pod-autoscaler-operator -alsologtostderr

The Vertical Pod Autoscaler Operator is designed to be deployed on OpenShift by the Cluster Version Operator, but it's possible to run it directly on any vanilla Kubernetes cluster. To do so, apply the manifests in the install directory: kubectl apply -f ./install

This will create the openshift-vertical-pod-autoscaler namespace, register the custom resource definitions, configure RBAC policies, and create a deployment for the operator.

End-to-End Tests

You can run the e2e test suite with make test-e2e. These tests assume the presence of a cluster not already running the operator, and that the KUBECONFIG environment variable points to a configuration granting admin rights on said cluster.

vertical-pod-autoscaler-operator's People

Contributors

joelsmith avatar openshift-merge-robot avatar sosiouxme avatar sjenning avatar yselkowitz avatar openshift-bot avatar jwforres avatar thrasher-redhat avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.