Documentation ¶
Index ¶
- func IsValidStatus(o apis.UpgradeDetailedStatuses) bool
- type Kubeclient
- func (k *Kubeclient) Create(upgradeTask *apis.UpgradeTask) (*apis.UpgradeTask, error)
- func (k *Kubeclient) Delete(name string, deleteOpts *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.UpgradeTask, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.UpgradeTaskList, error)
- func (k *Kubeclient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*apis.UpgradeTask, error)
- func (k *Kubeclient) Update(upgradeTask *apis.UpgradeTask) (*apis.UpgradeTask, error)
- func (k *Kubeclient) WithDefaults()
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
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 ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.UpgradeTaskList, error)
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