volume-decorator

module
v0.0.0-...-6526340 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more

README

volume-decorator

Controller that maintains more runtime information for Kubernetes volume(PVC), such as application identities, real usage, etc.

Features

  • Check volume availability when a workload with volumes created.
  • Collect workloads attached by of a volume.
  • Maintain realtime status of volumes, such as Pending, Expanding, etc.
  • Collect current mounted nodes of a volume.
  • Collect real usage bytes of a volume.

Prerequisites

These build instructions assume you have a Linux build environment with:

  • Docker
  • git
  • make
  • golang version > 1.11, with GO111MODULE=on
  • revive go get -u github.com/mgechev/revive

Build

To make the binary, just run:

make volume-decorator

The binary will be located at output/bin/volume-decorator.

Usage

volume-decorator can be deployed inside the kubernetes cluster:

  1. Create the RBAC objects needed by volume-decorator:

    kubectl -f deploy/kubernetes/rbac.yaml
    
  2. Create a deployment to run the volume-decorator:

    kubectl -f deploy/kubernetes/deployment.yaml
    

Examples

There are a large number of examples in examples.

Directories

Path Synopsis
cmd
Package tools imports things required by build scripts, to force `go mod` to see them as dependencies
Package tools imports things required by build scripts, to force `go mod` to see them as dependencies
pkg
apis/storage/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/storage/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/storage/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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