cmd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationLastChange        = "rebuy.com/kubernetes-hpaa.last-change"
	AnnotationDownscaleCooldown = "rebuy.com/kubernetes-hpaa.downscale-cooldown"
	AnnotationLowerReplicaLimit = "rebuy.com/kubernetes-hpaa.lower-replica-limit"
)

Variables

View Source
var (
	BuildVersion     = "unknown"
	BuildDate        = "unknown"
	BuildHash        = "unknown"
	BuildEnvironment = "unknown"
)

Functions

func NewRootCommand

func NewRootCommand() *cobra.Command

func NewVersionCommand

func NewVersionCommand() *cobra.Command

Types

type App

type App struct {
	Params struct {
		Kubeconfig     string
		Namespace      string
		GraylogAddress string
	}
}

func (*App) Bind

func (app *App) Bind(cmd *cobra.Command)

func (*App) Kubernetes

func (app *App) Kubernetes() kubernetes.Interface

func (*App) Run

func (app *App) Run(cmd *cobra.Command, args []string)

type HPAView

HPAView provides a specialized view of an HPA, so the actual algorithm more understandable.

func (HPAView) DesiredReplicas added in v0.2.2

func (v HPAView) DesiredReplicas() int32

func (HPAView) DownscaleCooldown

func (v HPAView) DownscaleCooldown() *time.Duration

func (HPAView) LastChange

func (v HPAView) LastChange() time.Time

func (HPAView) Logger

func (v HPAView) Logger() *log.Entry

func (HPAView) LowerReplicaLimit

func (v HPAView) LowerReplicaLimit() *int32

func (HPAView) MinReplicas

func (v HPAView) MinReplicas() int32

func (HPAView) Name

func (v HPAView) Name() string

func (HPAView) Namespace

func (v HPAView) Namespace() string

type Handler

type Handler struct {
	Client kubernetes.Interface
	// contains filtered or unexported fields
}

func (*Handler) Handle

func (h *Handler) Handle(obj interface{})

func (*Handler) OnAdd

func (h *Handler) OnAdd(obj interface{})

func (*Handler) OnDelete

func (h *Handler) OnDelete(obj interface{})

func (*Handler) OnUpdate

func (h *Handler) OnUpdate(oldObj, newObj interface{})

func (*Handler) Run

func (h *Handler) Run(v HPAView) (*int32, error)

type KubeParams

type KubeParams struct {
	Kubeconfig string
	Namespace  string
}

func (*KubeParams) Bind

func (p *KubeParams) Bind(cmd *cobra.Command)

func (*KubeParams) Create

func (p *KubeParams) Create() (kubernetes.Interface, error)

Jump to

Keyboard shortcuts

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