client

package
v0.4.8-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamespace = "csi-driver-projected-resource"
	DriverName       = "csi-driver-projected-resource.openshift.io"
)

Variables

This section is empty.

Functions

func ExecuteSAR

func ExecuteSAR(shareName, podNamespace, podName, podSA string) (bool, error)

func GetConfig

func GetConfig() (*rest.Config, error)

GetConfig creates a *rest.Config for talking to a Kubernetes apiserver. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

Config precedence

* KUBECONFIG environment variable pointing at a file

* In-cluster config if running in cluster

* $HOME/.kube/config if exists

func GetPod

func GetPod(namespace, name string) (*corev1.Pod, error)

func GetRecorder

func GetRecorder() record.EventRecorder

func SetClient

func SetClient(client kubernetes.Interface)

SetClient sets the internal kubernetes client interface. Useful for testing.

func SetConfigMapsLister

func SetConfigMapsLister(c corev1.ConfigMapLister)

func SetSecretsLister

func SetSecretsLister(s corev1.SecretLister)

func SetSharesLister

func SetSharesLister(s sharev1alpha1.ShareLister)

Types

type Event

type Event struct {
	Object runtime.Object
	Verb   ObjectAction
}

type Listers

type Listers struct {
	Secrets    corev1.SecretLister
	ConfigMaps corev1.ConfigMapLister
	Shares     sharev1alpha1.ShareLister
}

func GetListers

func GetListers() *Listers

type ObjectAction

type ObjectAction string
const (
	AddObjectAction    ObjectAction = "add"
	UpdateObjectAction ObjectAction = "upd"
	DeleteObjectAction ObjectAction = "del"
)

Jump to

Keyboard shortcuts

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