common

package
v0.0.0-...-3b54cdb Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateBaselines bool

Functions

func Contains

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

func CreateSecretFromEnv

func CreateSecretFromEnv(t *testing.T, kubectlOptions *k8s.KubectlOptions, apiKeyEnv, appKeyEnv string) (cleanupFunc func())

func FilterYamlKeysMultiManifest

func FilterYamlKeysMultiManifest(manifest string, filterKeys map[string]interface{}) (string, error)

Takes multi-document YAML and filter out keys from each document.

func GetVolumeNames

func GetVolumeNames(ds appsv1.DaemonSet) []string

func InstallChart

func InstallChart(t *testing.T, kubectlOptions *k8s.KubectlOptions, cmd HelmCommand) (cleanupFunc func())

func LoadFromFile

func LoadFromFile[T any](t *testing.T, filepath string, destObj *T) string

func ParseArgs

func ParseArgs()

func ReadFile

func ReadFile(t *testing.T, filepath string) string

func RenderChart

func RenderChart(t *testing.T, cmd HelmCommand) (string, error)

func SetupConfig

func SetupConfig() (runner.ConfigMap, error)

func Unmarshal

func Unmarshal[T any](t *testing.T, manifest string, destObj *T)

func WriteToFile

func WriteToFile(t *testing.T, filepath, content string)

Types

type HelmCommand

type HelmCommand struct {
	ReleaseName   string
	Namespace     string
	ChartPath     string
	ShowOnly      []string          // helm template `-s, --show-only` flag
	Values        []string          // helm template `-f, --values` flag
	Overrides     map[string]string // helm template `--set` flag
	OverridesJson map[string]string // helm template `--set-json` flag
	Logger        *logger.Logger    // logger to use for helm output. Set to logger.Discard by default.
	ExtraArgs     []string
}

Jump to

Keyboard shortcuts

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