Documentation
¶
Index ¶
- Constants
- Variables
- func CreateVerificationsFromObjective(objective *entities.Objective) ([]*verificationTypes.Verification, error)
- func CreateVerificationtFromObjectives(ents []entities.Entity) ([]entities.Entity, error)
- func GetExperimentForObjectives(objectives []*entities.Objective) (*types.Experiment, error)
- func GetExperimentsForObjective(objective *entities.Objective) ([]types.Experiment, error)
- func RandomString(l int) (string, error)
Constants ¶
View Source
const ( PodObjective string = "objective-kubernetes-pod" DeploymentObjective string = "objective-kubernetes-deployment" ServiceObjective string = "objective-kubernetes-service" )
Variables ¶
View Source
var TypeToMethod = map[string][]types.Experiment{ PodObjective: { types.Experiment{ Title: "", Description: "Terminate one pod at random in the pool. Helps determining if we have enough replicas to handle the recover yof a single pod.", Controls: nil, SteadyStateHypothesis: types.ExperimentSteadyStateHypothesis{ Title: "We expect pod terminating has not impacted our objective", }, Method: []types.ExperimentActivity{ { Type: "action", Name: "Terminating a Random Pod", Provider: map[string]interface{}{ "type": "python", "module": "chaosk8s.pod.actions", "func": "terminate_pods", "arguments": map[string]string{ "label_selector": "", "ns": "default", }, "pauses": map[string]int{ "after": 30, }, }, }, }, Rollbacks: []types.ExperimentActivity{}, }, }, DeploymentObjective: { types.Experiment{ Title: "", Description: "Deployment can recovers from losing a replica. Useful to understand how long users get impacted when losing some availability.", Controls: nil, SteadyStateHypothesis: types.ExperimentSteadyStateHypothesis{ Title: "We expect the deployment to self-heal when one of its replica set is gone.", }, Method: []types.ExperimentActivity{ { Type: "action", Name: "Deleting replicat set", Provider: map[string]interface{}{ "type": "python", "module": "chaosk8s.replicaset.actions", "func": "delete_replica_set", "arguments": map[string]string{ "label_selector": "", "ns": "default", }, }, Pauses: map[string]int{ "after": 10, }, }, { Type: "probe", Name: "Probing if all replicas are ready", Provider: map[string]interface{}{ "type": "python", "module": "chaosk8s.deployment.probes", "func": "deployment_available_and_healthy", "arguments": map[string]string{ "name": "", "ns": "default", }, }, }, }, Rollbacks: []types.ExperimentActivity{}, }, }, }
Functions ¶
func CreateVerificationsFromObjective ¶
func CreateVerificationsFromObjective(objective *entities.Objective) ([]*verificationTypes.Verification, error)
func GetExperimentForObjectives ¶
func GetExperimentForObjectives(objectives []*entities.Objective) (*types.Experiment, error)
func GetExperimentsForObjective ¶
func GetExperimentsForObjective(objective *entities.Objective) ([]types.Experiment, error)
func RandomString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.