From df22a472d6de1495842de70a74b919ce1818e785 Mon Sep 17 00:00:00 2001 From: Akash Shrivastava Date: Wed, 1 Mar 2023 21:07:24 +0530 Subject: [PATCH] Changed container path to socket path and runtime (#591) Signed-off-by: avaakash --- charts/generic/disk-fill/engine.yaml | 15 +++++++----- charts/generic/disk-fill/experiment.yaml | 23 +++++++++++-------- experiments/generic/disk-fill/engine.yaml | 15 +++++++----- experiments/generic/disk-fill/experiment.yaml | 23 +++++++++++-------- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/charts/generic/disk-fill/engine.yaml b/charts/generic/disk-fill/engine.yaml index a7abecd..5245c86 100644 --- a/charts/generic/disk-fill/engine.yaml +++ b/charts/generic/disk-fill/engine.yaml @@ -6,7 +6,7 @@ metadata: spec: # It can be active/stop engineState: 'active' - #ex. values: ns1:name=percona,ns2:run=nginx + #ex. values: ns1:name=percona,ns2:run=nginx auxiliaryAppInfo: '' appinfo: appns: 'default' @@ -19,7 +19,7 @@ spec: components: env: - name: TOTAL_CHAOS_DURATION - value: '60' + value: '60' # specify the fill percentage according to the disk pressure required - name: FILL_PERCENTAGE @@ -28,7 +28,10 @@ spec: - name: PODS_AFFECTED_PERC value: '' - # Provide the container runtime path - # Default set to docker container path - - name: CONTAINER_PATH - value: '/var/lib/docker/containers' + # provide the name of container runtime, it supports docker, containerd, crio + - name: CONTAINER_RUNTIME + value: 'containerd' + + # provide the socket file path + - name: SOCKET_PATH + value: '/run/containerd/containerd.sock' diff --git a/charts/generic/disk-fill/experiment.yaml b/charts/generic/disk-fill/experiment.yaml index d588f3d..1f5e0a2 100644 --- a/charts/generic/disk-fill/experiment.yaml +++ b/charts/generic/disk-fill/experiment.yaml @@ -13,7 +13,7 @@ metadata: spec: definition: scope: Namespaced - permissions: + permissions: # Create and monitor the experiment & helper pods - apiGroups: [""] resources: ["pods"] @@ -26,10 +26,10 @@ spec: - apiGroups: [""] resources: ["configmaps"] verbs: ["get","list",] - # Track and get the runner, experiment, and helper pods log + # Track and get the runner, experiment, and helper pods log - apiGroups: [""] resources: ["pods/log"] - verbs: ["get","list","watch"] + verbs: ["get","list","watch"] # for creating and managing to execute comands inside target container - apiGroups: [""] resources: ["pods/exec"] @@ -38,7 +38,7 @@ spec: - apiGroups: ["apps"] resources: ["deployments","statefulsets","replicasets", "daemonsets"] verbs: ["list","get"] - # deriving the parent/owner details of the pod(if parent is deploymentConfig) + # deriving the parent/owner details of the pod(if parent is deploymentConfig) - apiGroups: ["apps.openshift.io"] resources: ["deploymentconfigs"] verbs: ["list","get"] @@ -69,7 +69,7 @@ spec: - name: TARGET_CONTAINER value: '' - + - name: FILL_PERCENTAGE value: '80' @@ -102,10 +102,13 @@ spec: - name: LIB_IMAGE value: 'litmuschaos/go-runner:latest' - # Provide the container runtime path - # Default set to docker container path - - name: CONTAINER_PATH - value: '/var/lib/docker/containers' + # provide the name of container runtime, it supports docker, containerd, crio + - name: CONTAINER_RUNTIME + value: 'containerd' + + # provide the socket file path + - name: SOCKET_PATH + value: '/run/containerd/containerd.sock' ## it defines the sequence of chaos execution for multiple target pods ## supported values: serial, parallel @@ -116,5 +119,5 @@ spec: name: disk-fill app.kubernetes.io/part-of: litmus app.kubernetes.io/component: experiment-job - app.kubernetes.io/host-path-usage: "true" + app.kubernetes.io/host-path-usage: "true" app.kubernetes.io/version: latest diff --git a/experiments/generic/disk-fill/engine.yaml b/experiments/generic/disk-fill/engine.yaml index a7abecd..5245c86 100644 --- a/experiments/generic/disk-fill/engine.yaml +++ b/experiments/generic/disk-fill/engine.yaml @@ -6,7 +6,7 @@ metadata: spec: # It can be active/stop engineState: 'active' - #ex. values: ns1:name=percona,ns2:run=nginx + #ex. values: ns1:name=percona,ns2:run=nginx auxiliaryAppInfo: '' appinfo: appns: 'default' @@ -19,7 +19,7 @@ spec: components: env: - name: TOTAL_CHAOS_DURATION - value: '60' + value: '60' # specify the fill percentage according to the disk pressure required - name: FILL_PERCENTAGE @@ -28,7 +28,10 @@ spec: - name: PODS_AFFECTED_PERC value: '' - # Provide the container runtime path - # Default set to docker container path - - name: CONTAINER_PATH - value: '/var/lib/docker/containers' + # provide the name of container runtime, it supports docker, containerd, crio + - name: CONTAINER_RUNTIME + value: 'containerd' + + # provide the socket file path + - name: SOCKET_PATH + value: '/run/containerd/containerd.sock' diff --git a/experiments/generic/disk-fill/experiment.yaml b/experiments/generic/disk-fill/experiment.yaml index e1364c5..74f62b9 100644 --- a/experiments/generic/disk-fill/experiment.yaml +++ b/experiments/generic/disk-fill/experiment.yaml @@ -13,7 +13,7 @@ metadata: spec: definition: scope: Namespaced - permissions: + permissions: # Create and monitor the experiment & helper pods - apiGroups: [""] resources: ["pods"] @@ -26,10 +26,10 @@ spec: - apiGroups: [""] resources: ["configmaps"] verbs: ["get","list",] - # Track and get the runner, experiment, and helper pods log + # Track and get the runner, experiment, and helper pods log - apiGroups: [""] resources: ["pods/log"] - verbs: ["get","list","watch"] + verbs: ["get","list","watch"] # for creating and managing to execute comands inside target container - apiGroups: [""] resources: ["pods/exec"] @@ -38,7 +38,7 @@ spec: - apiGroups: ["apps"] resources: ["deployments","statefulsets","replicasets", "daemonsets"] verbs: ["list","get"] - # deriving the parent/owner details of the pod(if parent is deploymentConfig) + # deriving the parent/owner details of the pod(if parent is deploymentConfig) - apiGroups: ["apps.openshift.io"] resources: ["deploymentconfigs"] verbs: ["list","get"] @@ -69,7 +69,7 @@ spec: - name: TARGET_CONTAINER value: '' - + - name: FILL_PERCENTAGE value: '80' @@ -107,10 +107,13 @@ spec: - name: LIB_IMAGE value: 'litmuschaos/go-runner:latest' - # Provide the container runtime path - # Default set to docker container path - - name: CONTAINER_PATH - value: '/var/lib/docker/containers' + # provide the name of container runtime, it supports docker, containerd, crio + - name: CONTAINER_RUNTIME + value: 'containerd' + + # provide the socket file path + - name: SOCKET_PATH + value: '/run/containerd/containerd.sock' ## it defines the sequence of chaos execution for multiple target pods ## supported values: serial, parallel @@ -121,5 +124,5 @@ spec: name: disk-fill app.kubernetes.io/part-of: litmus app.kubernetes.io/component: experiment-job - app.kubernetes.io/host-path-usage: "true" + app.kubernetes.io/host-path-usage: "true" app.kubernetes.io/version: latest