util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceKind                      = "Namespace"
	ServiceKind                        = "Service"
	ValidatingWebhookConfigurationKind = "ValidatingWebhookConfiguration"
	MutatingWebhookConfigurationKind   = "MutatingWebhookConfiguration"
	SecretKind                         = "Secret"
)

Variables

View Source
var (
	DefaultGatekeeperNamespace          = "gatekeeper-system"
	DefaultOpenShiftGatekeeperNamespace = "openshift-gatekeeper-system"
)

Functions

func FromArg

func FromArg(arg string) (key, value string)

FromArg Converts a container argument into a key, value pair. e.g. '--argName=argValue' returns '--argName', 'argValue'

func GetManifestObject added in v0.1.2

func GetManifestObject(asset string) (*unstructured.Unstructured, error)

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace the operator is running in from the associated service account secret.

func GetPlatformNamespace

func GetPlatformNamespace(platformInfo platform.PlatformInfo) string

GetPlatformNamespace returns the namespace for the designated platform.

func ToArg

func ToArg(name, value string) string

ToArg Converts a key, value pair into a valid container argument. e.g. '--argName', 'argValue' returns '--argName=argValue'

func ToMap

func ToMap(obj interface{}) map[string]interface{}

ToMap Convenience method to convert any struct into a map

Types

This section is empty.

Jump to

Keyboard shortcuts

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