Documentation ¶
Index ¶
- Constants
- func BoolFromEnvVar(envVar string) bool
- func CRDExist(ctx context.Context, client crdclientv1.ApiextensionsV1Interface, ...) (bool, error)
- func Contains(slice []string, str string) bool
- func DeploymentImages(images map[string]string) manifestival.Transformer
- func ImagesFromEnv(prefix string) map[string]string
- func InjectAnnotations(key, value string, overwritePolicy int, kinds ...string) manifestival.Transformer
- func IsOpenShiftPlatform() bool
- func KoDataPath() (string, error)
- func SetupManifestival(client client.Client, fileOrDir string, recurse bool, logger logr.Logger) (manifestival.Manifest, error)
- func ToLowerCaseKeys(keyValues map[string]string) map[string]string
- func TruncateCRDFieldTransformer(field string, maxLength int) manifestival.Transformer
Constants ¶
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 CRDExist ¶
func CRDExist(ctx context.Context, client crdclientv1.ApiextensionsV1Interface, crdName string) (bool, error)
func DeploymentImages ¶
func DeploymentImages(images map[string]string) manifestival.Transformer
deploymentImages replaces container and env vars images.
func ImagesFromEnv ¶
imagesFromEnv will provide map of key value.
func InjectAnnotations ¶
func InjectAnnotations(key, value string, overwritePolicy int, kinds ...string) manifestival.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 KoDataPath ¶ added in v0.13.0
KoDataPath retrieve the data path environment variable, returning error when not found.
func SetupManifestival ¶
func SetupManifestival(client client.Client, fileOrDir string, recurse bool, logger logr.Logger) (manifestival.Manifest, error)
SetupManifestival instantiates a Manifestival instance for the provided file or directory
func ToLowerCaseKeys ¶
toLowerCaseKeys converts key value to lower cases.
func TruncateCRDFieldTransformer ¶ added in v0.13.0
func TruncateCRDFieldTransformer(field string, maxLength int) manifestival.Transformer
TruncateCRDFieldTransformer returns a manifestival.Transformer that truncates the value of the given field within a CRD spec to the provided max length.
Types ¶
This section is empty.