Skip to content

Commit

Permalink
Adding tests for dex plus restructuring and formatting (kubeflow#2815)
Browse files Browse the repository at this point in the history
* fix redirectURIs for in dex config since kubeflow uses oauth2

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* remove authservice and refactore code

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* remove authservice from github actions and refactore code

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* adjust name of oauth2 in FAQ

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* create new directory in central dashboard called manuel-patches for oauth2-proxy

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* change manuel-patches to overlay

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* Test if user can login to dex

Signed-off-by: Tom Zaspel <tom@zaspel.it>

* Add kubeflow authentication oidc-authservice README.md

Signed-off-by: Tom Zaspel <40226087+tzabbi@users.noreply.github.com>

* Fix yaml linter error

Signed-off-by: Tom Zaspel <40226087+tzabbi@users.noreply.github.com>

* Fix yaml linting

Signed-off-by: Tom Zaspel <40226087+tzabbi@users.noreply.github.com>

* Add changes from comit: 08f217c

Signed-off-by: Tom Zaspel <40226087+tzabbi@users.noreply.github.com>

* Fix even more lint issues

Signed-off-by: Tom Zaspel <tom@zaspel.it>

---------

Signed-off-by: Tom Zaspel <tom@zaspel.it>
Signed-off-by: Tom Zaspel <40226087+tzabbi@users.noreply.github.com>
Co-authored-by: Hansini Karunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
Signed-off-by: Patrick Schönthaler <patrick.schoenthaler@itsc.de>
  • Loading branch information
2 people authored and pschoen-itsc committed Sep 3, 2024
1 parent 6b17ffb commit 6bc19c7
Show file tree
Hide file tree
Showing 94 changed files with 833 additions and 954 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/admission_webhook_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Build & Apply PodDefaults manifests in KinD
on:
pull_request:
paths:
- .github/workflows/admission_webhook_test.yaml
- apps/admission-webhook/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- .github/workflows/admission_webhook_test.yaml
- apps/admission-webhook/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**

jobs:
build:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/bentoml_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Build & Apply BentoML Yatai Stack manifests in KinD
on:
pull_request:
paths:
- .github/workflows/bentoml_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- contrib/bentoml/**
- .github/workflows/bentoml_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- contrib/bentoml/**

jobs:
build:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/centraldashboard_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Build & Apply CentralDashboard manifests in KinD
on:
pull_request:
paths:
- .github/workflows/centraldashboard_test.yaml
- apps/centraldashboard/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/centraldashboard_test.yaml
- apps/centraldashboard/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/dex_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Build & Apply Dex manifests in KinD
on:
pull_request:
paths:
- .github/workflows/dex_test.yaml
- common/dex/base/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/dex_test.yaml
- common/dex/base/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand All @@ -33,3 +33,14 @@ jobs:
cd common/dex
kustomize build overlays/istio | kubectl apply -f -
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 180s
- name: port forward
run: |
ingress_gateway_service=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${ingress_gateway_service} 8080:80 &
while ! curl localhost:8080; do echo waiting for port-forwarding; sleep 1; done; echo port-forwarding ready
- name: test dex login
run: |
pip3 install requests
./tests/gh-actions/test_dex_login.py
12 changes: 6 additions & 6 deletions .github/workflows/jupyter_web_application_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Build & Apply JWA manifests in KinD
on:
pull_request:
paths:
- .github/workflows/jupyter_web_application_test.yaml
- apps/jupyter/jupyter-web-app/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/jupyter_web_application_test.yaml
- apps/jupyter/jupyter-web-app/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/katib_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Build & Apply Katib manifests in KinD
on:
pull_request:
paths:
- .github/workflows/katib_test.yaml
- apps/katib/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- .github/workflows/katib_test.yaml
- apps/katib/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**

jobs:
build:
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/kserve_cni_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,69 @@ name: Build & Apply KServe manifests in KinD, using istio CNI
on:
pull_request:
paths:
- .github/workflows/kserve_cni_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- common/istio-cni-1-22/**
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- tests/gh-actions/install_knative-cni.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh
- .github/workflows/kserve_cni_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- common/istio-cni-1-22/**
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- tests/gh-actions/install_knative-cni.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Install KinD
run: ./tests/gh-actions/install_kind.sh
- name: Install KinD
run: ./tests/gh-actions/install_kind.sh

- name: Create KinD Cluster
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml
- name: Create KinD Cluster
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml

- name: Install kustomize
run: ./tests/gh-actions/install_kustomize.sh
- name: Install kustomize
run: ./tests/gh-actions/install_kustomize.sh

- name: Create kubeflow namespace
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -
- name: Create kubeflow namespace
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -

- name: Install Istio CNI
run: ./tests/gh-actions/install_istio-cni.sh
- name: Install Istio CNI
run: ./tests/gh-actions/install_istio-cni.sh

- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh
- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh

- name: Install knative CNI
run: ./tests/gh-actions/install_knative-cni.sh
- name: Install knative CNI
run: ./tests/gh-actions/install_knative-cni.sh

- name: Build & Apply manifests
run: ./tests/gh-actions/install_kserve.sh
- name: Build & Apply manifests
run: ./tests/gh-actions/install_kserve.sh

- name: Create test namespace
run: kubectl create ns kserve-test
- name: Create test namespace
run: kubectl create ns kserve-test

- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install test dependencies
run: pip install -r ./contrib/kserve/tests/requirements.txt
- name: Install test dependencies
run: pip install -r ./contrib/kserve/tests/requirements.txt

- name: Port forward
run: |
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &
- name: Port forward
run: |
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &
- name: Run kserve tests
run: |
export KSERVE_INGRESS_HOST_PORT=localhost:8080
cd ./contrib/kserve/tests && pytest .
- name: Run kserve tests
run: |
export KSERVE_INGRESS_HOST_PORT=localhost:8080
cd ./contrib/kserve/tests && pytest .
- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
Loading

0 comments on commit 6bc19c7

Please sign in to comment.