hpa

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitOnDeleted added in v0.36.0

func WaitOnDeleted(hpaPrefix, namespace string, sleep, timeout time.Duration) (bool, error)

WaitOnDeleted returns when an hpa resource is successfully deleted

Types

type GetAllByPrefixResult added in v0.41.0

type GetAllByPrefixResult struct {
	// contains filtered or unexported fields
}

GetAllByPrefixResult is a return struct for GetAllByPrefixAsync

func GetAllByPrefixAsync added in v0.41.0

func GetAllByPrefixAsync(prefix, namespace string) GetAllByPrefixResult

GetAllByPrefixAsync wraps GetAllByPrefix with a struct response for goroutine + channel usage

type HPA

type HPA struct {
	Metadata Metadata `json:"metadata"`
	Spec     Spec     `json:"spec"`
	Status   Status   `json:"status"`
}

HPA represents a kubernetes HPA

func Get

func Get(name, namespace string, retries int) (*HPA, error)

Get will return a pod with a given name and namespace

func GetAllByPrefix added in v0.36.0

func GetAllByPrefix(prefix, namespace string) ([]HPA, error)

GetAllByPrefix will return all pods in a given namespace that match a prefix

func (*HPA) Delete

func (h *HPA) Delete(retries int) error

Delete will delete a HPA in a given namespace

func (*HPA) Describe added in v0.41.0

func (h *HPA) Describe() error

Describe will describe a HPA resource

type List added in v0.36.0

type List struct {
	HPAs []HPA `json:"items"`
}

func GetAll added in v0.36.0

func GetAll(namespace string) (*List, error)

GetAll will return all HPA resources in a given namespace

type LoadBalancer

type LoadBalancer struct {
	CurrentCPUUtilizationPercentage int `json:"currentCPUUtilizationPercentage"`
	CurrentReplicas                 int `json:"currentReplicas"`
	DesiredReplicas                 int `json:"desiredReplicas"`
}

LoadBalancer holds the ingress definitions

type Metadata

type Metadata struct {
	CreatedAt time.Time `json:"creationTimestamp"`
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
}

Metadata holds information like name, namespace, and labels

type Spec

type Spec struct {
	MinReplicas                    int `json:"minReplicas"`
	MaxReplicas                    int `json:"maxReplicas"`
	TargetCPUUtilizationPercentage int `json:"targetCPUUtilizationPercentage"`
}

Spec holds information like clusterIP and port

type Status

type Status struct {
	LoadBalancer LoadBalancer `json:"loadBalancer"`
}

Status holds the load balancer definition

Jump to

Keyboard shortcuts

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