v1alpha1

package
v1.12.0-RC1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder enables building an instance of StorageClass

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) APIObject

func (b *Builder) APIObject() (*corev1.Namespace, error)

APIObject returns the API Namespace instance

func (*Builder) Build

func (b *Builder) Build() (*Namespace, error)

Build returns the Namespace instance

func (*Builder) WithGenerateName

func (b *Builder) WithGenerateName(name string) *Builder

WithGenerateName appends a random string after the name

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of namespace with provided argument.

type Kubeclient

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

Kubeclient enables kubernetes API operations on namespace instance

func NewKubeClient

func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for cstor volume replica operations

func (*Kubeclient) Create

func (k *Kubeclient) Create(namespace *corev1.Namespace) (*corev1.Namespace, error)

Create creates a namespace in specified namespace in kubernetes cluster

func (*Kubeclient) Delete

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

Delete deletes a namespace instance from the kubecrnetes cluster

func (*Kubeclient) Get

func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*corev1.Namespace, error)

Get returns a namespace resource instances present in kubernetes cluster

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption abstracts creating an instance of kubeclient

func WithClientSet

func WithClientSet(c *kubernetes.Clientset) KubeclientBuildOption

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeclientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

type Namespace

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

Namespace is a wrapper over Namespace api object. It provides build, validations and other common logic to be used by various feature specific callers.

Jump to

Keyboard shortcuts

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