Auto-manage k8s resources
Explore the docs »
Report Bug
·
Request Feature
The Resource-Manager operator has built to automatically manage your kubernetes objects.
Here’s why:
helm repo add resource-manager https://tikalk.github.io/resource-manager
helm repo update
helm install resource-manager resource-manager/resource-manager-operator \
--create-namespace -n resource-manager
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"
###
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"
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"
See the open issues for a list of proposed features (and known issues).
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.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License.