client

package
v0.0.0-...-1c7003d Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 33 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) ApplyOperatorSpec

func (c *ConfigOperatorClient) ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorSpecApplyConfiguration) (err error)

func (*ConfigOperatorClient) ApplyOperatorStatus

func (c *ConfigOperatorClient) ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) (err error)

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) GetOperatorStateWithQuorum

func (c *ConfigOperatorClient) GetOperatorStateWithQuorum(ctx context.Context) (spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, resourceVersion string, err error)

GetOperatorStateWithQuorum implements v1helpers.OperatorClient.

func (*ConfigOperatorClient) Informer

func (*ConfigOperatorClient) PatchOperatorStatus

func (c *ConfigOperatorClient) PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error)

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