util

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultClusterName   = "e2e-test"
	DefaultNamespace     = "kvrocks"
	DefaultKruiseVersion = "1.4.0"
	DefaultMinikubeShell = "start_minikube_cluster.sh"
	DefaulManifestDir    = "../../../examples/"
)
View Source
const (
	ChaosMeshNamespace = "chaos-mesh"
)

Variables

This section is empty.

Functions

func HelmTool

func HelmTool(args ...string) (string, error)

func KubectlTool

func KubectlTool(args ...string) (string, error)

Types

type Config

type Config struct {
	KruiseVersion    string `yaml:"kruiseVersion"`
	ClusterName      string `yaml:"clusterName"`
	Namespace        string `yaml:"namespace"`
	KubeConfig       string `yaml:"kubeConfig"`
	ChaosMeshEnabled bool   `yaml:"chaosMeshEnabled"`
	ManifestDir      string `yaml:"manifestDir"`
}

func NewConfig

func NewConfig(configFilePath string) (*Config, error)

func (*Config) ParseManifest

type Experiment

type Experiment struct {
	// contains filtered or unexported fields
}

type KubernetesEnv

type KubernetesEnv struct {
	Client               client.Client
	ChaosMeshExperiments []Experiment
	Clean                func() error
	// contains filtered or unexported fields
}

func Start

func Start(config *Config) *KubernetesEnv

func (*KubernetesEnv) CreateExperiment

func (env *KubernetesEnv) CreateExperiment(chaos client.Object) *Experiment

func (*KubernetesEnv) GetConfig

func (env *KubernetesEnv) GetConfig(field string) (interface{}, error)

func (*KubernetesEnv) ParseManifest

func (*KubernetesEnv) ScheduleInjectPodKill

func (env *KubernetesEnv) ScheduleInjectPodKill(target chaosmeshv1alpha1.PodSelectorSpec, schedule string, mode chaosmeshv1alpha1.SelectorMode) *Experiment

Jump to

Keyboard shortcuts

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