scheduled-scaler

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

scheduled-scaler CircleCI Docker Repository on Quay

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

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
pkg

Jump to

Keyboard shortcuts

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