Skip to content

Manage kubernetes resources (deletion, expiry, time-based scaling) for cost effective dev environments

Notifications You must be signed in to change notification settings

tikalk/resource-manager

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


Resource Manager Operator

Logo

Auto-manage k8s resources
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

The Resource-Manager operator has built to automatically manage your kubernetes objects.

Here's why:

  • You can easily create scheduled policies that will allow you to manage your kubernetes objects
  • You shouldn't be doing the same tasks over and over like deleting some pods or namespaces

Getting Started

Installation

  1. add the helm repo
     helm repo add resource-manager https://tikalk.github.io/resource-manager   
     helm repo update
  2. Install the chart
    helm install resource-manager resource-manager/resource-manager-operator \ 
    --create-namespace -n resource-manager

Usage

Let's say you want to give a specific deployments only 8 hours to live. You can create this kind of policy by applying a ResourceManager object.

Delete every deployment in default namespace that has the 'app=nginx' label, after 8 hours from its creation time

apiVersion: resource-management.tikalk.com/v1alpha1
kind: ResourceManager
metadata:
  name: resource-manager-example
  namespace: default
spec:
  resourceKind: "Deployment"
  selector:
    matchLabels:
      app: nginx
  action: delete
  expiration:
    after: "8h"

Timeframe

You can also delete a resource within a specific hour by using the 'at' key. let's say 12:00

Delete a specific deployment on 12:00, on a daily basis

apiVersion: resource-management.tikalk.com/v1alpha1
kind: ResourceManager
metadata:
  name: resource-manager-example
  namespace: default
spec:
  resourceKind: "Deployment"
  selector:
    matchLabels:
      app: nginx
  action: delete
  expiration:
    at: "12:00"

Dry-run

Add the 'dry-run' key for only validate and verify the action

apiVersion: resource-management.tikalk.com/v1alpha1
kind: ResourceManager
metadata:
  name: resource-manager-example
  namespace: default
spec:
  disabled: false
  dry-run: false
  selector:
     matchLabels:
        app: nginx
  action: delete
  expiration:
     after: "30m"

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License.

Creators

Gaby Tal, Amit Karni, Boris Komraz, Daniel Rozner

About

Manage kubernetes resources (deletion, expiry, time-based scaling) for cost effective dev environments

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •