Add node restart chart (#371)
Signed-off-by: Ondra Machacek <omachace@redhat.com>
This commit is contained in:
@@ -34,6 +34,7 @@ spec:
|
||||
- k8-service-kill
|
||||
- node-io-stress
|
||||
- pod-io-stress
|
||||
- node-restart
|
||||
|
||||
keywords:
|
||||
- Kubernetes
|
||||
|
@@ -63,3 +63,6 @@ experiments:
|
||||
- name: pod-io-stress
|
||||
CSV: pod-io-stress.chartserviceversion.yaml
|
||||
desc: "pod-io-stress"
|
||||
- name: node-restart
|
||||
CSV: node-restart.chartserviceversion.yaml
|
||||
desc: "node-restart"
|
||||
|
32
charts/generic/node-restart/engine.yaml
Normal file
32
charts/generic/node-restart/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-restart-sa
|
||||
monitoring: false
|
||||
# It can be delete/retain
|
||||
jobCleanUpPolicy: 'delete'
|
||||
experiments:
|
||||
- name: node-restart
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# ENTER THE NAME OF THE TARGET NODE
|
||||
- name: TARGET_NODE
|
||||
value: ''
|
||||
|
||||
# ENTER THE USER TO BE USED FOR SSH AUTH
|
||||
- name: SSH_USER
|
||||
value: ''
|
77
charts/generic/node-restart/experiment.yaml
Normal file
77
charts/generic/node-restart/experiment.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Restart node
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: node-restart
|
||||
version: 0.1.0
|
||||
labels:
|
||||
name: node-restart
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Cluster
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "batch"
|
||||
- "apps"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "pods/log"
|
||||
- "events"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
- "secrets"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs:
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/go-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name node-restart
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: SSH_USER
|
||||
value: 'root'
|
||||
|
||||
# PROVIDE THE LIB HERE
|
||||
# ONLY LITMUS SUPPORTED
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
|
||||
# provide lib image
|
||||
- name: LIB_IMAGE
|
||||
value: "litmuschaos/go-runner:latest"
|
||||
|
||||
# ENTER THE NAME OF THE TARGET NODE
|
||||
- name: TARGET_NODE
|
||||
value: ''
|
||||
|
||||
labels:
|
||||
name: node-restart
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
secrets:
|
||||
- name: id-rsa
|
||||
mountPath: /mnt/
|
@@ -0,0 +1,41 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2019-01-28T10:28:08Z
|
||||
name: node-restart
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: node-restart
|
||||
categoryDescription: |
|
||||
Node restart contains chaos to restart the node via SSH.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- Restart
|
||||
- State
|
||||
- Node
|
||||
- SSH
|
||||
platforms:
|
||||
- GKE
|
||||
- EKS
|
||||
- AKS
|
||||
maturity: alpha
|
||||
chaosType: infra
|
||||
maintainers:
|
||||
- name: machacekondra
|
||||
email: machacek.ondra@gmail.com
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Mayadata
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/node-restart
|
||||
- name: Documentation
|
||||
url: https://docs.litmuschaos.io/docs/node-restart
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/node-restart/experiment.yaml
|
40
charts/generic/node-restart/rbac.yaml
Normal file
40
charts/generic/node-restart/rbac.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: node-restart-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: node-restart-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: node-restart-sa
|
||||
labels:
|
||||
name: node-restart-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
||||
resources: ["pods","jobs","secrets","events","chaosengines","pods/log","chaosexperiments","chaosresults"]
|
||||
verbs: ["create","list","get","patch","update","delete","deletecollection"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get","list"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: node-restart-sa
|
||||
labels:
|
||||
name: node-restart-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: node-restart-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: node-restart-sa
|
||||
namespace: default
|
Reference in New Issue
Block a user