utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectImage = "operation-cache-controller:v0.0.1"
)
View Source
const (
	TestNamespace = "operation-cache-controller-system"
)

Variables

This section is empty.

Functions

func GetNonEmptyLines

func GetNonEmptyLines(output string) []string

GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.

func GetProjectDir

func GetProjectDir() (string, error)

GetProjectDir will return the directory where the project is

func InstallCertManager

func InstallCertManager() error

InstallCertManager installs the cert manager bundle.

func InstallPrometheusOperator

func InstallPrometheusOperator() error

InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.

func IsCertManagerCRDsInstalled

func IsCertManagerCRDsInstalled() bool

IsCertManagerCRDsInstalled checks if any Cert Manager CRDs are installed by verifying the existence of key CRDs related to Cert Manager.

func IsPrometheusCRDsInstalled

func IsPrometheusCRDsInstalled() bool

IsPrometheusCRDsInstalled checks if any Prometheus CRDs are installed by verifying the existence of key CRDs related to Prometheus.

func LoadImageToKindClusterWithName

func LoadImageToKindClusterWithName(name string) error

LoadImageToKindClusterWithName loads a local docker image to the kind cluster

func NewRequirement added in v0.0.2

func NewRequirement(name, namespace string) *v1alpha1.Requirement

func NewSimpleOperationSpec added in v0.0.2

func NewSimpleOperationSpec(name string) *v1alpha1.OperationSpec

func NewTestApplicationSpec added in v0.0.2

func NewTestApplicationSpec(name string) v1alpha1.ApplicationSpec

func NewTestJobSpec added in v0.0.2

func NewTestJobSpec(name string) batchv1.JobSpec

func Run

func Run(cmd *exec.Cmd) (string, error)

Run executes the provided command within this context

func UncommentCode

func UncommentCode(filename, target, prefix string) error

UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines.

func UninstallCertManager

func UninstallCertManager()

UninstallCertManager uninstalls the cert manager

func UninstallPrometheusOperator

func UninstallPrometheusOperator()

UninstallPrometheusOperator uninstalls the prometheus

Types

This section is empty.

Jump to

Keyboard shortcuts

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