common

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ShipwrightImagePrefix = "IMAGE_SHIPWRIGHT_"

	TektonOpMinSupportedVersion = "v0.50.0"
	TektonOpMinSupportedMajor   = 0
	TektonOpMinSupportedMinor   = 50

	Retain int = iota
	Overwrite
)

Variables

This section is empty.

Functions

func BoolFromEnvVar

func BoolFromEnvVar(envVar string) bool

func CRDExist

func CRDExist(ctx context.Context, client crdclientv1.ApiextensionsV1Interface, crdName string) (bool, error)

func Contains

func Contains(slice []string, str string) bool

contains returns true if the string if found in the slice.

func DeploymentImages

func DeploymentImages(images map[string]string) mf.Transformer

deploymentImages replaces container and env vars images.

func ImagesFromEnv

func ImagesFromEnv(prefix string) map[string]string

imagesFromEnv will provide map of key value.

func InjectAnnotations

func InjectAnnotations(key, value string, overwritePolicy int, kinds ...string) mf.Transformer

injectAnnotations adds annotation key:value to a resource annotations overwritePolicy (Retain/Overwrite) decides whehther to overwrite an already existing annotation []kinds specify the Kinds on which the label should be applied if len(kinds) = 0, label will be apllied to all/any resources irrespective of its Kind

func IsOpenShiftPlatform

func IsOpenShiftPlatform() bool

func SetupManifestival

func SetupManifestival(client client.Client, manifestFile string, logger logr.Logger) (manifestival.Manifest, error)

setupManifestival instantiate manifestival

func ToLowerCaseKeys

func ToLowerCaseKeys(keyValues map[string]string) map[string]string

toLowerCaseKeys converts key value to lower cases.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳