util

package
v0.0.0-...-5e84c48 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestDir = "manifest"

	YamlDecodeBufferSize            = 2048
	OthersReadExecuteFilePermission = 0o755
	DebugLogLevel                   = 2
)

Variables

This section is empty.

Functions

func CalculateHash

func CalculateHash(interfaceToBeHashed any) (uint32, error)

CalculateHash returns hash for interfaceToBeHashed.

func CleanFilePathJoin

func CleanFilePathJoin(root, dest string) (string, error)

func FilterExistingResources

func FilterExistingResources(resources kube.ResourceList) (kube.ResourceList, error)

func GetConfigFilePath

func GetConfigFilePath(config types.ImageSpec) string

func GetFsChartPath

func GetFsChartPath(imageSpec types.ImageSpec) string

func GetFsManifestChartPath

func GetFsManifestChartPath(imageChartPath string) string

func GetNamespaceObjBytes

func GetNamespaceObjBytes(clientNs string) ([]byte, error)

func GetResourceLabel

func GetResourceLabel(resource client.Object, labelName string) (string, error)

func GetStringifiedYamlFromFilePath

func GetStringifiedYamlFromFilePath(filePath string) (string, error)

func GetYamlFileContent

func GetYamlFileContent(filePath string) (interface{}, error)

func ParseManifestStringToObjects

func ParseManifestStringToObjects(manifest string) (*types.ManifestResources, error)

func Transform

func Transform(ctx context.Context, manifestStringified string,
	object types.BaseCustomObject, transforms []types.ObjectTransform,
) (*types.ManifestResources, error)

Transform applies the passed object transformations to the manifest string passed.

func WriteToFile

func WriteToFile(filePath string, bytes []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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