v1alpha1

package
v0.0.0-...-d9d739c Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the litmuschaos v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=litmuschaos.io

Index

Constants

View Source
const GroupName = "cnbrchaos.io"

GroupName is the name of api group for the custom resources

View Source
const GroupVersion = "v1alpha1"

GroupVersion is the version of api group for the custom resources

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme collects functions that add things to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ApplicationParams

type ApplicationParams struct {
	//Namespace of the AUT
	Appns string `json:"appns,omitempty"`
	//Unique label of the AUT
	Applabel string `json:"applabel,omitempty"`
	//kind of application
	AppKind string `json:"appkind,omitempty"`
}

func (*ApplicationParams) DeepCopy

func (in *ApplicationParams) DeepCopy() *ApplicationParams

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationParams.

func (*ApplicationParams) DeepCopyInto

func (in *ApplicationParams) DeepCopyInto(out *ApplicationParams)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosEngine

type ChaosEngine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ChaosEngineSpec   `json:"spec,omitempty"`
	Status ChaosEngineStatus `json:"status,omitempty"`
}

ChaosEngine is the Schema for the chaosengines API +k8s:openapi-gen=true

func (*ChaosEngine) DeepCopy

func (in *ChaosEngine) DeepCopy() *ChaosEngine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosEngine.

func (*ChaosEngine) DeepCopyInto

func (in *ChaosEngine) DeepCopyInto(out *ChaosEngine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosEngine) DeepCopyObject

func (in *ChaosEngine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosEngineList

type ChaosEngineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ChaosEngine `json:"items"`
}

ChaosEngineList contains a list of ChaosEngine +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ChaosEngineList) DeepCopy

func (in *ChaosEngineList) DeepCopy() *ChaosEngineList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosEngineList.

func (*ChaosEngineList) DeepCopyInto

func (in *ChaosEngineList) DeepCopyInto(out *ChaosEngineList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosEngineList) DeepCopyObject

func (in *ChaosEngineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosEngineSpec

type ChaosEngineSpec struct {
	//Appinfo contains deployment details of AUT
	Appinfo ApplicationParams `json:"appinfo,omitempty"`
	//AnnotationCheck defines whether annotation check is allowed or not. It can be true or false
	AnnotationCheck string `json:"annotationCheck,omitempty"`
	//DefaultAppHealthCheck defines whether default health checks should be executed or not. It can be true or false
	// default value is true
	DefaultAppHealthCheck string `json:"defaultAppHealthCheck,omitempty"`
	//ChaosServiceAccount is the SvcAcc specified for chaos runner pods
	ChaosServiceAccount string `json:"chaosServiceAccount"`
	//Components contains the image, imagePullPolicy, arguments, and commands of runner
	Components ComponentParams `json:"components"`
	//Consists of experiments executed by the engine
	Experiments []ExperimentList `json:"experiments"`
	//JobCleanUpPolicy decides to retain or delete the jobs
	JobCleanUpPolicy CleanUpPolicy `json:"jobCleanUpPolicy,omitempty"`
	//AuxiliaryAppInfo contains details of dependent applications (infra chaos)
	AuxiliaryAppInfo string `json:"auxiliaryAppInfo,omitempty"`
	//EngineStatus is a requirement for validation
	EngineState EngineState `json:"engineState"`
	// TerminationGracePeriodSeconds contains terminationGracePeriod for the chaos resources
	TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty"`
}

ChaosEngineSpec defines the desired state of ChaosEngine +k8s:openapi-gen=true ChaosEngineSpec describes a user-facing custom resource which is used by developers to create a chaos profile

func (*ChaosEngineSpec) DeepCopy

func (in *ChaosEngineSpec) DeepCopy() *ChaosEngineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosEngineSpec.

func (*ChaosEngineSpec) DeepCopyInto

func (in *ChaosEngineSpec) DeepCopyInto(out *ChaosEngineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosEngineStatus

type ChaosEngineStatus struct {
	//EngineStatus is a typed string to support limited values for ChaosEngine Status
	EngineStatus EngineStatus `json:"engineStatus"`
	//Detailed status of individual experiments
	Experiments []ExperimentStatuses `json:"experiments"`
}

ChaosEngineStatus derives information about status of individual experiments

func (*ChaosEngineStatus) DeepCopy

func (in *ChaosEngineStatus) DeepCopy() *ChaosEngineStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosEngineStatus.

func (*ChaosEngineStatus) DeepCopyInto

func (in *ChaosEngineStatus) DeepCopyInto(out *ChaosEngineStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosExperiment

type ChaosExperiment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ChaosExperimentSpec   `json:"spec,omitempty"`
	Status ChaosExperimentStatus `json:"status,omitempty"`
}

ChaosExperiment is the Schema for the chaosexperiments API +k8s:openapi-gen=true

func (*ChaosExperiment) DeepCopy

func (in *ChaosExperiment) DeepCopy() *ChaosExperiment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosExperiment.

func (*ChaosExperiment) DeepCopyInto

func (in *ChaosExperiment) DeepCopyInto(out *ChaosExperiment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosExperiment) DeepCopyObject

func (in *ChaosExperiment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosExperimentList

type ChaosExperimentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ChaosExperiment `json:"items"`
}

ChaosExperimentList contains a list of ChaosExperiment +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ChaosExperimentList) DeepCopy

func (in *ChaosExperimentList) DeepCopy() *ChaosExperimentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosExperimentList.

func (*ChaosExperimentList) DeepCopyInto

func (in *ChaosExperimentList) DeepCopyInto(out *ChaosExperimentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosExperimentList) DeepCopyObject

func (in *ChaosExperimentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosExperimentSpec

type ChaosExperimentSpec struct {
	// Definition carries low-level chaos options
	Definition ExperimentDef `json:"definition"`
}

ChaosExperimentSpec defines the desired state of ChaosExperiment +k8s:openapi-gen=true An experiment is the definition of a chaos test and is listed as an item in the chaos engine to be run against a given app.

func (*ChaosExperimentSpec) DeepCopy

func (in *ChaosExperimentSpec) DeepCopy() *ChaosExperimentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosExperimentSpec.

func (*ChaosExperimentSpec) DeepCopyInto

func (in *ChaosExperimentSpec) DeepCopyInto(out *ChaosExperimentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosExperimentStatus

type ChaosExperimentStatus struct {
}

ChaosExperimentStatus defines the observed state of ChaosExperiment +k8s:openapi-gen=true

func (*ChaosExperimentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosExperimentStatus.

func (*ChaosExperimentStatus) DeepCopyInto

func (in *ChaosExperimentStatus) DeepCopyInto(out *ChaosExperimentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosResult

type ChaosResult struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ChaosResultSpec   `json:"spec,omitempty"`
	Status ChaosResultStatus `json:"status,omitempty"`
}

ChaosResult is the Schema for the chaosresults API +k8s:openapi-gen=true

func (*ChaosResult) DeepCopy

func (in *ChaosResult) DeepCopy() *ChaosResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosResult.

func (*ChaosResult) DeepCopyInto

func (in *ChaosResult) DeepCopyInto(out *ChaosResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosResult) DeepCopyObject

func (in *ChaosResult) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosResultList

type ChaosResultList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ChaosResult `json:"items"`
}

ChaosResultList contains a list of ChaosResult +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ChaosResultList) DeepCopy

func (in *ChaosResultList) DeepCopy() *ChaosResultList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosResultList.

func (*ChaosResultList) DeepCopyInto

func (in *ChaosResultList) DeepCopyInto(out *ChaosResultList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChaosResultList) DeepCopyObject

func (in *ChaosResultList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChaosResultSpec

type ChaosResultSpec struct {
	// EngineName defines the name of chaosEngine
	EngineName string `json:"engine,omitempty"`
	// ExperimentName defines the name of chaosexperiment
	ExperimentName string `json:"experiment"`
	// InstanceID defines the instance id
	InstanceID string `json:"instance,omitempty"`
}

ChaosResultSpec defines the desired state of ChaosResult +k8s:openapi-gen=true The chaosresult holds the status of a chaos experiment that is listed as an item in the chaos engine to be run against a given app.

func (*ChaosResultSpec) DeepCopy

func (in *ChaosResultSpec) DeepCopy() *ChaosResultSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosResultSpec.

func (*ChaosResultSpec) DeepCopyInto

func (in *ChaosResultSpec) DeepCopyInto(out *ChaosResultSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosResultStatus

type ChaosResultStatus struct {

	// ExperimentStatus contains the status,verdict of the experiment
	ExperimentStatus TestStatus `json:"experimentStatus"`
	// ProbeStatus contains the status of the probe
	ProbeStatus []ProbeStatus `json:"probeStatus,omitempty"`
	// History contains cumulative values of verdicts
	History HistoryDetails `json:"history,omitempty"`
}

ChaosResultStatus defines the observed state of ChaosResult +k8s:openapi-gen=true

func (*ChaosResultStatus) DeepCopy

func (in *ChaosResultStatus) DeepCopy() *ChaosResultStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosResultStatus.

func (*ChaosResultStatus) DeepCopyInto

func (in *ChaosResultStatus) DeepCopyInto(out *ChaosResultStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CleanUpPolicy

type CleanUpPolicy string

CleanUpPolicy defines the garbage collection method used by chaos-operator

const (
	//CleanUpPolicyDelete sets the garbage collection policy of chaos-operator to Delete Chaos Resources
	CleanUpPolicyDelete CleanUpPolicy = "delete"

	//CleanUpPolicyRetain sets the garbage collection policy of chaos-operator to Retain Chaos Resources
	CleanUpPolicyRetain CleanUpPolicy = "retain"
)

type CmdProbeInputs

type CmdProbeInputs struct {
	// Command need to be executed for the probe
	Command string `json:"command,omitempty"`
	// Comparator check for the correctness of the probe output
	Comparator ComparatorInfo `json:"comparator,omitempty"`
	// The source where we have to run the command
	// It will run in inline(inside experiment itself) mode if source is nil
	Source SourceDetails `json:"source,omitempty"`
}

CmdProbeInputs contains all the inputs required for cmd probe

func (*CmdProbeInputs) DeepCopy

func (in *CmdProbeInputs) DeepCopy() *CmdProbeInputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CmdProbeInputs.

func (*CmdProbeInputs) DeepCopyInto

func (in *CmdProbeInputs) DeepCopyInto(out *CmdProbeInputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ComparatorInfo

type ComparatorInfo struct {
	// Type of data
	// it can be int, float, string
	Type string `json:"type,omitempty"`
	// Criteria for matching data
	// it supports >=, <=, ==, >, <, != for int and float
	// it supports equal, notEqual, contains for string
	Criteria string `json:"criteria,omitempty"`
	// Value contains relative value for criteria
	Value string `json:"value,omitempty"`
}

ComparatorInfo contains the comparator details

func (*ComparatorInfo) DeepCopy

func (in *ComparatorInfo) DeepCopy() *ComparatorInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComparatorInfo.

func (*ComparatorInfo) DeepCopyInto

func (in *ComparatorInfo) DeepCopyInto(out *ComparatorInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ComponentParams

type ComponentParams struct {
	//Contains informations of the the runner pod
	Runner RunnerInfo `json:"runner"`
}

ComponentParams defines information about the runner

func (*ComponentParams) DeepCopy

func (in *ComponentParams) DeepCopy() *ComponentParams

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParams.

func (*ComponentParams) DeepCopyInto

func (in *ComponentParams) DeepCopyInto(out *ComponentParams)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigMap

type ConfigMap struct {
	Data      map[string]string `json:"data,omitempty"`
	Name      string            `json:"name"`
	MountPath string            `json:"mountPath"`
}

ConfigMap is an simpler implementation of corev1.ConfigMaps, needed for experiments

func (*ConfigMap) DeepCopy

func (in *ConfigMap) DeepCopy() *ConfigMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMap.

func (*ConfigMap) DeepCopyInto

func (in *ConfigMap) DeepCopyInto(out *ConfigMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EngineState

type EngineState string

EngineState provides interface for all supported strings in spec.EngineState

const (
	// EngineStateActive starts the reconcile call
	EngineStateActive EngineState = "active"
	// EngineStateStop stops the reconcile call
	EngineStateStop EngineState = "stop"
)

type EngineStatus

type EngineStatus string

EngineStatus provides interface for all supported strings in status.EngineStatus

const (
	// EngineStatusInitialized is used for reconcile calls to start reconcile for creation
	EngineStatusInitialized EngineStatus = "initialized"
	// EngineStatusCompleted is used for reconcile calls to start reconcile for completion
	EngineStatusCompleted EngineStatus = "completed"
	// EngineStatusStopped is used for reconcile calls to start reconcile for delete
	EngineStatusStopped EngineStatus = "stopped"
)

type ExperimentAttributes

type ExperimentAttributes struct {
	//Execution priority of the chaos experiment
	Rank uint32 `json:"rank"`
	// It contains env, configmaps, secrets, experimentImage, node selector, custom experiment annotation
	// which can be provided or overridden from the chaos engine
	Components ExperimentComponents `json:"components,omitempty"`
	// Probe contains details of probe, which can be applied on the experiments
	// Probe can be httpProbe, k8sProbe or cmdProbe
	Probe []ProbeAttributes `json:"probe,omitempty"`
}

ExperimentAttributes defines attributes of experiments

func (*ExperimentAttributes) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentAttributes.

func (*ExperimentAttributes) DeepCopyInto

func (in *ExperimentAttributes) DeepCopyInto(out *ExperimentAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExperimentComponents

type ExperimentComponents struct {
	ENV                        []corev1.EnvVar               `json:"env,omitempty"`
	ConfigMaps                 []ConfigMap                   `json:"configMaps,omitempty"`
	Secrets                    []Secret                      `json:"secrets,omitempty"`
	ExperimentAnnotations      map[string]string             `json:"experimentAnnotations,omitempty"`
	ExperimentImage            string                        `json:"experimentImage,omitempty"`
	ExperimentImagePullSecrets []corev1.LocalObjectReference `json:"experimentImagePullSecrets,omitempty"`
	NodeSelector               map[string]string             `json:"nodeSelector,omitempty"`
	StatusCheckTimeouts        StatusCheckTimeout            `json:"statusCheckTimeouts,omitempty"`
	Resources                  corev1.ResourceRequirements   `json:"resources,omitempty"`
	Tolerations                []corev1.Toleration           `json:"tolerations,omitempty"`
}

ExperimentComponents contains ENV, Configmaps and Secrets

func (*ExperimentComponents) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentComponents.

func (*ExperimentComponents) DeepCopyInto

func (in *ExperimentComponents) DeepCopyInto(out *ExperimentComponents)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExperimentDef

type ExperimentDef struct {
	// Default labels of the runner pod
	// +optional
	Labels map[string]string `json:"labels"`
	// Image of the chaos experiment
	Image string `json:"image"`
	// ImagePullPolicy of the chaos experiment container
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	//Scope specifies the service account scope (& thereby blast radius) of the experiment
	Scope string `json:"scope"`
	// List of Permission needed for a service account to execute experiment
	Permissions []rbacV1.PolicyRule `json:"permissions"`
	// List of ENV vars passed to executor pod
	ENVList []corev1.EnvVar `json:"env"`
	// Defines command to invoke experiment
	Command []string `json:"command"`
	// Defines arguments to runner's entrypoint command
	Args []string `json:"args"`
	// ConfigMaps contains a list of ConfigMaps
	ConfigMaps []ConfigMap `json:"configMaps,omitempty"`
	// Secrets contains a list of Secrets
	Secrets []Secret `json:"secrets,omitempty"`
	// HostFileVolume defines the host directory/file to be mounted
	HostFileVolumes []HostFile `json:"hostFileVolumes,omitempty"`
	// Annotations that needs to be provided in the pod for pod that is getting created
	ExperimentAnnotations map[string]string `json:"experimentAnnotations,omitempty"`
	// SecurityContext holds security configuration that will be applied to a container
	SecurityContext SecurityContext `json:"securityContext,omitempty"`
	// HostPID is need to be provided in the chaospod
	HostPID bool `json:"hostPID,omitempty"`
}

ExperimentDef defines information about nature of chaos & components subjected to it

func (*ExperimentDef) DeepCopy

func (in *ExperimentDef) DeepCopy() *ExperimentDef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentDef.

func (*ExperimentDef) DeepCopyInto

func (in *ExperimentDef) DeepCopyInto(out *ExperimentDef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExperimentList

type ExperimentList struct {
	//Name of the chaos experiment
	Name string `json:"name"`
	//Holds properties of an experiment listed in the engine
	Spec ExperimentAttributes `json:"spec"`
}

ExperimentList defines information about chaos experiments defined in the chaos engine These experiments are "pulled" as versioned charts from a "hub"

func (*ExperimentList) DeepCopy

func (in *ExperimentList) DeepCopy() *ExperimentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentList.

func (*ExperimentList) DeepCopyInto

func (in *ExperimentList) DeepCopyInto(out *ExperimentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExperimentStatus

type ExperimentStatus string

ExperimentStatus is typecasted to string for supporting the values below.

const (
	// ExperimentStatusRunning is status of Experiment which is currently running
	ExperimentStatusRunning ExperimentStatus = "Running"
	// ExperimentStatusCompleted is status of Experiment which has been completed
	ExperimentStatusCompleted ExperimentStatus = "Completed"
	// ExperimentStatusWaiting is status of Experiment which will be executed via a Job
	ExperimentStatusWaiting ExperimentStatus = "Waiting for Job Creation"
	// ExperimentStatusNotFound is status of Experiment which is not found inside ChaosNamespace
	ExperimentStatusNotFound ExperimentStatus = "ChaosExperiment Not Found"
	// ExperimentStatusAborted is status of a Experiment is forcefully aborted
	ExperimentStatusAborted ExperimentStatus = "Forcefully Aborted"
	// ExperimentSkipped is status of Experiment which has been skipped
	ExperimentSkipped ExperimentStatus = "Skipped"
)

type ExperimentStatuses

type ExperimentStatuses struct {
	//Name of the chaos experiment
	Name string `json:"name"`
	//Name of chaos-runner pod managing this experiment
	Runner string `json:"runner"`
	//Name of experiment pod executing the chaos
	ExpPod string `json:"experimentPod"`
	//Current state of chaos experiment
	Status ExperimentStatus `json:"status"`
	//Result of a completed chaos experiment
	Verdict string `json:"verdict"`
	//Time of last state change of chaos experiment
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`
}

ExperimentStatuses defines information about status of individual experiments These fields are immutable, and are derived by kubernetes(operator)

func (*ExperimentStatuses) DeepCopy

func (in *ExperimentStatuses) DeepCopy() *ExperimentStatuses

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatuses.

func (*ExperimentStatuses) DeepCopyInto

func (in *ExperimentStatuses) DeepCopyInto(out *ExperimentStatuses)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GetMethod

type GetMethod struct {
	// Criteria for matching data
	// it supports  == != operations
	Criteria string `json:"criteria,omitempty"`
	// Value contains relative value for criteria
	ResponseCode string `json:"responseCode,omitempty"`
}

GetMethod define the http Get method

func (*GetMethod) DeepCopy

func (in *GetMethod) DeepCopy() *GetMethod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetMethod.

func (*GetMethod) DeepCopyInto

func (in *GetMethod) DeepCopyInto(out *GetMethod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPMethod

type HTTPMethod struct {
	Get  GetMethod  `json:"get,omitempty"`
	Post PostMethod `json:"post,omitempty"`
}

HTTPMethod define the http method details

func (*HTTPMethod) DeepCopy

func (in *HTTPMethod) DeepCopy() *HTTPMethod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPMethod.

func (*HTTPMethod) DeepCopyInto

func (in *HTTPMethod) DeepCopyInto(out *HTTPMethod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPProbeInputs

type HTTPProbeInputs struct {
	// URL which needs to curl, to check the status
	URL string `json:"url,omitempty"`
	// InsecureSkipVerify flag to skip certificate checks
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
	// Method define the http method, it can be get or post
	Method HTTPMethod `json:"method,omitempty"`
	// ResponseTimeout contains the http response timeout
	ResponseTimeout int `json:"responseTimeout,omitempty"`
}

HTTPProbeInputs contains all the inputs required for http probe

func (*HTTPProbeInputs) DeepCopy

func (in *HTTPProbeInputs) DeepCopy() *HTTPProbeInputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPProbeInputs.

func (*HTTPProbeInputs) DeepCopyInto

func (in *HTTPProbeInputs) DeepCopyInto(out *HTTPProbeInputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HistoryDetails

type HistoryDetails struct {
	PassedRuns  int             `json:"passedRuns"`
	FailedRuns  int             `json:"failedRuns"`
	StoppedRuns int             `json:"stoppedRuns"`
	Targets     []TargetDetails `json:"targets,omitempty"`
}

HistoryDetails contains cumulative values of verdicts

func (*HistoryDetails) DeepCopy

func (in *HistoryDetails) DeepCopy() *HistoryDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistoryDetails.

func (*HistoryDetails) DeepCopyInto

func (in *HistoryDetails) DeepCopyInto(out *HistoryDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HostFile

type HostFile struct {
	Name      string              `json:"name"`
	MountPath string              `json:"mountPath"`
	NodePath  string              `json:"nodePath"`
	Type      corev1.HostPathType `json:"type,omitempty"`
}

HostFile is an simpler implementation of corev1.HostPath, needed for experiments

func (*HostFile) DeepCopy

func (in *HostFile) DeepCopy() *HostFile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostFile.

func (*HostFile) DeepCopyInto

func (in *HostFile) DeepCopyInto(out *HostFile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type K8sProbeInputs

type K8sProbeInputs struct {
	// group of the resource
	Group string `json:"group,omitempty"`
	// apiversion of the resource
	Version string `json:"version,omitempty"`
	// kind of resource
	Resource string `json:"resource,omitempty"`
	// namespace of the resource
	Namespace string `json:"namespace,omitempty"`
	// fieldselector to get the resource using fields selector
	FieldSelector string `json:"fieldSelector,omitempty"`
	// labelselector to get the resource using labels selector
	LabelSelector string `json:"labelSelector,omitempty"`
	// Operation performed by the k8s probe
	// it can be create, delete, present, absent
	Operation string `json:"operation,omitempty"`
}

K8sProbeInputs contains all the inputs required for k8s probe

func (*K8sProbeInputs) DeepCopy

func (in *K8sProbeInputs) DeepCopy() *K8sProbeInputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sProbeInputs.

func (*K8sProbeInputs) DeepCopyInto

func (in *K8sProbeInputs) DeepCopyInto(out *K8sProbeInputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostMethod

type PostMethod struct {
	// ContentType contains content type for http body data
	ContentType string `json:"contentType,omitempty"`
	// Body contains http body for post request
	Body string `json:"body,omitempty"`
	// BodyPath contains filePath, which contains http body
	BodyPath string `json:"bodyPath,omitempty"`
	// Criteria for matching data
	// it supports  == != operations
	Criteria string `json:"criteria,omitempty"`
	// Value contains relative value for criteria
	ResponseCode string `json:"responseCode,omitempty"`
}

PostMethod define the http Post method

func (*PostMethod) DeepCopy

func (in *PostMethod) DeepCopy() *PostMethod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostMethod.

func (*PostMethod) DeepCopyInto

func (in *PostMethod) DeepCopyInto(out *PostMethod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProbeAttributes

type ProbeAttributes struct {
	// Name of probe
	Name string `json:"name,omitempty"`
	// Type of probe
	Type string `json:"type,omitempty"`
	// inputs needed for the k8s probe
	K8sProbeInputs K8sProbeInputs `json:"k8sProbe/inputs,omitempty"`
	// inputs needed for the http probe
	HTTPProbeInputs HTTPProbeInputs `json:"httpProbe/inputs,omitempty"`
	// inputs needed for the cmd probe
	CmdProbeInputs CmdProbeInputs `json:"cmdProbe/inputs,omitempty"`
	// inputs needed for the prometheus probe
	PromProbeInputs PromProbeInputs `json:"promProbe/inputs,omitempty"`
	// RunProperty contains timeout, retry and interval for the probe
	RunProperties RunProperty `json:"runProperties,omitempty"`
	// mode for k8s probe
	// it can be SOT, EOT, Edge
	Mode string `json:"mode,omitempty"`
	// Data contains the manifest/data for the resource, which need to be created
	// it supported for create operation only
	Data string `json:"data,omitempty"`
}

ProbeAttributes contains details of probe, which can be applied on the experiments

func (*ProbeAttributes) DeepCopy

func (in *ProbeAttributes) DeepCopy() *ProbeAttributes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeAttributes.

func (*ProbeAttributes) DeepCopyInto

func (in *ProbeAttributes) DeepCopyInto(out *ProbeAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProbeStatus

type ProbeStatus struct {
	// Name defines the name of probe
	Name string `json:"name,omitempty"`
	// Type defined the type of probe, supported values: K8sProbe, HttpProbe, CmdProbe
	Type string `json:"type,omitempty"`
	// Status defines whether a probe is pass or fail
	Status map[string]string `json:"status,omitempty"`
}

ProbeStatus defines information about the status and result of the probes

func (*ProbeStatus) DeepCopy

func (in *ProbeStatus) DeepCopy() *ProbeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeStatus.

func (*ProbeStatus) DeepCopyInto

func (in *ProbeStatus) DeepCopyInto(out *ProbeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PromProbeInputs

type PromProbeInputs struct {
	// Endpoint for the prometheus probe
	Endpoint string `json:"endpoint,omitempty"`
	// Query to get promethus metrics
	Query string `json:"query,omitempty"`
	// QueryPath contains filePath, which contains prometheus query
	QueryPath string `json:"queryPath,omitempty"`
	// Comparator check for the correctness of the probe output
	Comparator ComparatorInfo `json:"comparator,omitempty"`
}

PromProbeInputs contains all the inputs required for prometheus probe

func (*PromProbeInputs) DeepCopy

func (in *PromProbeInputs) DeepCopy() *PromProbeInputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromProbeInputs.

func (*PromProbeInputs) DeepCopyInto

func (in *PromProbeInputs) DeepCopyInto(out *PromProbeInputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResultPhase

type ResultPhase string

ResultPhase is typecasted to string for supporting the values below.

const (
	// ResultPhaseRunning is phase of chaosresult which is in running state
	ResultPhaseRunning ResultPhase = "Running"
	// ResultPhaseCompleted is phase of chaosresult which is in completed state
	ResultPhaseCompleted ResultPhase = "Completed"
	// ResultPhaseStopped is phase of chaosresult which is in stopped state
	ResultPhaseStopped ResultPhase = "Stopped"
)

type ResultVerdict

type ResultVerdict string

ResultVerdict is typecasted to string for supporting the values below.

const (
	// ResultVerdictPassed is verdict of chaosresult when experiment passed
	ResultVerdictPassed ResultVerdict = "Pass"
	// ResultVerdictFailed is verdict of chaosresult when experiment failed
	ResultVerdictFailed ResultVerdict = "Fail"
	// ResultVerdictStopped is verdict of chaosresult when experiment aborted
	ResultVerdictStopped ResultVerdict = "Stopped"
)

type RunProperty

type RunProperty struct {
	//ProbeTimeout contains timeout for the probe
	ProbeTimeout int `json:"probeTimeout,omitempty"`
	// Interval contains the inverval for the probe
	Interval int `json:"interval,omitempty"`
	// Retry contains the retry count for the probe
	Retry int `json:"retry,omitempty"`
	//ProbePollingInterval contains time interval, for which continuous probe should be sleep
	// after each iteration
	ProbePollingInterval int `json:"probePollingInterval,omitempty"`
	//InitialDelaySeconds time interval for which probe will wait before run
	InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"`
	// StopOnFailure contains flag to stop/continue experiment execution, if probe fails
	// it will stop the experiment execution, if provided true
	// it will continue the experiment execution, if provided false or not provided(default case)
	StopOnFailure bool `json:"stopOnFailure,omitempty"`
}

RunProperty contains timeout, retry and interval for the probe

func (*RunProperty) DeepCopy

func (in *RunProperty) DeepCopy() *RunProperty

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunProperty.

func (*RunProperty) DeepCopyInto

func (in *RunProperty) DeepCopyInto(out *RunProperty)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RunnerInfo

type RunnerInfo struct {
	//Image of the runner pod
	Image string `json:"image,omitempty"`
	//Type of runner
	Type string `json:"type,omitempty"`
	//Args of runner
	Args []string `json:"args,omitempty"`
	//Command for runner
	Command []string `json:"command,omitempty"`
	//ImagePullPolicy for runner pod
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	//ImagePullSecrets for runner pod
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// Runner Annotations that needs to be provided in the pod for pod that is getting created
	RunnerAnnotation map[string]string `json:"runnerAnnotations,omitempty"`
	// NodeSelector for runner pod
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// ConfigMaps for runner pod
	ConfigMaps []ConfigMap `json:"configMaps,omitempty"`
	// Secrets for runner pod
	Secrets []Secret `json:"secrets,omitempty"`
	// Tolerations for runner pod
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// Resource requirements for the runner pod
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

RunnerInfo defines the information of the runnerinfo pod

func (*RunnerInfo) DeepCopy

func (in *RunnerInfo) DeepCopy() *RunnerInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerInfo.

func (*RunnerInfo) DeepCopyInto

func (in *RunnerInfo) DeepCopyInto(out *RunnerInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Secret

type Secret struct {
	Name      string `json:"name"`
	MountPath string `json:"mountPath"`
}

Secret is an simpler implementation of corev1.Secret

func (*Secret) DeepCopy

func (in *Secret) DeepCopy() *Secret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret.

func (*Secret) DeepCopyInto

func (in *Secret) DeepCopyInto(out *Secret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecurityContext

type SecurityContext struct {
	// PodSecurityContext holds security configuration that will be applied to a pod
	PodSecurityContext corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// ContainerSecurityContext holds security configuration that will be applied to a container
	ContainerSecurityContext corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
}

SecurityContext defines the security contexts of the pod and container.

func (*SecurityContext) DeepCopy

func (in *SecurityContext) DeepCopy() *SecurityContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContext.

func (*SecurityContext) DeepCopyInto

func (in *SecurityContext) DeepCopyInto(out *SecurityContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SourceDetails

type SourceDetails struct {
	// Image of the source pod
	Image string `json:"image,omitempty"`
	// HostNetwork define the hostNetwork of the external pod
	// it supports boolean values and default value is false
	HostNetwork bool `json:"hostNetwork,omitempty"`
}

SourceDetails contains source details of the cmdProbe

func (*SourceDetails) DeepCopy

func (in *SourceDetails) DeepCopy() *SourceDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceDetails.

func (*SourceDetails) DeepCopyInto

func (in *SourceDetails) DeepCopyInto(out *SourceDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StatusCheckTimeout

type StatusCheckTimeout struct {
	Delay   int `json:"delay,omitempty"`
	Timeout int `json:"timeout,omitempty"`
}

StatusCheckTimeout contains Delay and timeouts for the status checks

func (*StatusCheckTimeout) DeepCopy

func (in *StatusCheckTimeout) DeepCopy() *StatusCheckTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckTimeout.

func (*StatusCheckTimeout) DeepCopyInto

func (in *StatusCheckTimeout) DeepCopyInto(out *StatusCheckTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetDetails

type TargetDetails struct {
	Name        string `json:"name,omitempty"`
	Kind        string `json:"kind,omitempty"`
	ChaosStatus string `json:"chaosStatus,omitempty"`
}

TargetDetails contains target details for the experiment and the chaos status

func (*TargetDetails) DeepCopy

func (in *TargetDetails) DeepCopy() *TargetDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetDetails.

func (*TargetDetails) DeepCopyInto

func (in *TargetDetails) DeepCopyInto(out *TargetDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestStatus

type TestStatus struct {
	// Phase defines whether an experiment is running or completed
	Phase ResultPhase `json:"phase"`
	// Verdict defines whether an experiment result is pass or fail
	Verdict ResultVerdict `json:"verdict"`
	// FailStep defines step where the experiments fails
	FailStep string `json:"failStep,omitempty"`
	// ProbeSuccessPercentage defines the score of the probes
	ProbeSuccessPercentage string `json:"probeSuccessPercentage,omitempty"`
}

TestStatus defines information about the status and results of a chaos experiment

func (*TestStatus) DeepCopy

func (in *TestStatus) DeepCopy() *TestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStatus.

func (*TestStatus) DeepCopyInto

func (in *TestStatus) DeepCopyInto(out *TestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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