feat(node-taint): Adding the node taint experiment (#258)
Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io>
This commit is contained in:
committed by
GitHub
parent
52615cb691
commit
b24c6d7631
@@ -27,7 +27,7 @@ spec:
|
|||||||
- pod-memory-hog
|
- pod-memory-hog
|
||||||
- kubelet-service-kill
|
- kubelet-service-kill
|
||||||
- pod-network-duplication
|
- pod-network-duplication
|
||||||
|
- node-taint
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
- Kubernetes
|
- Kubernetes
|
||||||
|
@@ -42,3 +42,6 @@ experiments:
|
|||||||
- name: pod-network-duplication
|
- name: pod-network-duplication
|
||||||
CSV: pod-network-duplication.chartserviceversion.yaml
|
CSV: pod-network-duplication.chartserviceversion.yaml
|
||||||
desc: "pod-network-duplication"
|
desc: "pod-network-duplication"
|
||||||
|
- name: node-taint
|
||||||
|
CSV: node-taint.chartserviceversion.yaml
|
||||||
|
desc: "node-taint"
|
||||||
|
BIN
charts/generic/icons/node-taint.png
Normal file
BIN
charts/generic/icons/node-taint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
32
charts/generic/node-taint/engine.yaml
Normal file
32
charts/generic/node-taint/engine.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be true/false
|
||||||
|
annotationCheck: 'false'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: node-taint-sa
|
||||||
|
monitoring: false
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: node-taint
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set node name
|
||||||
|
- name: APP_NODE
|
||||||
|
value: 'node-1'
|
||||||
|
# set taint label & effect
|
||||||
|
# key=value:effect or key:effect
|
||||||
|
- name: TAINTS
|
||||||
|
value: 'node.kubernetes.io/unreachable:NoExecute'
|
74
charts/generic/node-taint/experiment.yaml
Normal file
74
charts/generic/node-taint/experiment.yaml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Taint the node where application pod is scheduled
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: node-taint
|
||||||
|
version: 0.1.0
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Cluster
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "extensions"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "events"
|
||||||
|
- "pods/log"
|
||||||
|
- "daemonsets"
|
||||||
|
- "pods/eviction"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- "nodes"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
- "patch"
|
||||||
|
image: "litmuschaos/go-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ./experiments/node-taint
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: APP_NODE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Provide the LIB here
|
||||||
|
# Only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set taint label & effect
|
||||||
|
# key=value:effect or key:effect
|
||||||
|
- name: TAINTS
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: node-taint
|
@@ -0,0 +1,45 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-01-13T10:28:08Z
|
||||||
|
name: node-taint
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: Mayadata
|
||||||
|
repository: https://github.com/litmuschaos/chaos-charts
|
||||||
|
support: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN
|
||||||
|
spec:
|
||||||
|
displayName: node-taint
|
||||||
|
categoryDescription: >
|
||||||
|
Taint the node where application pod is scheduled
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- Node
|
||||||
|
- State
|
||||||
|
- Taint
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- AWS(KOPS)
|
||||||
|
- Packet(Kubeadm)
|
||||||
|
- Konvoy
|
||||||
|
- EKS
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: shubham chaudhary
|
||||||
|
email: shubham.chaudhary@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/node-taint
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.litmuschaos.io/docs/node-taint/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/node-taint/experiment.yaml
|
37
charts/generic/node-taint/rbac.yaml
Normal file
37
charts/generic/node-taint/rbac.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: node-taint-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: node-taint-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: node-taint-sa
|
||||||
|
labels:
|
||||||
|
name: node-taint-sa
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","litmuschaos.io","batch","extensions"]
|
||||||
|
resources: ["pods","jobs","events","chaosengines","pods/log","daemonsets","pods/eviction","chaosexperiments","chaosresults"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["patch","get","list"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: node-taint-sa
|
||||||
|
labels:
|
||||||
|
name: node-taint-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: node-taint-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: node-taint-sa
|
||||||
|
namespace: default
|
Reference in New Issue
Block a user