cluster-lending-manager

command module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

ClusterLendingManager

Go Reference Coverage Status

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!

Prerequisites

Build

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

Deployment

Install the CRD to the cluster.

$ make install

Deploy a controller to the cluster.

$ make deploy

Usage

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.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright (c) 2021 Daisuke Taniwaki. See LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the clusterlendingmanager v1alpha1 API group +kubebuilder:object:generate=true +groupName=clusterlendingmanager.dtaniwaki.github.com
Package v1alpha1 contains API Schema definitions for the clusterlendingmanager v1alpha1 API group +kubebuilder:object:generate=true +groupName=clusterlendingmanager.dtaniwaki.github.com

Jump to

Keyboard shortcuts

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