Skip to content

Commit

Permalink
Add java chaos experiments on kubernetes platform environment and spl…
Browse files Browse the repository at this point in the history
…it yaml files (#413)

* feature:add java chaos experiments and split yaml files

Signed-off-by: xcaspar <[email protected]>

* feature: ignore ssh channel characters

Signed-off-by: xcaspar <[email protected]>

* chore: update version to 0.7.0

Signed-off-by: xcaspar <[email protected]>
  • Loading branch information
xcaspar authored Sep 28, 2020
1 parent 1db37db commit 35a08b0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
8 changes: 5 additions & 3 deletions exec/kubernetes/executor_compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package kubernetes

import (
"context"
"strings"

"github.com/chaosblade-io/chaosblade-exec-os/exec"
"github.com/chaosblade-io/chaosblade-spec-go/spec"
)
Expand All @@ -28,13 +30,13 @@ type ComposeExecutor interface {

type ComposeExecutorForK8s struct {
clientExecutors spec.Executor
sshExecutor spec.Executor
sshExecutor spec.Executor
}

func NewComposeExecutor() ComposeExecutor {
return &ComposeExecutorForK8s{
clientExecutors: NewExecutor(),
sshExecutor: exec.NewSSHExecutor(),
sshExecutor: exec.NewSSHExecutor(),
}
}

Expand All @@ -43,7 +45,7 @@ func (*ComposeExecutorForK8s) Name() string {
}

func (e *ComposeExecutorForK8s) Exec(uid string, ctx context.Context, model *spec.ExpModel) *spec.Response {
if model.ActionFlags[exec.ChannelFlag.Name] == e.sshExecutor.Name() {
if strings.ToLower(model.ActionFlags[exec.ChannelFlag.Name]) == e.sshExecutor.Name() {
return e.sshExecutor.Exec(uid, ctx, model)
} else {
return e.clientExecutors.Exec(uid, ctx, model)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/chaosblade-io/chaosblade
go 1.13

require (
github.com/chaosblade-io/chaosblade-exec-docker v0.6.1-0.20200922034401-9c4d8f4af110
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200927065130-0c862f860af4
github.com/chaosblade-io/chaosblade-operator v0.6.1-0.20200927131714-b7c34a452bd6
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200925094651-195e67548e88
github.com/chaosblade-io/chaosblade-exec-docker v0.7.0
github.com/chaosblade-io/chaosblade-exec-os v0.7.0
github.com/chaosblade-io/chaosblade-operator v0.7.0
github.com/chaosblade-io/chaosblade-spec-go v0.7.0
github.com/mattn/go-sqlite3 v1.10.1-0.20190217174029-ad30583d8387
github.com/prometheus/common v0.9.1
github.com/shirou/gopsutil v2.20.5+incompatible
Expand Down
26 changes: 8 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,14 @@ github.com/chaosblade-io/chaosblade-exec-docker v0.6.1-0.20200921114755-4cee68e4
github.com/chaosblade-io/chaosblade-exec-docker v0.6.1-0.20200921114755-4cee68e4d222/go.mod h1:Lf/Jwjn6VVp4zI/ZfaRLvu0WcZ6AmdaoGvsCwB7lvZk=
github.com/chaosblade-io/chaosblade-exec-docker v0.6.1-0.20200922034401-9c4d8f4af110 h1:2Soq+zpHtpkh3ISHIikYi7tf3yEc+Fq8QsjitmEKKs8=
github.com/chaosblade-io/chaosblade-exec-docker v0.6.1-0.20200922034401-9c4d8f4af110/go.mod h1:CVtsZuslf2bhACUK1bmmgm/+JuxFcfsEItyE4V1We90=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200921062719-6836aa79da67/go.mod h1:aej9SgGSC2rxt1+o04ITzLsCFgtItQ0Gz+A+mLzXy6c=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200921123927-969283bd6023 h1:2HhNqnlrYneoAN+A3N4IfW3U4L5nf5TSBTG4Z0SB8Nw=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200921123927-969283bd6023/go.mod h1:9pvKEl6/jzdpEQljiEcpGacmIGt+BXKOGBXWGkqJmUI=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200921160711-0c7ef917628d/go.mod h1:5f/xHQ/PrTGyNNkIHm8VTl3eDJro23ilXbs5Tgd27Ws=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200925095658-3694d2e0f425/go.mod h1:HYlXZkcOhVUMU1rLVIiuKEUzKTILKJcV3A945FSr4bI=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200927024146-73a8098ab224 h1:BT4JzNhHIM+JpLInfYEWsqBvfN0KbOWJcAAlj3AggbA=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200927024146-73a8098ab224/go.mod h1:HYlXZkcOhVUMU1rLVIiuKEUzKTILKJcV3A945FSr4bI=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200927065130-0c862f860af4 h1:TsDJNVy/X+xEtt59TL1RJZwYxmka2hRvKA/V2ILZihE=
github.com/chaosblade-io/chaosblade-exec-os v0.6.1-0.20200927065130-0c862f860af4/go.mod h1:DlrbABYAjnJy8hL02l1s8Lkwqab4vQqLQoP0hpuwWrs=
github.com/chaosblade-io/chaosblade-operator v0.6.1-0.20200921124205-7d1cccee769a h1:mQkTK0qn5Q4EdUhAhGWflbjBLI8kP/2fflnv0WnKtdM=
github.com/chaosblade-io/chaosblade-operator v0.6.1-0.20200921124205-7d1cccee769a/go.mod h1:tnCsM+QsELSVJDwJkzIPUANIGzoGrPBYypRwWD+rxEE=
github.com/chaosblade-io/chaosblade-operator v0.6.1-0.20200927131714-b7c34a452bd6 h1:X0rZSnGjlbrEdYM2MO80aor5ePN3wxnbn+muCQKb2J8=
github.com/chaosblade-io/chaosblade-operator v0.6.1-0.20200927131714-b7c34a452bd6/go.mod h1:IF+vUcbotmnvOMwpdyAcL890qKjE91RFBrv92Y768qo=
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200921062022-63eaf9ec0288/go.mod h1:xUF+8r54FphQjBR8fVPnweVqzu7EitE15UsnZ57O5gk=
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200921114450-db5b1476998d h1:E0aP54CYhlGs+Pf59OGYTLb1ZZDTxGs54VHFbZ7gneo=
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200921114450-db5b1476998d/go.mod h1:xUF+8r54FphQjBR8fVPnweVqzu7EitE15UsnZ57O5gk=
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200925094651-195e67548e88 h1:ItqhUB0U7B0bCeeDR4HwGhUfRlkxCVOtaGLcogk0P3U=
github.com/chaosblade-io/chaosblade-spec-go v0.6.1-0.20200925094651-195e67548e88/go.mod h1:xUF+8r54FphQjBR8fVPnweVqzu7EitE15UsnZ57O5gk=
github.com/chaosblade-io/chaosblade-exec-docker v0.7.0 h1:iVU6NpnvYo+pmqQhsm82G73Gnozbwuq2Tt/i+VTLHF4=
github.com/chaosblade-io/chaosblade-exec-docker v0.7.0/go.mod h1:GOFWOgkrwTwZE1adqToqnaA7I1PSyfVq9zunK46kWuw=
github.com/chaosblade-io/chaosblade-exec-os v0.7.0 h1:GAXbrOwQJBdLUN6pQTlRwJak4pGZI3lCyBhDJ6j+vOA=
github.com/chaosblade-io/chaosblade-exec-os v0.7.0/go.mod h1:KCWm8ZUqjOnZFJgNQFTK6xybPmKwekQZrTe5udLwxuQ=
github.com/chaosblade-io/chaosblade-operator v0.7.0 h1:bsf+EL3XkMj8YVrbhpRQRx51JEpYMCOPZ4ll7/8c5M4=
github.com/chaosblade-io/chaosblade-operator v0.7.0/go.mod h1:QUA6U55fxU0UOTQ0hNU1QWZPFCS9IBevac56oxc5vUU=
github.com/chaosblade-io/chaosblade-spec-go v0.7.0 h1:EPBG8ZjWNjErgjdDaZqI/9UwZLgBY/2o1x8jes68kAU=
github.com/chaosblade-io/chaosblade-spec-go v0.7.0/go.mod h1:xUF+8r54FphQjBR8fVPnweVqzu7EitE15UsnZ57O5gk=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
Expand Down

0 comments on commit 35a08b0

Please sign in to comment.