kube-synthetic-scaler

command module
v0.0.0-...-7750aa8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

README

kube-synthetic-scaler

Main Branch Build Status

This is a Kubernetes controller that scales deployments up and down.

How it Works

kube-synthetic-scaler is a controller that watches deployment objects for a ScalingSignalAnnotation and regularly scales deployments that have opted in down to 0 and back up to the original number of replicas at a specified interval. The interval defaults to the value set by the default-scaling-interval flag, unless configured separately by the deployment using the ScalingDurationAnnotation. It also sends a health check saying whether the scaling was successful or not.

This controller was originally created as part of a synthetic test framework to ensure that mutating webhooks are running and properly mutating new deployments. As such, dummy test deployments should be used with the scaler, rather than actual production deployments.

Setup

Make sure you have kubectl and Helm installed. For building and testing Docker images locally, ensure you have Docker installed.

To run locally

You can choose between several options for running kube-synthetic-scaler:

  • To run the Go binary locally on your kubeconfig's current context:

    make run
    
  • To install a Helm chart on your kubeconfig's current context using Helm 3 and the Docker Hub image:

    helm upgrade --install kube-synthetic-scaler helm/kube-synthetic-scaler --namespace <namespace>
    

    Note that this assumes the given namespace already exists within the cluster.

    To uninstall the kube-synthetic-scaler Helm chart afterwards, run helm uninstall kube-synthetic-scaler --namespace <namespace>

  • To build a local Docker image (defaulting to the "salesforce/kube-synthetic-scaler:latest" tag) for testing code changes, simply run:

    make docker-build
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL