Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/salesforce/kube-synthetic-scaler

Synthetic Testing Framework for Continuous Monitoring of Kubernetes Mutating Webhooks
https://github.com/salesforce/kube-synthetic-scaler

helm k8s kubernetes webhooks

Last synced: 3 months ago
JSON representation

Synthetic Testing Framework for Continuous Monitoring of Kubernetes Mutating Webhooks

Awesome Lists containing this project

README

        

# kube-synthetic-scaler

![Main Branch Build Status](https://github.com/salesforce/kube-synthetic-scaler/actions/workflows/docker-image.yaml/badge.svg)

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](https://kubernetes.io/docs/tasks/tools/) and [Helm](https://helm.sh/docs/intro/install/) installed. For building and testing Docker images locally, ensure you have [Docker](https://docs.docker.com/get-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](https://hub.docker.com/r/salesforce/kube-synthetic-scaler):
```
helm upgrade --install kube-synthetic-scaler helm/kube-synthetic-scaler --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 `
- To build a local Docker image (defaulting to the "salesforce/kube-synthetic-scaler:latest" tag) for testing code changes, simply run:
```
make docker-build
```