v1alpha2

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidStatus

func IsValidStatus(o apis.UpgradeDetailedStatuses) bool

IsValidStatus is used to validate IsValidStatus

Types

type Kubeclient

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

Kubeclient enables kubernetes API operations on upgrade task instance

func NewKubeClient

func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for upgrade task operations

func (*Kubeclient) Create

func (k *Kubeclient) Create(
	upgradeTask *apis.UpgradeTask,
) (*apis.UpgradeTask, error)

Create creates a upgradeTask in specified namespace in kubernetes cluster

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string, deleteOpts *metav1.DeleteOptions) error

Delete deletes a upgradeTask instance from the kubecrnetes cluster

func (*Kubeclient) Get

func (k *Kubeclient) Get(
	name string,
	opts metav1.GetOptions,
) (*apis.UpgradeTask, error)

Get returns a upgrade task object

func (*Kubeclient) List

List returns a list of disk instances present in kubernetes cluster

func (*Kubeclient) Patch

func (k *Kubeclient) Patch(
	name string,
	pt types.PatchType,
	data []byte,
	subresources ...string,
) (*apis.UpgradeTask, error)

Patch patches the upgrade task if present in kubernetes cluster

func (*Kubeclient) Update

func (k *Kubeclient) Update(
	upgradeTask *apis.UpgradeTask,
) (*apis.UpgradeTask, error)

Update updates the upgrade task if present in kubernetes cluster

func (*Kubeclient) WithDefaults

func (k *Kubeclient) WithDefaults()

WithDefaults sets the default options of kubeclient instance

func (*Kubeclient) WithNamespace

func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient

WithNamespace sets the kubernetes namespace against the provided namespace

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a kubeclient instance

func WithKubeClient

func WithKubeClient(c *clientset.Clientset) KubeclientBuildOption

WithKubeClient sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(kubeConfigPath string) KubeclientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

Jump to

Keyboard shortcuts

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