Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/salesforce/kube-synthetic-scaler
- Owner: salesforce
- License: bsd-3-clause
- Created: 2020-10-16T17:17:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T23:27:26.000Z (over 1 year ago)
- Last Synced: 2024-06-21T19:35:43.019Z (8 months ago)
- Topics: helm, k8s, kubernetes, webhooks
- Language: Go
- Homepage:
- Size: 5.47 MB
- Stars: 14
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
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
```