common

package
v0.0.0-...-0533826 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CsConfigAnnotationSuffix = "common-service/config"
View Source
var CsDefaultNamespace = "ibm-common-services"

Functions

func GenerateRandomString

func GenerateRandomString(rule string) string

GenerateRandomString generates a random string based upon a string that is a valid regex pattern.

func GetControllerKind

func GetControllerKind(controlled client.Object) (kind string)

func GetControllerRefIndex

func GetControllerRefIndex(controlled client.Object) (index int)

func GetCsConfigAnnotation

func GetCsConfigAnnotation(namespace string) string

GetCsConfigAnnotation returns '<namespace>.common-service/config' annotation name for given namespace

func IsControllerOf

func IsControllerOf(controller, controlled client.Object) (isController bool)

IsControllerOf determines whether one object is listed as the controller of another object within its OwnerReferences.

func IsCsConfigAnnotationExists

func IsCsConfigAnnotationExists(annotations map[string]string) bool

IsCsConfigAnnotationExists checks if '<namespace>.common-service/config' annotation name exists in the given annotations map or not

func IsOwnerOf

func IsOwnerOf(owner, owned client.Object) (isOwner bool)

IsOwnerOf determines whether one object is listed in another object's OwnerReferences.

Types

This section is empty.

Jump to

Keyboard shortcuts

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