diff --git a/.github/workflows/verifyuserexperience.yaml b/.github/workflows/verifyuserexperience.yaml index 6024458d4..4999ccb45 100644 --- a/.github/workflows/verifyuserexperience.yaml +++ b/.github/workflows/verifyuserexperience.yaml @@ -30,13 +30,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 httpbin-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 httpbin-test iter8 \ --set "tasks={http}" \ --set http.url="http://httpbin.default/get" \ --set logLevel=trace @@ -77,13 +77,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 httpbin-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 httpbin-test iter8 \ --set "tasks={http}" \ --set http.url="http://httpbin.default/post" \ --set http.payloadStr=hello \ @@ -126,13 +126,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 httpbin-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 httpbin-test iter8 \ --set "tasks={http}" \ --set http.endpoints.get.url=http://httpbin.default/get \ --set http.endpoints.getAnything.url=http://httpbin.default/anything \ @@ -184,13 +184,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 routeguide-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 routeguide-test iter8 \ --set "tasks={ready,grpc}" \ --set ready.deploy=routeguide \ --set ready.service=routeguide \ @@ -245,13 +245,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 routeguide-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 routeguide-test iter8 \ --set "tasks={ready,grpc}" \ --set ready.deploy=routeguide \ --set ready.service=routeguide \ @@ -300,13 +300,13 @@ jobs: - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Start performance test run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 hello-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 hello-test iter8 \ --set "tasks={grpc}" \ --set grpc.host="hello.default:50051" \ --set grpc.call="helloworld.Greeter.SayHello" \ @@ -344,7 +344,7 @@ jobs: # allowing ready task to be tested - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Create httpbin application @@ -356,7 +356,7 @@ jobs: - name: k launch with readiness checks run: | helm upgrade --install \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 httpbin-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 httpbin-test iter8 \ --set "tasks={ready,http}" \ --set ready.deploy="httpbin" \ --set ready.service="httpbin" \ @@ -396,7 +396,7 @@ jobs: # allowing ready task to be tested - name: Install controller run: | - helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace + helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --version 0.18 --set logLevel=trace kubectl rollout status --watch --timeout=60s statefulset/iter8 - name: Create httpbin application @@ -412,7 +412,7 @@ jobs: - name: k launch with readiness checks and namespace run: | helm upgrade --install -n experiments \ - --repo https://iter8-tools.github.io/iter8 --version 0.17 httpbin-test iter8 \ + --repo https://iter8-tools.github.io/iter8 --version 0.18 httpbin-test iter8 \ --set "tasks={ready,http}" \ --set ready.deploy="httpbin" \ --set ready.service="httpbin" \ diff --git a/charts/controller/Chart.yaml b/charts/controller/Chart.yaml index 27fafc17a..a2120d064 100644 --- a/charts/controller/Chart.yaml +++ b/charts/controller/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: controller -version: 0.1.12 +version: 0.18.0 description: Iter8 controller controller type: application keywords: diff --git a/charts/controller/values.yaml b/charts/controller/values.yaml index 297f0df94..393992af7 100644 --- a/charts/controller/values.yaml +++ b/charts/controller/values.yaml @@ -1,5 +1,5 @@ ### Controller image -image: iter8/iter8:0.17 +image: iter8/iter8:0.18 ### default resync time for controller defaultResync: 15m @@ -16,6 +16,10 @@ resourceTypes: Group: "" Version: v1 Resource: services + service: + Group: "" + Version: v1 + Resource: services cm: Group: "" Version: v1 @@ -25,15 +29,13 @@ resourceTypes: Version: v1 Resource: deployments conditions: - - name: Available - status: "True" + - Available isvc: Group: serving.kserve.io Version: v1beta1 Resource: inferenceservices conditions: - - name: Ready - status: "True" + - Ready vs: Group: networking.istio.io Version: v1beta1 diff --git a/charts/iter8/Chart.yaml b/charts/iter8/Chart.yaml index 4e745efea..eef49a673 100644 --- a/charts/iter8/Chart.yaml +++ b/charts/iter8/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: iter8 -version: 0.17.0 +version: 0.18.0 description: Iter8 experiment chart type: application home: https://iter8.tools diff --git a/charts/iter8/templates/_k-role.tpl b/charts/iter8/templates/_k-role.tpl index 43c19e557..70df949e4 100644 --- a/charts/iter8/templates/_k-role.tpl +++ b/charts/iter8/templates/_k-role.tpl @@ -12,46 +12,28 @@ rules: verbs: ["get", "update"] {{- if .Values.ready }} --- -{{- $namespace := coalesce .Values.ready.namespace .Release.Namespace }} -{{- if $namespace }} +{{- $namespace := coalesce $.Values.ready.namespace $.Release.Namespace }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ .Release.Name }}-ready + {{- if $namespace }} namespace: {{ $namespace }} + {{- end }} {{- /* if $namespace */}} annotations: iter8.tools/test: {{ .Release.Name }} rules: -{{- if .Values.ready.service }} -- apiGroups: [""] - resourceNames: [{{ .Values.ready.service | quote }}] - resources: ["services"] - verbs: ["get"] -{{- end }} -{{- if .Values.ready.deploy }} -- apiGroups: ["apps"] - resourceNames: [{{ .Values.ready.deploy | quote }}] - resources: ["deployments"] - verbs: ["get"] -{{- end }} -{{- if .Values.ready.ksvc }} -- apiGroups: ["serving.knative.dev"] - resourceNames: [{{ .Values.ready.ksvc | quote }}] - resources: ["services"] - verbs: ["get"] -{{- end }} -{{- if .Values.ready.isvc }} -- apiGroups: ["serving.kserve.io"] - resourceNames: [{{ .Values.ready.isvc | quote }}] - resources: ["inferenceservices"] - verbs: ["get"] -{{- end }} -{{- if .Values.ready.chaosengine }} -- apiGroups: ["litmuschaos.io"] - resourceNames: [{{ .Values.ready.chaosengine | quote }}] - resources: ["chaosengines"] - verbs: ["get"] -{{- end }} -{{- end }} -{{- end }} -{{- end }} +{{- $typesToCheck := omit .Values.ready "timeout" "namespace" }} +{{- range $type, $name := $typesToCheck }} +{{- $definition := get $.Values.resourceTypes $type }} +{{- if not $definition }} +{{- cat "no type definition for: " $type | fail }} +{{- else }} +- apiGroups: [ {{ get $definition "Group" | quote }} ] + resourceNames: [ {{ $name | quote }} ] + resources: [ {{ get $definition "Resource" | quote }} ] + verbs: [ "get" ] +{{- end }} {{- /* if not $definition */}} +{{- end }} {{- /* range $type, $name */}} +{{- end }} {{- /* {{- if .Values.ready */}} +{{- end }} {{- /* {{- if .Values.ready */}} diff --git a/charts/iter8/templates/_task-ready.tpl b/charts/iter8/templates/_task-ready.tpl index 77348070f..bf46edef9 100644 --- a/charts/iter8/templates/_task-ready.tpl +++ b/charts/iter8/templates/_task-ready.tpl @@ -1,68 +1,30 @@ -{{- define "task.ready.tn" }} -{{- if .Values.ready }} -{{- $namespace := coalesce .Values.ready.namespace .Release.Namespace }} -{{- if $namespace }} - namespace: {{ $namespace }} -{{- end }} -{{- if .Values.ready.timeout }} - timeout: {{ .Values.ready.timeout }} -{{- end }} -{{- end }} -{{- end }} {{- define "task.ready" }} {{- if .Values.ready }} -{{- $namespace := coalesce .Values.ready.namespace .Release.Namespace }} -{{- if .Values.ready.service }} -# task: determine if Kubernetes Service exists -- task: ready - with: - name: {{ .Values.ready.service | quote }} - version: v1 - resource: services -{{- include "task.ready.tn" . }} -{{- end }} -{{- if .Values.ready.deploy }} -# task: determine if Kubernetes Deployment exists and is Available -- task: ready - with: - name: {{ .Values.ready.deploy | quote }} - group: apps - version: v1 - resource: deployments - condition: Available -{{- include "task.ready.tn" . }} -{{- end }} -{{- if .Values.ready.ksvc }} -# task: determine if Knative Service exists and is ready +{{- $typesToCheck := omit .Values.ready "timeout" "namespace" }} +{{- range $type, $name := $typesToCheck }} +{{- $definition := get $.Values.resourceTypes $type }} +{{- if not $definition }} +{{- cat "no type definition for: " $type | fail }} +{{- else }} +# task: test for existence and readiness of a resource - task: ready with: - name: {{ .Values.ready.ksvc | quote }} - group: serving.knative.dev - version: v1 - resource: services - condition: Ready -{{- include "task.ready.tn" . }} -{{- end }} -{{- if .Values.ready.isvc }} -# task: determine if KServe InferenceService exists and is ready -- task: ready - with: - name: {{ .Values.ready.isvc | quote }} - group: serving.kserve.io - version: v1beta1 - resource: inferenceservices - condition: Ready -{{- include "task.ready.tn" . }} -{{- end }} -{{- if .Values.ready.chaosengine }} -# task: determine if chaos engine resource exists -- task: ready - with: - name: {{ .Values.ready.chaosengine | quote }} - group: litmuschaos.io - version: v1alpha1 - resource: chaosengines -{{- include "task.ready.tn" . }} -{{- end }} -{{- end }} -{{- end }} \ No newline at end of file + name: {{ $name | quote }} + group: {{ get $definition "Group" | quote }} + version: {{ get $definition "Version" | quote }} + resource: {{ get $definition "Resource" | quote }} + {{- if (hasKey $definition "conditions") }} + conditions: +{{ toYaml (get $definition "conditions") | indent 4 }} + {{- end }} {{- /* if (hasKey $definition "conditions") */}} +{{- $namespace := coalesce $.Values.ready.namespace $.Release.Namespace }} +{{- if $namespace }} + namespace: {{ $namespace }} +{{- end }} {{- /* if $namespace */}} +{{- if $.Values.ready.timeout }} + timeout: {{ $.Values.ready.timeout }} +{{- end }} {{- /* if $.Values.ready.timeout */}} +{{- end }} {{- /* if not $definition */}} +{{- end }} {{- /* range $type, $name */}} +{{- end }} {{- /* {{- if .Values.ready */}} +{{- end }} {{- /* define "task.ready" */}} diff --git a/charts/iter8/values.yaml b/charts/iter8/values.yaml index 63dfc83a3..164d02126 100644 --- a/charts/iter8/values.yaml +++ b/charts/iter8/values.yaml @@ -1,8 +1,8 @@ ### iter8Image default iter8 image used for running Kubernetes experiments -iter8Image: iter8/iter8:0.17 +iter8Image: iter8/iter8:0.18 ### majorMinor is the minor version of Iter8 -majorMinor: v0.17 +majorMinor: v0.18 logLevel: info @@ -16,4 +16,35 @@ resources: cpu: "500m" ### metricsServerURL is the URL to the Metrics server -metricsServerURL: http://iter8.default:8080 \ No newline at end of file +metricsServerURL: http://iter8.default:8080 + +### list of resource types and conditions used to evalutate object readiness. +resourceTypes: + svc: + Group: "" + Version: v1 + Resource: services + service: + Group: "" + Version: v1 + Resource: services + cm: + Group: "" + Version: v1 + Resource: configmaps + deploy: + Group: apps + Version: v1 + Resource: deployments + conditions: + - Available + isvc: + Group: serving.kserve.io + Version: v1beta1 + Resource: inferenceservices + conditions: + - Ready + vs: + Group: networking.istio.io + Version: v1beta1 + Resource: virtualservices \ No newline at end of file diff --git a/grafana/abn.json b/grafana/abn.json index aee33e742..890cfb14e 100644 --- a/grafana/abn.json +++ b/grafana/abn.json @@ -589,7 +589,7 @@ }, "timepicker": {}, "timezone": "", - "title": "Iter8", + "title": "Iter8 A/B/n Test", "uid": "cdfc5c3a-9097-41f4-b279-3b8e370a7145", "version": 2, "weekStart": "" diff --git a/grafana/grpc.json b/grafana/grpc.json index e20b367ce..45c48d80c 100644 --- a/grafana/grpc.json +++ b/grafana/grpc.json @@ -662,7 +662,7 @@ }, "timepicker": {}, "timezone": "", - "title": "gRPC Performance", + "title": "Iter8 gRPC Performance Test", "uid": "adc8fd9f-90c3-4396-9caf-bf0251c5b112-mul", "version": 6, "weekStart": "" diff --git a/grafana/http.json b/grafana/http.json index 9975b9ad0..15a6ec07a 100644 --- a/grafana/http.json +++ b/grafana/http.json @@ -845,7 +845,7 @@ }, "timepicker": {}, "timezone": "", - "title": "HTTP Performance", + "title": "Iter8 HTTP Performance Test", "uid": "e8758667-b4e1-41c2-9bf4-446dc7c1fd27", "version": 4, "weekStart": "" diff --git a/kustomize/controller/clusterScoped/kustomization.yaml b/kustomize/controller/clusterScoped/kustomization.yaml index 726c298e0..489733e4f 100644 --- a/kustomize/controller/clusterScoped/kustomization.yaml +++ b/kustomize/controller/clusterScoped/kustomization.yaml @@ -32,7 +32,7 @@ patches: value: | clusterScoped: true defaultResync: 15m - image: iter8/iter8:0.17 + image: iter8/iter8:0.18 logLevel: info resourceTypes: cm: diff --git a/kustomize/controller/namespaceScoped/configmap.yaml b/kustomize/controller/namespaceScoped/configmap.yaml index b3100425c..b8a29873b 100644 --- a/kustomize/controller/namespaceScoped/configmap.yaml +++ b/kustomize/controller/namespaceScoped/configmap.yaml @@ -5,7 +5,7 @@ metadata: data: config.yaml: | defaultResync: 15m - image: iter8/iter8:0.17 + image: iter8/iter8:0.18 logLevel: info resourceTypes: cm: @@ -27,6 +27,10 @@ data: Group: "" Resource: services Version: v1 + service: + Group: "" + Resource: services + Version: v1 vs: Group: networking.istio.io Resource: virtualservices diff --git a/kustomize/controller/namespaceScoped/kustomization.yaml b/kustomize/controller/namespaceScoped/kustomization.yaml index a65dbfefc..882ea5e8d 100644 --- a/kustomize/controller/namespaceScoped/kustomization.yaml +++ b/kustomize/controller/namespaceScoped/kustomization.yaml @@ -9,4 +9,4 @@ resources: commonLabels: app.kubernetes.io/name: controller - app.kubernetes.io/version: v0.17 + app.kubernetes.io/version: v0.18 \ No newline at end of file diff --git a/kustomize/controller/namespaceScoped/statefulset.yaml b/kustomize/controller/namespaceScoped/statefulset.yaml index fffcae765..f108f0327 100644 --- a/kustomize/controller/namespaceScoped/statefulset.yaml +++ b/kustomize/controller/namespaceScoped/statefulset.yaml @@ -16,7 +16,7 @@ spec: serviceAccountName: iter8 containers: - name: iter8-controller - image: iter8/iter8:0.17 + image: iter8/iter8:0.18 imagePullPolicy: Always command: ["/bin/iter8"] args: ["controllers", "-l", "info"]