hpa

package
v0.36.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 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, duration time.Duration) (bool, error)

WaitOnDeleted returns when an hpa resource is successfully deleted

Types

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) (*HPA, error)

Get returns the HPA definition specified in a given 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

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