cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeployment

func GetDeployment(clientset *kubernetes.Clientset, namespace string, targetName string) (*v1.Deployment, error)

func GetStatefulSet

func GetStatefulSet(clientset *kubernetes.Clientset, namespace string, targetName string) (*v1.StatefulSet, error)

func NewCmdRescale

func NewCmdRescale(streams genericclioptions.IOStreams) *cobra.Command

NewCmdRescale provides a cobra command wrapping RescaleOptions

func ScaleDeployment

func ScaleDeployment(clientset *kubernetes.Clientset, namespace string, targetName string, maxWaitSeconds int) error

func ScaleStatefulSet

func ScaleStatefulSet(clientset *kubernetes.Clientset, namespace string, targetName string, maxWaitSeconds int) error

func UpdateDeploymentScale

func UpdateDeploymentScale(clientset *kubernetes.Clientset, namespace string, targetName string, replicas int32) (*autoscalingv1.Scale, error)

func UpdateStatefulSetScale

func UpdateStatefulSetScale(clientset *kubernetes.Clientset, namespace string, targetName string, replicas int32) (*autoscalingv1.Scale, error)

func WaitForDeploymentReplicas

func WaitForDeploymentReplicas(clientset *kubernetes.Clientset, namespace string, targetName string, replicas int32, tries int) error

func WaitForStatefulSetReplicas

func WaitForStatefulSetReplicas(clientset *kubernetes.Clientset, namespace string, targetName string, replicas int32, tries int) error

Types

type RescaleOptions

type RescaleOptions struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

RescaleOptions provides information required to update the current context on a user's KUBECONFIG

func NewRescaleOptions

func NewRescaleOptions(streams genericclioptions.IOStreams) *RescaleOptions

NewRescaleOptions provides an instance of RescaleOptions with default values

func (*RescaleOptions) Complete

func (o *RescaleOptions) Complete(cmd *cobra.Command, args []string) error

Complete sets all information required for updating the current context

func (*RescaleOptions) Run

func (o *RescaleOptions) Run() error

Run lists all available namespaces on a user's KUBECONFIG or updates the current context based on a provided namespace.

Jump to

Keyboard shortcuts

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