utils

package
v1.0.0-2021-09-15-06-5... Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

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

Variables

This section is empty.

Functions

func AddBackplaneConfigLabels

func AddBackplaneConfigLabels(u client.Object, name string)

AddBackplaneConfigLabels adds BackplaneConfig Labels ...

func ContainsMap

func ContainsMap(all map[string]string, expected map[string]string) bool

ContainsMap returns whether the expected map entries are included in the map

func CoreToUnstructured

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

CoreToUnstructured converts a Core Kube resource to unstructured

func DistributePods

func DistributePods(key string, value string) *corev1.Affinity

DistributePods returns a anti-affinity rule that specifies a preference for pod replicas with the matching key-value label to run across different nodes and zones

func GetContainerArgs

func GetContainerArgs(dep *appsv1.Deployment) []string

GetContainerArgs return arguments forfirst container in deployment

func GetContainerEnvVars

func GetContainerEnvVars(dep *appsv1.Deployment) []corev1.EnvVar

GetContainerEnvVars returns environment variables for first container in deployment

func GetContainerRequestResources

func GetContainerRequestResources(dep *appsv1.Deployment) corev1.ResourceList

GetContainerRequestResources returns Request Requirements for first container in deployment

func GetContainerVolumeMounts

func GetContainerVolumeMounts(dep *appsv1.Deployment) []corev1.VolumeMount

GetContainerVolumeMounts returns volume mount for first container in deployment

func GetImageOverrides

func GetImageOverrides() map[string]string

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

func GetImagePullPolicy

func GetImagePullPolicy(m *v1alpha1.MultiClusterEngine) corev1.PullPolicy

GetImagePullPolicy returns either pull policy from CR overrides or default of Always

func GetReplicaCount

func GetReplicaCount() int32

func GetTestImages

func GetTestImages() []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