secret

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClientBuildOption

type KubeClientBuildOption func(*Kubeclient)

KubeClientBuildOption defines the abstraction to build a kubeclient instance

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

func WithNamespace

func WithNamespace(namespace string) KubeClientBuildOption

WithNamespace set namespace in kubeclient object

type Kubeclient

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

Kubeclient enables kubernetes API operations on storageclass instance

func NewKubeClient

func NewKubeClient(opts ...KubeClientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for storageclass

func (*Kubeclient) Create

func (k *Kubeclient) Create(secret *corev1.Secret) (*corev1.Secret, error)

Create creates and returns a secret instance

func (*Kubeclient) Delete

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

Delete deletes the secret if present in kubernetes cluster

func (*Kubeclient) Get

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

Get return a secret instance present in kubernetes cluster

func (*Kubeclient) List

func (k *Kubeclient) List(opts metav1.ListOptions) (*corev1.SecretList, error)

List lists the secret if present in kubernetes cluster

func (*Kubeclient) Update

func (k *Kubeclient) Update(secret *corev1.Secret) (*corev1.Secret, error)

Update updates and returns updated secret instance

Jump to

Keyboard shortcuts

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