Skip to content

Commit

Permalink
Remove runner option
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cha <[email protected]>
  • Loading branch information
Alan-Cha committed Aug 4, 2023
1 parent 9bab34f commit 08ad98f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ jobs:
iter8 k launch \
--set tasks={http} \
--set http.url="http://httpbin.default/get" \
--set runner=job
- name: try other iter8 k commands
run: |
iter8 k assert -c completed -c nofailure --timeout 60s
Expand Down Expand Up @@ -137,7 +136,6 @@ jobs:
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=job
- name: try other iter8 k commands
run: |
iter8 k assert -c completed -c nofailure --timeout 60s
Expand Down Expand Up @@ -167,7 +165,6 @@ jobs:
--set ready.service="httpbin" \
--set ready.timeout=60s \
--set http.url=http://httpbin.default \
--set runner=job
- name: k assert experiment completed without failures
run: |
iter8 k assert -c completed -c nofailure --timeout 60s
Expand Down Expand Up @@ -197,7 +194,6 @@ jobs:
--set ready.timeout=60s \
--set ready.namespace=default \
--set http.url=http://httpbin.default/get \
--set runner=job
- name: k assert experiment completed without failures
run: |
iter8 k assert -n experiments -c completed -c nofailure --timeout 60s
6 changes: 2 additions & 4 deletions .github/workflows/lintcharts2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
run: |
helm template charts/iter8 \
--set tasks={http} \
--set http.url=http://httpbin.default/get \
--set runner=job >> iter8.yaml
--set http.url=http://httpbin.default/get >> iter8.yaml
- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
Expand Down Expand Up @@ -69,8 +68,7 @@ jobs:
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=job >> iter8.yaml
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" >> iter8.yaml
- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/testcharts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:
--chartName charts/iter8 \
--set tasks={http} \
--set http.url="http://httpbin.default/get" \
--set runner=job
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
Expand Down Expand Up @@ -136,7 +135,6 @@ jobs:
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=job
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/testperformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ jobs:
--set ready.timeout=60s \
--set http.url=http://httpbin.default/get \
--set http.duration="3s" \
--set runner=job
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k delete
kubernetes-load-test-grpc:
Expand Down Expand Up @@ -99,8 +98,7 @@ jobs:
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set grpc.data.name="frodo" \
--set runner=job
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k delete
- name: load test grpc service with proto/data/metadata URLs
Expand All @@ -114,6 +112,5 @@ jobs:
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set grpc.dataURL="https://gist.githubusercontent.com/sriumcp/3f3178f4b698af6696c925832e51b0ba/raw/d02aa698d34aa2067f7a2f6afb4ceb616b0db822/name.json" \
--set grpc.metadataURL="https://gist.githubusercontent.com/sriumcp/3f3178f4b698af6696c925832e51b0ba/raw/d02aa698d34aa2067f7a2f6afb4ceb616b0db822/name.json" \
--set runner=job
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k delete
4 changes: 2 additions & 2 deletions action/launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestKubeLaunch(t *testing.T) {

// fix lOpts
lOpts := NewLaunchOpts(driver.NewFakeKubeDriver(cli.New()))
lOpts.Values = []string{"tasks={http}", "http.url=https://httpbin.org/get", "http.duration=2s", "runner=job"}
lOpts.Values = []string{"tasks={http}", "http.url=https://httpbin.org/get", "http.duration=2s"}

err = lOpts.KubeRun()
assert.NoError(t, err)
Expand All @@ -35,7 +35,7 @@ func TestKubeLaunchLocalChart(t *testing.T) {
lOpts := NewLaunchOpts(driver.NewFakeKubeDriver(cli.New()))
lOpts.ChartName = base.CompletePath("../charts", "iter8")
lOpts.LocalChart = true
lOpts.Values = []string{"tasks={http}", "http.url=https://httpbin.org/get", "http.duration=2s", "runner=job"}
lOpts.Values = []string{"tasks={http}", "http.url=https://httpbin.org/get", "http.duration=2s"}

err = lOpts.KubeRun()
assert.NoError(t, err)
Expand Down
5 changes: 0 additions & 5 deletions charts/iter8/templates/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,4 @@
{{ include "k.rolebinding" . }}
{{- end}}
---
{{- if eq "job" .Values.runner }}
{{ include "k.job" . }}
{{- else if eq "none" .Values.runner }}
{{- else }}
{{- fail "runner must be one of job or none" }}
{{- end }}
4 changes: 0 additions & 4 deletions charts/iter8/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ iter8Image: iter8/iter8:0.15
### majorMinor is the minor version of Iter8
majorMinor: v0.15

# TODO: Should this only ever be job?
### runner for Kubernetes experiments may be job or none
runner: none

logLevel: info

### resources are the resource limits for the pods
Expand Down
4 changes: 1 addition & 3 deletions cmd/klaunch.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ import (
const klaunchDesc = `
Launch an experiment inside a Kubernetes cluster.
iter8 k launch --set "tasks={http}" --set http.url=https://httpbin.org/get \
--set runner=job
iter8 k launch --set "tasks={http}" --set http.url=https://httpbin.org/get
Use the dry option to simulate a Kubernetes experiment. This creates the manifest.yaml file, but does not run the experiment, and does not deploy any experiment resource objects in the cluster.
iter8 k launch \
--set http.url=https://httpbin.org/get \
--set runner=job \
--dry
The launch command creates the 'charts' subdirectory under the current working directory, downloads the Iter8 experiment chart, and places it under 'charts'. This behavior can be controlled using various launch flags.
Expand Down
4 changes: 2 additions & 2 deletions driver/kubedriver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestKOps(t *testing.T) {

// install
err = kd.install(action.ChartPathOptions{}, base.CompletePath("../", "charts/iter8"), values.Options{
Values: []string{"tasks={http}", "http.url=https://httpbin.org/get", "runner=job"},
Values: []string{"tasks={http}", "http.url=https://httpbin.org/get"},
}, kd.Group, false)
assert.NoError(t, err)

Expand All @@ -45,7 +45,7 @@ func TestKOps(t *testing.T) {

// upgrade
err = kd.upgrade(action.ChartPathOptions{}, base.CompletePath("../", "charts/iter8"), values.Options{
Values: []string{"tasks={http}", "http.url=https://httpbin.org/get", "runner=job"},
Values: []string{"tasks={http}", "http.url=https://httpbin.org/get"},
}, kd.Group, false)
assert.NoError(t, err)

Expand Down

0 comments on commit 08ad98f

Please sign in to comment.