README
¶
scheduled-scaler

This is a Kubernetes operator for scheduled scaling of deployments.
Status: Alpha. Specification may change.
Getting Started
Deploy
You can deploy the resources from deploy/scheduled-scaler.yaml
.
kubectl apply -f https://raw.githubusercontent.com/int128/scheduled-scaler/master/deploy/scheduled-scaler.yaml
Create a scaler
This tutorial shows how you can schedule a scaling of a deployment.
Deploy an echoserver by applying echoserver.yaml.
kubectl apply -f echoserver.yaml
Create echoserver-daytime.yaml
with the following content.
apiVersion: scheduledscaling.int128.github.io/v1
kind: ScheduledPodScaler
metadata:
name: echoserver-daytime
spec:
scaleTarget:
selectors:
app: echoserver
schedule:
- daily:
startTime: 21:00:00
endTime: 07:00:00
timezone: Asia/Tokyo
spec:
replicas: 0
default:
replicas: 1
Note that the timestamps are in UTC.
Apply the resource.
kubectl apply -f echoserver-daytime.yaml
Make sure the replicas of the deployment is the desired state.
kubectl -n echoserver get deployment
Development
# Deploy the image to the kind cluster
make docker-load-kind
make deploy
# Undeploy from the kind cluster
make undeploy
Contributions
This is an open source software. Feel free to open issues and pull requests.
Documentation
¶
There is no documentation for this package.
Directories
¶
Path | Synopsis |
---|---|
api
|
|
v1
Package v1 contains API Schema definitions for the scheduledscaling v1 API group +kubebuilder:object:generate=true +groupName=scheduledscaling.int128.github.io
|
Package v1 contains API Schema definitions for the scheduledscaling v1 API group +kubebuilder:object:generate=true +groupName=scheduledscaling.int128.github.io |
pkg
|
|
repositories/deployment/mock_deployment
Package mock_deployment is a generated GoMock package.
|
Package mock_deployment is a generated GoMock package. |
repositories/scheduledpodscaler/mock_scheduledpodscaler
Package mock_scheduledpodscaler is a generated GoMock package.
|
Package mock_scheduledpodscaler is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.