Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support kserve 0.10 and 0.11 #1613

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/testcharts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
kubectl wait --for=condition=available --timeout=60s deploy/httpbin

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -97,6 +98,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -107,10 +109,12 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f

Expand Down Expand Up @@ -151,6 +155,7 @@ jobs:
kubectl wait --for=condition=available --timeout=60s deploy/httpbin

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -168,6 +173,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -178,10 +184,12 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f

Expand Down Expand Up @@ -222,6 +230,7 @@ jobs:
kubectl wait --for=condition=available --timeout=60s deploy/httpbin

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -241,6 +250,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -251,10 +261,12 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f

Expand Down Expand Up @@ -304,6 +316,7 @@ jobs:
kubectl logs deploy/sleep

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -326,6 +339,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -336,10 +350,12 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f

Expand Down Expand Up @@ -389,6 +405,7 @@ jobs:
kubectl logs deploy/sleep

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -413,6 +430,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -423,10 +441,12 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f

Expand Down Expand Up @@ -467,6 +487,7 @@ jobs:
kubectl wait --for=condition=available --timeout=60s deploy/hello

- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
Expand All @@ -485,6 +506,7 @@ jobs:
kubectl wait --for=condition=complete --timeout=180s job/default-1-job

- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all

Expand All @@ -495,9 +517,11 @@ jobs:
iter8 k delete

- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &

- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f
2 changes: 1 addition & 1 deletion charts/routing-actions/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: routing-actions
version: 0.1.3
version: 0.1.4
description: Iter8 routing actions
type: application
keywords:
Expand Down
8 changes: 8 additions & 0 deletions charts/routing-actions/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@
{{- end }}
{{- mustToJson $mV }}
{{- end }}

{{- define "kserve.host" }}
{{- if eq "kserve-0.10" .Values.appType -}}
predictor-default.{{ .Release.Namespace }}.svc.cluster.local
{{- else }} {{- /* kserve-0.11 or kserve */ -}}
predictor.{{ .Release.Namespace }}.svc.cluster.local
{{- end }}
{{- end }} {{- /* define "kserve.host" */ -}}
4 changes: 2 additions & 2 deletions charts/routing-actions/templates/_kserve.routemap-bg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ data:
headers:
request:
set:
Host: {{ (index $versions 0).name }}-predictor-default.{{ .Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions 0).name }}-{{ template "kserve.host" $ }}
remove:
- branch
response:
Expand All @@ -76,7 +76,7 @@ data:
headers:
request:
set:
Host: {{ (index $versions (add1 $i)).name }}-predictor-default.{{ $.Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions (add1 $i)).name }}-{{ template "kserve.host" $ }}
remove:
- branch
response:
Expand Down
4 changes: 2 additions & 2 deletions charts/routing-actions/templates/_kserve.routemap-canary.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ data:
headers:
request:
set:
Host: {{ (index $versions (add1 $i)).name }}-predictor-default.{{ $.Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions (add1 $i)).name }}-{{ template "kserve.host" $ }}
response:
add:
app-version: "{{ (index $versions (add1 $i)).name }}"
Expand All @@ -76,7 +76,7 @@ data:
headers:
request:
set:
Host: {{ (index $versions 0).name }}-predictor-default.{{ .Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions 0).name }}-{{ template "kserve.host" $ }}
response:
add:
app-version: "{{ (index $versions 0).name }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
headers:
request:
set:
Host: {{ (index $versions 0).name }}-predictor-default.{{ .Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions 0).name }}-{{ template "kserve.host" $ }}
remove:
- branch
response:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
headers:
request:
set:
Host: {{ (index $versions 0).name }}-predictor-default.{{ .Release.Namespace }}.svc.cluster.local
Host: {{ (index $versions 0).name }}-{{ template "kserve.host" $ }}
response:
add:
app-version: {{ (index $versions 0).name }}
Expand Down
2 changes: 1 addition & 1 deletion charts/routing-actions/templates/traffic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{- end }}

{{- /* validate values for appType */}}
{{- if not (has .Values.appType (list "kserve-modelmesh" "kserve" "deployment")) }}
{{- if not (has .Values.appType (list "kserve-modelmesh" "kserve" "kserve=0.11" "kserve-0.10" "deployment")) }}
{{- printf "Unknown appType: '%s'" .Values.appType | fail }}
{{- end }}

Expand Down
6 changes: 4 additions & 2 deletions charts/routing-actions/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ externalGateway: mm-gateway

### required fields are:

# Application type. Valid values are 'deployment', 'kserve' and 'kserve-modelmesh'
# Application type. Valid values are 'deployment', 'kserve-modelmesh', 'kserve', 'kserver-0.11', 'kserve-0.10'
# The value 'kserve' refers to the most recent version, 'kserve-0.11'
# appType:
# Traffic strategy. Valid values are 'blue-green' or 'canary'
# strategy:
Expand Down Expand Up @@ -53,7 +54,8 @@ externalGateway: mm-gateway

### required fields are:

# Application type. Valid values are 'kserve' and 'kserve-modelmesh'
# Application type. Valid values are 'deployment', 'kserve-modelmesh', 'kserve', 'kserver-0.11', 'kserve-0.10'
# The value 'kserve' refers to the most recent version, 'kserve-0.11'
# appType:
# Traffic strategy. Valid values are 'blue-green' or 'canary'
# strategy:
Expand Down