common

package
v0.0.0-...-220d92e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DestroyStacks bool
View Source
var PreserveStacks bool
View Source
var UpdateBaselines bool

Functions

func CreateSecretFromEnv

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

func InstallChart

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

func ListNodes

func ListNodes(namespace string, client kubernetes.Interface) (*corev1.NodeList, error)

func ListPods

func ListPods(namespace string, podLabelSelector string, client *kubernetes.Clientset) (*corev1.PodList, error)

func LoadFromFile

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

func NewClientFromKubeconfig

func NewClientFromKubeconfig(kc map[string]interface{}) (clientcmd.ClientConfig, *rest.Config, *kubernetes.Clientset, error)

func ParseArgs

func ParseArgs()

func RenderChart

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

func SetupConfig

func SetupConfig() (runner.ConfigMap, error)

func TeardownE2EStack

func TeardownE2EStack(e2eEnv *E2EEnv, preserveStacks bool) 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 E2EEnv

type E2EEnv struct {
	StackOutput auto.UpResult
	// contains filtered or unexported fields
}

func NewEKStack

func NewEKStack(stackConfig runner.ConfigMap, destroyStacks bool) (*E2EEnv, error)

Create new EKS pulumi stack The latest datadog/datadog helm chart is installed by default via the stack config `ddagent:deploy`

type HelmCommand

type HelmCommand struct {
	ReleaseName 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
}

type K8sExec

type K8sExec struct {
	ClientSet  kubernetes.Interface
	RestConfig *rest.Config
}

func NewK8sExec

func NewK8sExec(clientSet *kubernetes.Clientset, restConfig *rest.Config) K8sExec

func (*K8sExec) K8sExec

func (k8s *K8sExec) K8sExec(namespace string, podName string, containerName string, command []string) ([]byte, []byte, error)

Jump to

Keyboard shortcuts

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