package
0.0.0-20240815173558-303cc3735024
Repository: https://github.com/libopenstorage/operator.git
Documentation: pkg.go.dev

# Functions

GetGVKsFromAddToScheme takes in the runtime scheme and filters out all generic apimachinery meta types.
GetOperatorName return the operator name.
GetOperatorNamespace returns the namespace the operator should be running in.
GetPod returns a Pod object that corresponds to the pod in which the code is currently running.
GetWatchNamespace returns the namespace the operator should be watching for changes.
ResourceExists returns true if the given resource kind exists in the given api groupversion.

# Constants

ClusterRunMode running in cluster.
KubeConfigEnvVar defines the env variable KUBECONFIG which contains the kubeconfig file path.
LocalRunMode running locally.
OperatorNameEnvVar is the constant for env variable OPERATOR_NAME which is the name of the current operator.
PodNameEnvVar is the constant for env variable POD_NAME which is the name of the current pod.
WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE which is the namespace where the watch activity happens.

# Variables

ErrNoNamespace indicates that a namespace could not be found for the current environment.
ErrRunLocal indicates that the operator is set to run in local mode (this error is returned by functions that only work on operators running in cluster mode).
ForceRunModeEnv indicates if the operator should be forced to run in either local or cluster mode (currently only used for local mode).

# Type aliases

RunModeType type of run mode.