k8sutil

package
v0.0.0-...-b1e1f9b Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ForceRunModeEnv = "OSDK_FORCE_RUN_MODE"
	ErrNoNamespace  = fmt.Errorf("namespace not found for current environment")
	ErrRunLocal     = fmt.Errorf("operator run mode forced to local")
)

Functions

func GetOperatorName

func GetOperatorName() (string, error)

GetOperatorName return the operator name

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace the operator should be running in.

func KubeClient

func KubeClient(s *runtime.Scheme) (client.Client, error)

KubeClient creates a new kubeclient that interacts with the Kube api with the service account secrets

Types

type RunModeType

type RunModeType string
const (
	LocalRunMode   RunModeType = "local"
	ClusterRunMode RunModeType = "cluster"

	OperatorNameEnvVar = "OPERATOR_NAME"
)

Jump to

Keyboard shortcuts

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