sweeper

command module
v0.0.0-...-d9804f3 Latest Latest
Warning

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

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

README

sweeper

Sweeper

GoDoc


Sweeper is a tool to support developers organize the emphemeral environment on Kubernetes.

Concept

In many compnies, the environment of development is organized with the static environment, for example, we might have the following environment: dev, staging, prod. But as the time goes the static environment has some issues. To cover these issues, the ephemeral environment could be one of solutions.

The emphemeral envrionment contains two extra actions: one at the beginning, and one at the end, that spin up an environment for a purpose, and spin down an environment at the end. Sweeper is contained in the spin-down step, It cleans up selected resources after the TTL time. For example, if you apply a deployment and a service, which is kubernetes resource, the sweeper will delete resources which is labeled after the ttl time you defined.

Installation

  1. Create the kubernetes CRD.
$ kustomize build config/crd | kubectl apply -f - 

$ kubectl api-resources | grep sweeper
kubernetes   selector.sweeper.io   true   Kubernetes
...
  1. Install the controller.
$ kustomize build config/manager | kubectl apply -f  -

Usage

Kubernetes

The kubernetes resource is active in the namespace which has the label sweeper.io/enabled=true. You should set the label the namespace which you want to activate like below.

$ kubectl label ns sweeper sweeper.io/enabled=true --overwrite

Create the kubernetes manifest on the namespace. You reference the sample directory(in ./config/samples) and also you can read godoc.

Contribute

TBD

License

TBD

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the selector v1alpha1 API group +kubebuilder:object:generate=true +groupName=selector.sweeper.io
Package v1alpha1 contains API Schema definitions for the selector v1alpha1 API group +kubebuilder:object:generate=true +groupName=selector.sweeper.io

Jump to

Keyboard shortcuts

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