active

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActiveConfigMapName = "active-operator"
)

Variables

View Source
var OsExitOverride = os.Exit
View Source
var TickerRateOverride = 1000 * time.Millisecond

Functions

func GenerateMyActiveConfigMap

func GenerateMyActiveConfigMap() *corev1.ConfigMap

GenerateMyActiveConfigMap returns a ConfigMap that matches what the expected ConfigMap would be.

func GetActiveConfigMap

func GetActiveConfigMap(client client.Client) (*corev1.ConfigMap, error)

GetActiveConfigMap returns the ConfigMap for the active operator if it exists. If the ConfigMap does not exist then no map is returned and no error. If there is a problem fetching the ConfigMap then the error is returned.

func IsThisOperatorActive

func IsThisOperatorActive(cm *corev1.ConfigMap) (bool, string)

IsThisOperatorActive will process the passed in ConfigMap and check that this running operator is the active one based on the OperatorNamespace. The first return value is if this running operator is active. The 2nd return value is the namespace of the active operator, if the namespace is not in the ConfigMap then an empty string will be returned.

func WaitUntilActive

func WaitUntilActive(cs *kubernetes.Clientset, client client.Client, ctx context.Context, log logr.Logger)

Types

This section is empty.

Jump to

Keyboard shortcuts

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