Documentation ¶
Index ¶
- Variables
- func Finalize()
- func HandlePredicate(clientset *kubernetes.Clientset, client dynamic.Interface, ...) bool
- func Run(kubeConfig *restclient.Config, testConfig TestConfig, outputDir *string) error
- type Action
- type ActionSpec
- type BasicCreateSpec
- type CopySpec
- type CreateSpec
- type DeploymentConfig
- type DeploymentCreateSpec
- type FilterSpec
- type ImageSpec
- type LUSDSpec
- type NamespaceConfig
- type PodConfig
- type PodCreateSpec
- type PredicateSpec
- type RcCreateSpec
- type ReplicationControllerConfig
- type ResourceConfig
- type RunSpec
- type ServiceConfig
- type StatefulSetConfig
- type TestConfig
- type WcpOp
Constants ¶
This section is empty.
Variables ¶
View Source
var NonResourceConfigs = map[string]bool{ "Predicate": true, "RepeatTimes": true, }
This is used by reflect mechanism to distinguish resource configs vs other options in WcpOp
Functions ¶
func Finalize ¶
func Finalize()
This cleans up previously created objects/namespaces, and print results.
func HandlePredicate ¶
func HandlePredicate( clientset *kubernetes.Clientset, client dynamic.Interface, config *restclient.Config, ps PredicateSpec, interval int, timeout int) bool
func Run ¶
func Run(kubeConfig *restclient.Config, testConfig TestConfig, outputDir *string) error
Types ¶
type Action ¶
type Action struct { Act string Spec ActionSpec }
type ActionSpec ¶
type ActionSpec struct { CreateSpec ImageSpec FilterSpec CopySpec RunSpec NumReplicas int32 }
type BasicCreateSpec ¶
type BasicCreateSpec struct { CreateSpec LabelKey string LabelValue string }
type CreateSpec ¶
type DeploymentConfig ¶
type DeploymentConfig struct { Namespace string NumReplicas int32 Image string ImagePullPolicy string // Always, IfNotPresent, or Never Count int // Number of deployment actions to run in parallel (concurrency) Actions []Action // CREATE, GET, SCALE, UPDATE, LIST, or DELETE SleepTimes []int // Sleep time in ms after each action YamlSpec string // Below are used for pod filtering (decouple LIST from CREATE) FilterSpec }
type DeploymentCreateSpec ¶
type DeploymentCreateSpec struct { CreateSpec ImageSpec LabelKey string LabelValue string NumReplicas int32 }
type FilterSpec ¶
type LUSDSpec ¶
type LUSDSpec struct { Namespace string FilterSpec }
type NamespaceConfig ¶
type NamespaceConfig struct { Count int Actions []Action // CREATE, GET, UPDATE, LIST, or DELETE SleepTimes []int // Sleep time in ms after each action FilterSpec }
type PodConfig ¶
type PodConfig struct { Namespace string Image string // Image to use for pod creation Count int // Number of pod actions to run in parallel (concurrency) ContainerNamePrefix string // A name prefix for containers inside the Pod ImagePullPolicy string // Always, IfNotPresent, or Never Actions []Action // CREATE, GET, UPDATE, RUN, LIST, or DELETE SleepTimes []int // Sleep time in ms after each action Command string // Command to be run for RUN action PodNamePrefix string // A prefix for a set of pods in an operation YamlSpec string // Path for yaml file used for pod creation // Below are used for pod filtering (for mutable actions) FilterSpec // Used for COPY action tp copy file(s) from and to pod container(s) FileSpec CopySpec }
type PodCreateSpec ¶
type PodCreateSpec struct { CreateSpec ImageSpec LabelKey string LabelValue string }
type PredicateSpec ¶
type PredicateSpec struct { // Resources in PredicateSpec has two possible formats: // 1. namespace/kind/[object_name/][container_name] // 2. group/version/namespaces/namespace/kind/[object_name/][container_name] // An implicit condition by specifying this is that the resources must exist // If container_name is specified, the corresponding resource has to be pods in Running phase Resource string Labels string // label_key_name=label_value_name;... TODO: add build-in vars to refer to current oid and tid Command string // Command to execute (inside the container if container_name above is specified) Expect string // contains:string or !contains:string }
type RcCreateSpec ¶
type RcCreateSpec struct { CreateSpec ImageSpec LabelKey string LabelValue string NumReplicas int32 }
type ResourceConfig ¶
type ServiceConfig ¶
type StatefulSetConfig ¶
type StatefulSetConfig struct {
DeploymentConfig // Currently StatefulSetConfig shares the same structure with DeploymentConfig
}
type TestConfig ¶
type TestConfig struct { VsphereInfra vmware.VsphereConfig // TODO: add other infrastructure support BlockingLevel string Timeout int CheckingInterval int Cleanup bool Operations []WcpOp Tags []perf_util.WavefrontTag WavefrontPathDir string PrometheusManifestPaths []string SleepTimeAfterRun int DockerCompose string RuntimeInMinutes int }
type WcpOp ¶
type WcpOp struct { Predicate PredicateSpec Pod PodConfig `json:"Pods"` Deployment DeploymentConfig `json:"Deployments"` StatefulSet StatefulSetConfig `json:"StatefulSets"` Namespace NamespaceConfig `json:"Namespaces"` Service ServiceConfig `json:"Services"` ReplicationController ReplicationControllerConfig `json:"ReplicationControllers"` ConfigMap ResourceConfig `json:"ConfigMaps"` Endpoints ResourceConfig `json:"Endpoints"` Event ResourceConfig `json:"Events"` ComponentStatus ResourceConfig `json:"ComponentStatuses"` Node ResourceConfig `json:"Nodes"` LimitRange ResourceConfig `json:"LimitRanges"` PersistentVolumeClaim ResourceConfig `json:"PersistentVolumeClaims"` PersistentVolume ResourceConfig `json:"PersistentVolumes"` PodTemplate ResourceConfig `json:"PodTemplates"` ResourceQuota ResourceConfig `json:"ResourceQuotas"` Secret ResourceConfig `json:"Secrets"` ServiceAccount ResourceConfig `json:"ServiceAccounts"` Role ResourceConfig `json:"Roles"` RoleBinding ResourceConfig `json:"RoleBindings"` ClusterRole ResourceConfig `json:"ClusterRoles"` ClusterRoleBinding ResourceConfig `json:"ClusterRoleBindings"` RepeatTimes int }
Click to show internal directories.
Click to hide internal directories.