utils

package
v1.0.0-2021-10-26-20-1... Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OSBSImagePrefix ...
	OSBSImagePrefix = "RELATED_IMAGE_"

	// OperandImagePrefix ...
	OperandImagePrefix = "OPERAND_IMAGE_"
)

Variables

View Source
var (
	// AnnotationMCEPause sits in multiclusterengine annotations to identify if the multiclusterengine is paused or not
	AnnotationMCEPause = "pause"
	// AnnotationImageRepo sits in multiclusterengine annotations to identify a custom image repository to use
	AnnotationImageRepo = "imageRepository"
)

Functions

func AddBackplaneConfigLabels

func AddBackplaneConfigLabels(u client.Object, name string)

AddBackplaneConfigLabels adds BackplaneConfig Labels ...

func AnnotationsMatch

func AnnotationsMatch(old, new map[string]string) bool

AnnotationsMatch returns true if all annotation values used by the operator match

func CoreToUnstructured

func CoreToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)

CoreToUnstructured converts a Core Kube resource to unstructured

func DefaultTolerations

func DefaultTolerations() []corev1.Toleration

func GetImageOverrides

func GetImageOverrides(mce *backplanev1alpha1.MultiClusterEngine) map[string]string

GetImageOverrides Reads and formats full image reference from image manifest file.

func GetImageRepository

func GetImageRepository(instance *backplanev1alpha1.MultiClusterEngine) string

GetImageRepository returns the image repo annotation, or an empty string if not set

func GetTestImages

func GetTestImages() []string

func IsPaused

func IsPaused(instance *backplanev1alpha1.MultiClusterEngine) bool

IsPaused returns true if the multiclusterengine instance is labeled as paused, and false otherwise

func OverrideImageRepository

func OverrideImageRepository(imageOverrides map[string]string, imageRepo string) map[string]string

func ProxyEnvVarsAreSet

func ProxyEnvVarsAreSet() bool

ProxyEnvVarIsSet ... OLM handles these environment variables as a unit; if at least one of them is set, all three are considered overridden and the cluster-wide defaults are not used for the deployments of the subscribed Operator. https://docs.openshift.com/container-platform/4.6/operators/admin/olm-configuring-proxy-support.html GetProxyEnvVars

Types

This section is empty.

Jump to

Keyboard shortcuts

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