client

package
v0.0.0-...-f3f2784 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 31 Imported by: 14

Documentation

Index

Constants

View Source
const (
	// WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE
	// which is the namespace that the pod is currently running in.
	WatchNamespaceEnvVar = "WATCH_NAMESPACE"

	// OperatorNameEnvVar is the constant for env variable OPERATOR_NAME
	// which is the name of the current operator
	OperatorNameEnvVar = "OPERATOR_NAME"
)

Variables

This section is empty.

Functions

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 GetOperatorName

func GetOperatorName() (string, error)

GetOperatorName return the operator name

func GetWatchNamespace

func GetWatchNamespace() (string, error)

GetWatchNamespace returns the namespace the operator should be watching for changes

Types

type ConfigOperatorClient

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

func (*ConfigOperatorClient) GetObjectMeta

func (c *ConfigOperatorClient) GetObjectMeta() (meta *metav1.ObjectMeta, err error)

func (*ConfigOperatorClient) GetOperatorState

func (c *ConfigOperatorClient) GetOperatorState() (spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, resourceVersion string, err error)

func (*ConfigOperatorClient) Informer

func (*ConfigOperatorClient) UpdateOperatorSpec

func (c *ConfigOperatorClient) UpdateOperatorSpec(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorSpec) (out *operatorv1.OperatorSpec, newResourceVersion string, err error)

func (*ConfigOperatorClient) UpdateOperatorStatus

func (c *ConfigOperatorClient) UpdateOperatorStatus(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorStatus) (out *operatorv1.OperatorStatus, err error)

type StorageListers

type StorageListers struct {
	Infrastructures        configlisters.InfrastructureLister
	OpenShiftConfig        kcorelisters.ConfigMapNamespaceLister
	OpenShiftConfigManaged kcorelisters.ConfigMapNamespaceLister
	Secrets                kcorelisters.SecretNamespaceLister
}

StorageListers is a set of listers that can be used by storage drivers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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