ClusterLendingManager is an operator to manage muti-tenant cluster's resources.
Here's a LendingConfig
example.
apiVersion: clusterlendingmanager.dtaniwaki.github.com/v1alpha1
kind: LendingConfig
metadata:
name: lending-config-sample
spec:
targets:
- kind: Deployment
apiVersion: apps/v1
- kind: Rollout
apiVersion: argoproj.io/v1alpha1
timezone: "Asia/Tokyo"
schedule:
always: false
default:
hours:
- start: "10:00"
end: "20:00"
friday:
hours:
- start: "10:00"
end: "17:00" # Happy Friday!
saturday:
hours: [] # Ofcourse, no work!
sunday:
hours: [] # Ofcourse, no work!
Build and load the Docker image to your cluster.
$ make docker-build
# run a command to load the image to your cluster.
If you use a kind cluster, there's a useful shortcut.
$ make kind-load
Install the CRD to the cluster.
$ make install
Deploy a controller to the cluster.
$ make deploy
Now, deploy the samples.
$ make deploy-samples
You will see sample Deployment and deployment in the current context, maybe default
depending on your env. The Deployment resource gets updated periodically by the ClusterLendingManager.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) 2021 Daisuke Taniwaki. See LICENSE for details.