Last active
November 2, 2020 15:23
-
-
Save ksatchit/7071948187f296e54e6303549444da07 to your computer and use it in GitHub Desktop.
moac-reconcile-chaos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# chaosengine.yaml | |
apiVersion: litmuschaos.io/v1alpha1 | |
kind: ChaosEngine | |
metadata: | |
name: moac-reconcile-chaos | |
namespace: mayastor | |
spec: | |
jobCleanUpPolicy: 'delete' | |
annotationCheck: 'true' | |
engineState: 'active' | |
auxiliaryAppInfo: '' | |
monitoring: false | |
appinfo: | |
appns: 'default' | |
applabel: 'app=moac' | |
appkind: 'deployment' | |
chaosServiceAccount: moac-network-loss-sa | |
experiments: | |
- name: moac-network-loss | |
spec: | |
probe: | |
- name: moac-stability-check | |
type: k8sProbe | |
k8sProbe/inputs: | |
command: | |
group: "apps" | |
version: "v1" | |
resource: "Deployment" | |
namespace: "mayastor" | |
labelSelector: "app=nats" | |
operation: present | |
mode: "Edge" | |
runProperties: | |
probeTimeout: 5 | |
interval: 5 | |
retry: 1 | |
- name: moac-negative-pool-operation | |
type: k8sProbe | |
k8sProbe/inputs: | |
command: | |
group: "openebs.io" | |
version: "v1alpha1" | |
resource: "MayastorPool" | |
namespace: "mayastor" | |
operation: create | |
mode: "OnChaos" | |
runProperties: | |
probeTimeout: 5 | |
interval: 5 | |
retry: 1 | |
initialDelaySeconds: 30 | |
## we need a slightly altered version of the continuous mode/probePoll | |
probePollingInterval: 120 | |
data: | | |
apiVersion: "openebs.io/v1alpha1" | |
kind: MayastorPool | |
metadata: | |
name: maya-invalid-pool | |
namespace: mayastor | |
spec: | |
node: workernode-1-hostname | |
disks: ["invalid"] | |
- name: moac-reconcile-check | |
type: k8sProbe | |
k8sProbe/inputs: | |
command: | |
group: "openebs.io" | |
version: "v1alpha1" | |
resource: "MayastorPool" | |
namespace: "mayastor" | |
## Expectation is that MoaC updates the CR status to failed because of an invalid pool spec | |
## For this status update to occur, MoaCs reconcile should be working fine | |
## We check this after removing egress n/w loss on MoaC | |
fieldSelector: "metadata.name=maya-invalid-pool,status.state=Failed" | |
operation: present | |
mode: "EoT" | |
runProperties: | |
initialDelaySeconds: 30 | |
probeTimeout: 5 | |
interval: 5 | |
retry: 1 | |
- name: moac-pool-cleanup | |
k8sProbe/inputs: | |
command: | |
group: "openebs.io" | |
version: "v1alpha1" | |
resource: "MayastorPool" | |
namespace: "mayastor" | |
## This is for the failed pool cleanup process | |
fieldSelector: "metadata.name=maya-invalid-pool" | |
operation: delete | |
mode: "EoT" | |
runProperties: | |
initialDelaySeconds: 30 | |
probeTimeout: 5 | |
interval: 5 | |
retry: 1 | |
components: | |
env: | |
- name: LIB_IMAGE | |
value: 'litmuschaos/go-runner:1.9.0' | |
#Network interface inside target container | |
- name: NETWORK_INTERFACE | |
value: 'eth0' | |
- name: NETWORK_PACKET_LOSS_PERCENTAGE | |
value: '100' | |
- name: TOTAL_CHAOS_DURATION | |
value: '120' # in seconds | |
# provide the name of container runtime | |
# it supports docker, containerd, crio | |
# default to docker | |
- name: CONTAINER_RUNTIME | |
value: 'docker' | |
# provide the socket file path | |
# applicable only for containerd and crio runtime | |
- name: SOCKET_PATH | |
value: '/run/containerd/containerd.sock' | |
- name: POOL_CLEAN_UP | |
value: "true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment