Skip to content

Commit

Permalink
Merge pull request #7 from portefaix/feat/refactoring-chaos-mesh
Browse files Browse the repository at this point in the history
Refactoring Chaos Mesh experiments
  • Loading branch information
nlamirault authored Aug 27, 2021
2 parents 7a47b6e + 7d56250 commit e8c24a4
Show file tree
Hide file tree
Showing 45 changed files with 816 additions and 7 deletions.
31 changes: 31 additions & 0 deletions chaos/chaos-mesh/dns/chaos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: chaos-mesh.org/v1alpha1
kind: HTTPChaos
metadata:
name: dns
spec:
action: random
mode: all
patterns:
- google.com
- chaos-mesh.*
- github.?om
selector:
namespaces:
- podinfo
labelSelectors:
"app.kubernetes.io/name": "podinfo"
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/dns/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
29 changes: 29 additions & 0 deletions chaos/chaos-mesh/dns/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: builtin
kind: LabelTransformer
metadata:
name: labelTransformer
labels:
app.kubernetes.io/name: http-delay
app.kubernetes.io/instance: chaos-mesh-http-delay
app.kubernetes.io/component: chaos-experiments
app.kubernetes.io/version: v0.1.0
app.kubernetes.io/part-of: portefaix-chaos-mesh
app.kubernetes.io/managed-by: kustomize
fieldSpecs:
- path: metadata/labels
create: true
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apiVersion: chaos-mesh.org/v1alpha1
kind: HTTPChaos
metadata:
name: nginx-http-delay
name: http-delay
spec:
mode: all
selector:
Expand Down
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/http/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
29 changes: 29 additions & 0 deletions chaos/chaos-mesh/http/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: builtin
kind: LabelTransformer
metadata:
name: labelTransformer
labels:
app.kubernetes.io/name: http-delay
app.kubernetes.io/instance: chaos-mesh-http-delay
app.kubernetes.io/component: chaos-experiments
app.kubernetes.io/version: v0.1.0
app.kubernetes.io/part-of: portefaix-chaos-mesh
app.kubernetes.io/managed-by: kustomize
fieldSpecs:
- path: metadata/labels
create: true
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
apiVersion: chaos-mesh.org/v1alpha1
kind: IoChaos
metadata:
name: io-delay
name: io-fault
namespace: chaos-mesh
spec:
action: fault
mode: one
value: ''
selector:
namespaces:
- podinfo
Expand All @@ -31,4 +30,4 @@ spec:
path: '/var/run/etcd/**/*'
errno: 32
percent: 50
duration: '10s'
duration: '400s'
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/io/fault/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
29 changes: 29 additions & 0 deletions chaos/chaos-mesh/io/fault/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: builtin
kind: LabelTransformer
metadata:
name: labelTransformer
labels:
app.kubernetes.io/name: io-fault
app.kubernetes.io/instance: chaos-mesh-io-fault
app.kubernetes.io/component: chaos-experiments
app.kubernetes.io/version: v0.1.0
app.kubernetes.io/part-of: portefaix-chaos-mesh
app.kubernetes.io/managed-by: kustomize
fieldSpecs:
- path: metadata/labels
create: true
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
apiVersion: chaos-mesh.org/v1alpha1
kind: IoChaos
metadata:
name: io-delay
name: io-latency
namespace: chaos-mesh
spec:
action: latency
mode: one
value: ''
selector:
namespaces:
- podinfo
Expand All @@ -31,4 +30,4 @@ spec:
path: '/var/run/etcd/**/*'
delay: '100ms'
percent: 50
duration: '30s'
duration: '400s'
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/io/latency/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
29 changes: 29 additions & 0 deletions chaos/chaos-mesh/io/latency/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: builtin
kind: LabelTransformer
metadata:
name: labelTransformer
labels:
app.kubernetes.io/name: io-latency
app.kubernetes.io/instance: chaos-mesh-io-latency
app.kubernetes.io/component: chaos-experiments
app.kubernetes.io/version: v0.1.0
app.kubernetes.io/part-of: portefaix-chaos-mesh
app.kubernetes.io/managed-by: kustomize
fieldSpecs:
- path: metadata/labels
create: true
File renamed without changes.
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/kernel/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
29 changes: 29 additions & 0 deletions chaos/chaos-mesh/kernel/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: builtin
kind: LabelTransformer
metadata:
name: labelTransformer
labels:
app.kubernetes.io/name: kernel
app.kubernetes.io/instance: chaos-mesh-kernel
app.kubernetes.io/component: chaos-experiments
app.kubernetes.io/version: v0.1.0
app.kubernetes.io/part-of: portefaix-chaos-mesh
app.kubernetes.io/managed-by: kustomize
fieldSpecs:
- path: metadata/labels
create: true
23 changes: 23 additions & 0 deletions chaos/chaos-mesh/network/network-bandwidth/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- labels.yaml

resources:
- chaos.yaml
Loading

0 comments on commit e8c24a4

Please sign in to comment.