From 08ad98f676b90487d66e3aa7785ffd964296997d Mon Sep 17 00:00:00 2001 From: Alan Cha Date: Fri, 4 Aug 2023 09:55:42 -0400 Subject: [PATCH] Remove runner option Signed-off-by: Alan Cha --- .github/workflows/assets.yaml | 4 ---- .github/workflows/lintcharts2.yaml | 6 ++---- .github/workflows/testcharts.yaml | 2 -- .github/workflows/testperformance.yaml | 9 +++------ action/launch_test.go | 4 ++-- charts/iter8/templates/k8s.yaml | 5 ----- charts/iter8/values.yaml | 4 ---- cmd/klaunch.go | 4 +--- driver/kubedriver_test.go | 4 ++-- 9 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml index 6f6cc7daf..e37c471c0 100644 --- a/.github/workflows/assets.yaml +++ b/.github/workflows/assets.yaml @@ -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 @@ -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 @@ -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 @@ -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 \ No newline at end of file diff --git a/.github/workflows/lintcharts2.yaml b/.github/workflows/lintcharts2.yaml index 65f67103a..31b5281f8 100644 --- a/.github/workflows/lintcharts2.yaml +++ b/.github/workflows/lintcharts2.yaml @@ -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' @@ -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' diff --git a/.github/workflows/testcharts.yaml b/.github/workflows/testcharts.yaml index 2d44ee956..c379c47d4 100644 --- a/.github/workflows/testcharts.yaml +++ b/.github/workflows/testcharts.yaml @@ -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' @@ -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' diff --git a/.github/workflows/testperformance.yaml b/.github/workflows/testperformance.yaml index 0da8ad81c..ce8b5e638 100644 --- a/.github/workflows/testperformance.yaml +++ b/.github/workflows/testperformance.yaml @@ -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: @@ -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 @@ -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 diff --git a/action/launch_test.go b/action/launch_test.go index 62596acbb..30a64ae85 100644 --- a/action/launch_test.go +++ b/action/launch_test.go @@ -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) @@ -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) diff --git a/charts/iter8/templates/k8s.yaml b/charts/iter8/templates/k8s.yaml index 65e5a5c85..fe530c488 100644 --- a/charts/iter8/templates/k8s.yaml +++ b/charts/iter8/templates/k8s.yaml @@ -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 }} diff --git a/charts/iter8/values.yaml b/charts/iter8/values.yaml index e3a497bff..9b8a175b5 100644 --- a/charts/iter8/values.yaml +++ b/charts/iter8/values.yaml @@ -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 diff --git a/cmd/klaunch.go b/cmd/klaunch.go index 1ba923832..8fe518957 100644 --- a/cmd/klaunch.go +++ b/cmd/klaunch.go @@ -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. diff --git a/driver/kubedriver_test.go b/driver/kubedriver_test.go index 50138271e..07207ce2b 100644 --- a/driver/kubedriver_test.go +++ b/driver/kubedriver_test.go @@ -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) @@ -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)