diff --git a/.github/workflows/admission_webhook_test.yaml b/.github/workflows/admission_webhook_test.yaml index 4804cada08..5666a31cf4 100644 --- a/.github/workflows/admission_webhook_test.yaml +++ b/.github/workflows/admission_webhook_test.yaml @@ -2,11 +2,11 @@ name: Test Admission Webhook on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/admission_webhook_test.yaml - apps/admission-webhook/upstream/** - - tests/gh-actions/install_istio.sh - - tests/gh-actions/install_cert_manager.sh + - tests/istio-cni_install.sh + - tests/cert_manager_install.sh - common/cert-manager/** - common/istio*/** @@ -18,13 +18,13 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/centraldashboard_test.yaml b/.github/workflows/centraldashboard_test.yaml index 9c65b434d2..241a314b2b 100644 --- a/.github/workflows/centraldashboard_test.yaml +++ b/.github/workflows/centraldashboard_test.yaml @@ -2,10 +2,10 @@ name: Test Central Dashboard on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/centraldashboard_test.yaml - apps/centraldashboard/upstream/** - - tests/gh-actions/install_istio*.sh + - tests/istio*.sh - common/istio*/** jobs: @@ -16,10 +16,10 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - diff --git a/.github/workflows/dex_oauth2-proxy_test.yaml b/.github/workflows/dex_oauth2-proxy_test.yaml index 0f3d871bd6..521dec1a42 100644 --- a/.github/workflows/dex_oauth2-proxy_test.yaml +++ b/.github/workflows/dex_oauth2-proxy_test.yaml @@ -2,15 +2,15 @@ name: Test Dex and OAuth2 Proxy on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/dex_oauth2-proxy.yaml - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** - experimental/security/PSS/* - common/dex/base/** - - tests/gh-actions/install_istio*.sh - - tests/gh-actions/test_dex_login.py + - tests/istio*.sh + - tests/dex_login_test.py jobs: build: @@ -20,16 +20,16 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - @@ -38,19 +38,19 @@ jobs: run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install dex - run: ./tests/gh-actions/install_dex.sh + run: ./tests/dex_install.sh - name: Install central-dashboard - run: ./tests/gh-actions/install_central_dashboard.sh + run: ./tests/central_dashboard_install.sh - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Port forward the istio-ingress gateway - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: Test dex login run: | @@ -58,12 +58,12 @@ jobs: pip3 install -q requests # Run the Dex login test - python3 tests/gh-actions/test_dex_login.py + python3 tests/dex_login_test.py echo "Dex login test completed successfully." - name: Apply Pod Security Standards baseline levels for static namespaces - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -75,4 +75,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels for static namespaces - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/full_kubeflow_integration_test.yaml b/.github/workflows/full_kubeflow_integration_test.yaml index 94e7b87ed6..f9b8ec8e06 100644 --- a/.github/workflows/full_kubeflow_integration_test.yaml +++ b/.github/workflows/full_kubeflow_integration_test.yaml @@ -23,46 +23,46 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create Kubeflow Namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Certificate Manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install OAuth2 Proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install Kubeflow Istio Resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install Multi-Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install Dex - run: ./tests/gh-actions/install_dex.sh + run: ./tests/dex_install.sh - name: Install Central Dashboard - run: ./tests/gh-actions/install_central_dashboard.sh + run: ./tests/central_dashboard_install.sh - name: Install Knative - run: ./tests/gh-actions/install_knative-cni.sh + run: ./tests/knative-cni_install.sh - name: Install KServe - run: ./tests/gh-actions/install_kserve.sh + run: ./tests/kserve_install.sh - name: Install Pipelines - run: ./tests/gh-actions/install_pipelines.sh + run: ./tests/pipelines_install.sh - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Install Jupyter Web Application run: kustomize build apps/jupyter/jupyter-web-app/upstream/overlays/istio/ | kubectl apply -f - @@ -77,13 +77,13 @@ jobs: run: kubectl get crd poddefaults.kubeflow.org || kubectl apply -f https://raw.githubusercontent.com/kubeflow/kubeflow/master/components/admission-webhook/manifests/base/crd.yaml - name: Install Volumes Web Application - run: ./tests/gh-actions/install_volumes_web_application.sh + run: ./tests/volumes_web_application_install.sh - name: Install Katib - run: ./tests/gh-actions/install_katib.sh + run: ./tests/katib_install.sh - name: Install Training Operator - run: ./tests/gh-actions/install_training_operator.sh + run: ./tests/training_operator_install.sh - name: Install Model Registry run: | @@ -95,56 +95,56 @@ jobs: kustomize build apps/model-registry/upstream/options/ui/overlays/istio | kubectl apply -f - - name: Install Spark - run: chmod u+x tests/gh-actions/*.sh && ./tests/gh-actions/install_spark.sh + run: chmod u+x tests/*.sh && ./tests/spark_install.sh - name: Wait for All Pods to be Ready run: kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 60s --field-selector=status.phase!=Succeeded - name: Port-forward the istio-ingress gateway - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh # name: Setup OAuth2 and Dex Credentials - # run: chmod +x tests/gh-actions/oauth2_dex_credentials.sh && ./tests/gh-actions/oauth2_dex_credentials.sh + # run: chmod +x tests/oauth2_dex_credentials.sh && ./tests/oauth2_dex_credentials.sh - name: Test Dex Login run: | pip3 install -q requests - python3 tests/gh-actions/test_dex_login.py + python3 tests/dex_login_test.py echo "Dex login test completed successfully." - name: V1 Pipeline Test run: | pip3 install "kfp>=1.8.22,<2.0.0" TOKEN="$(kubectl -n $KF_PROFILE create token default-editor)" - python3 tests/gh-actions/test_pipeline_v1.py "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_v1_test.py "${TOKEN}" "${KF_PROFILE}" - name: V2 Pipeline Test run: | pip3 install -U "kfp>=2.13.0" TOKEN="$(kubectl -n $KF_PROFILE create token default-editor)" - python3 tests/gh-actions/test_pipeline_v2.py run_pipeline "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_v2_test.py run_pipeline "${TOKEN}" "${KF_PROFILE}" - name: Test Pipeline Access with Unauthorized Token run: | kubectl create namespace test-unauthorized kubectl create serviceaccount test-unauthorized -n test-unauthorized UNAUTHORIZED_TOKEN=$(kubectl -n test-unauthorized create token test-unauthorized) - python3 tests/gh-actions/test_pipeline_v2.py test_unauthorized_access "$UNAUTHORIZED_TOKEN" "${KF_PROFILE}" + python3 tests/pipeline_v2_test.py test_unauthorized_access "$UNAUTHORIZED_TOKEN" "${KF_PROFILE}" - name: Test Volumes Web Application API - run: ./tests/gh-actions/test_volumes_web_application.sh "${KF_PROFILE}" + run: ./tests/volumes_web_application_test.sh "${KF_PROFILE}" - name: Apply PodDefault for Pipeline Access Token - run: sed "s/kubeflow-user-example-com/$KF_PROFILE/g" tests/gh-actions/kf-objects/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml | kubectl apply -f - + run: sed "s/kubeflow-user-example-com/$KF_PROFILE/g" tests/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml | kubectl apply -f - - name: Create Test Notebook run: | - sed "s/kubeflow-user-example-com/$KF_PROFILE/g" tests/gh-actions/kf-objects/notebook.test.kubeflow-user-example.com.yaml | kubectl apply -f - + sed "s/kubeflow-user-example-com/$KF_PROFILE/g" tests/notebook.test.kubeflow-user-example.com.yaml | kubectl apply -f - kubectl wait --for=condition=Ready pod -l app=test -n $KF_PROFILE --timeout=300s - name: Copy and execute the pipeline run script in KF Notebook run: | - cp tests/gh-actions/run_and_wait_kubeflow_pipeline.py /tmp/run_pipeline_temp.py + cp tests/run_and_wait_kubeflow_pipeline.py /tmp/run_pipeline_temp.py sed -i "s/experiment_namespace = \"kubeflow-user-example-com\"/experiment_namespace = \"$KF_PROFILE\"/g" /tmp/run_pipeline_temp.py sed -i 's/except Exception:/except Exception as e:/g' /tmp/run_pipeline_temp.py sed -i 's/logger.info("Experiment not found, trying to create experiment.")/logger.info("Experiment not found, trying to create experiment. Error: " + str(e))/g' /tmp/run_pipeline_temp.py @@ -155,7 +155,7 @@ jobs: - name: Run Katib Test run: | - kubectl apply -f tests/gh-actions/kf-objects/katib_test.yaml + kubectl apply -f tests/katib_test.yaml kubectl wait --for=condition=Running experiments.kubeflow.org -n $KF_PROFILE --all --timeout=300s echo "Waiting for all Trials to be Completed..." kubectl wait --for=condition=Created trials.kubeflow.org -n $KF_PROFILE --all --timeout=60s @@ -164,14 +164,14 @@ jobs: kubectl get trials.kubeflow.org -n $KF_PROFILE - name: Run Training Operator Test - run: ./tests/gh-actions/test_training_operator.sh "${KF_PROFILE}" + run: ./tests/training_operator_test.sh "${KF_PROFILE}" - name: Run KServe Test run: | - ./tests/gh-actions/test_kserve.sh ${KF_PROFILE} + ./tests/kserve_test.sh ${KF_PROFILE} - name: Run Spark Test - run: chmod u+x tests/gh-actions/*.sh && ./tests/gh-actions/test_spark.sh "${KF_PROFILE}" + run: chmod u+x tests/*.sh && ./tests/test_spark.sh "${KF_PROFILE}" - name: Test Model Registry Deployment run: | @@ -210,7 +210,7 @@ jobs: fi - name: Apply Pod Security Standards Baseline - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Remove Pod Security Labels run: | @@ -220,11 +220,11 @@ jobs: done - name: Apply Pod Security Standards Restricted - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh - name: Run Non-Root Test run: | - [ -f "tests/gh-actions/runasnonroot.sh" ] && chmod +x tests/gh-actions/runasnonroot.sh && ./tests/gh-actions/runasnonroot.sh + [ -f "tests/runasnonroot.sh" ] && chmod +x tests/runasnonroot.sh && ./tests/runasnonroot.sh - name: Verify Components run: kubectl get pods --all-namespaces | grep -E '(Error|CrashLoopBackOff)' && exit 1 || true diff --git a/.github/workflows/jupyter_web_application_test.yaml b/.github/workflows/jupyter_web_application_test.yaml index 046660cd2c..0799e6d9b6 100644 --- a/.github/workflows/jupyter_web_application_test.yaml +++ b/.github/workflows/jupyter_web_application_test.yaml @@ -2,10 +2,10 @@ name: Test Jupyter Web Application on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/jupyter_web_application_test.yaml - apps/jupyter/jupyter-web-app/upstream/** - - tests/gh-actions/install_istio.sh + - tests/istio-cni_install.sh - common/istio*/** jobs: @@ -16,10 +16,10 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/katib_test.yaml b/.github/workflows/katib_test.yaml index 62f80e6832..778fa28c9f 100644 --- a/.github/workflows/katib_test.yaml +++ b/.github/workflows/katib_test.yaml @@ -2,13 +2,13 @@ name: Deploy and Test Katib on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh - - tests/gh-actions/install_katib.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/katib_install.sh - .github/workflows/katib_test.yaml - apps/katib/upstream/** - - tests/gh-actions/install_istio-cni.sh + - tests/istio-cni_install.sh - common/istio*/** - - tests/gh-actions/install_cert_manager.sh + - tests/cert_manager_install.sh - common/cert-manager/** - experimental/security/PSS/* @@ -23,45 +23,45 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create Kubeflow Namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Certificate Manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install OAuth2 Proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install Kubeflow Istio Resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install Multi-Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Install Katib - run: ./tests/gh-actions/install_katib.sh + run: ./tests/katib_install.sh - name: Install Dependencies run: pip install pytest kubernetes kfp==2.13.0 requests - name: Port-forward the istio-ingress gateway - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: Run Katib Test run: | - kubectl apply -f tests/gh-actions/kf-objects/katib_test.yaml + kubectl apply -f tests/katib_test.yaml kubectl wait --for=condition=Running experiments.kubeflow.org -n $KF_PROFILE --all --timeout=300s echo "Waiting for all Trials to be Completed..." kubectl wait --for=condition=Created trials.kubeflow.org -n $KF_PROFILE --all --timeout=60s @@ -80,7 +80,7 @@ jobs: kubectl get experiments.kubeflow.org -n $KF_PROFILE --token="$UNAUTHORIZED_TOKEN" >/dev/null - name: Apply Pod Security Standards baseline levels - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -92,4 +92,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/kserve_test.yaml b/.github/workflows/kserve_test.yaml index 4ba69f0a42..8306353b27 100644 --- a/.github/workflows/kserve_test.yaml +++ b/.github/workflows/kserve_test.yaml @@ -2,20 +2,20 @@ name: Test KServe on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/kserve_m2m_test.yaml - apps/kserve/** - - tests/gh-actions/kserve/** - - tests/gh-actions/test_kserve.sh - - tests/gh-actions/install_kserve.sh + - tests/kserve/** + - tests/test_kserve.sh + - tests/install_kserve.sh - common/istio*/** - - tests/gh-actions/install_istio*.sh + - tests/istio-cni_install.sh - common/oauth2-proxy/** - - tests/gh-actions/install_oauth2-proxy.sh + - tests/oauth2-proxy_install.sh - common/cert-manager/** - - tests/gh-actions/install_cert_manager.sh + - tests/cert_manager_install.sh - common/knative/** - - tests/gh-actions/install_knative*.sh + - tests/knative-cni_install.sh jobs: build: @@ -25,37 +25,37 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install knative CNI - run: ./tests/gh-actions/install_knative-cni.sh + run: ./tests/knative-cni_install.sh - name: Install KServe - run: ./tests/gh-actions/install_kserve.sh + run: ./tests/kserve_install.sh - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install kubeflow-istio-resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Setup python 3.12 uses: actions/setup-python@v4 @@ -63,10 +63,10 @@ jobs: python-version: 3.12 - name: Port forward - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: Run KServe tests - run: ./tests/gh-actions/test_kserve.sh kubeflow-user-example-com + run: ./tests/kserve_test.sh kubeflow-user-example-com - name: Detailed KServe Access Diagnostics run: | @@ -88,7 +88,7 @@ jobs: #- name: Run and fail kserve tests without kserve m2m token #run: | # export KSERVE_INGRESS_HOST_PORT=localhost:8080 - # cd ./tests/gh-actions/kserve + # cd ./tests/kserve # if pytest . -vs --log-level info; then # echo "This test should fail with an HTTP redirect to oauth2-proxy/dex auth."; exit 1 # else @@ -120,7 +120,7 @@ jobs: kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app - name: Apply Pod Security Standards baseline levels - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -132,4 +132,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/manifests_example_test.yaml b/.github/workflows/manifests_example_test.yaml index 6f4bb32a0a..819a74ca0c 100644 --- a/.github/workflows/manifests_example_test.yaml +++ b/.github/workflows/manifests_example_test.yaml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Install kustomize - run: ./tests/gh-actions/install_kustomize.sh + run: ./tests/kustomize_install.sh - name: Unit Test run: | diff --git a/.github/workflows/model_registry_test.yaml b/.github/workflows/model_registry_test.yaml index 854c2ad10e..81b9d0f9cb 100644 --- a/.github/workflows/model_registry_test.yaml +++ b/.github/workflows/model_registry_test.yaml @@ -4,10 +4,10 @@ name: Test Model Registry on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/model_registry_test.yaml - apps/model-registry/upstream/** - - tests/gh-actions/install_istio.sh + - tests/istio-cni_install.sh - common/istio*/** jobs: @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Remove AppArmor profile for mysql in KinD on GHA # https://github.com/kubeflow/manifests/issues/2507 run: | @@ -27,22 +27,22 @@ jobs: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install kubeflow-istio-resources run: kustomize build common/istio-1-24/kubeflow-istio-resources/base | kubectl apply -f - diff --git a/.github/workflows/notebook_controller_test.yaml b/.github/workflows/notebook_controller_test.yaml index 80b8cd9263..47ba673bcc 100644 --- a/.github/workflows/notebook_controller_test.yaml +++ b/.github/workflows/notebook_controller_test.yaml @@ -2,14 +2,14 @@ name: Test Notebook Controller on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/notebook_controller_m2m_test.yaml - apps/jupyter/** - common/oauth2-proxy/** - common/istio*/** - - tests/gh-actions/install_istio.sh - - tests/gh-actions/install_oauth2-proxy.sh - - tests/gh-actions/install_multi_tenancy.sh + - tests/istio-cni_install.sh + - tests/oauth2-proxy_install.sh + - tests/multi_tenancy_install.sh jobs: build: @@ -19,25 +19,25 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install kubeflow-istio-resources run: kustomize build common/istio-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/pipeline_run_from_notebook.yaml b/.github/workflows/pipeline_run_from_notebook.yaml index 0bcf3bafae..321f7d360f 100644 --- a/.github/workflows/pipeline_run_from_notebook.yaml +++ b/.github/workflows/pipeline_run_from_notebook.yaml @@ -2,12 +2,12 @@ name: Test Pipeline run from Jupyterlab on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/pipeline_run_from_notebook.yaml - apps/jupyter/notebook-controller/upstream/** - apps/pipeline/upstream/** - - tests/gh-actions/install_istio*.sh - - tests/gh-actions/install_cert_manager.sh + - tests/install_istio*.sh + - tests/cert_manager_install.sh - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** @@ -22,16 +22,16 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - @@ -40,10 +40,10 @@ jobs: run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install KF Pipelines - run: ./tests/gh-actions/install_pipelines.sh + run: ./tests/pipelines_install.sh - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Build & Apply manifests run: | @@ -54,29 +54,29 @@ jobs: --field-selector=status.phase!=Succeeded - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Apply PodDefaults to access ml-pipeline with projected token - run: kubectl apply -f tests/gh-actions/kf-objects/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml + run: kubectl apply -f tests/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml - name: Create Kubeflow Notebook with PodDefaults run: | - kubectl apply -f tests/gh-actions/kf-objects/notebook.test.kubeflow-user-example.com.yaml + kubectl apply -f tests/notebook.test.kubeflow-user-example.com.yaml kubectl wait --for=jsonpath='{.status.readyReplicas}'=1 \ - -f tests/gh-actions/kf-objects/notebook.test.kubeflow-user-example.com.yaml \ + -f tests/notebook.test.kubeflow-user-example.com.yaml \ --timeout 600s - name: Copy and execute the pipeline run script in KF Notebook run: | kubectl -n kubeflow-user-example-com cp \ - ./tests/gh-actions/run_and_wait_kubeflow_pipeline.py \ + ./tests/run_and_wait_kubeflow_pipeline.py \ test-0:/home/jovyan/run_and_wait_kubeflow_pipeline.py kubectl -n kubeflow-user-example-com exec -ti \ test-0 -- python /home/jovyan/run_and_wait_kubeflow_pipeline.py - name: Apply Pod Security Standards baseline levels - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -88,4 +88,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/pipeline_swfs_test.yaml b/.github/workflows/pipeline_swfs_test.yaml index db97b4a5dd..2970c96eab 100644 --- a/.github/workflows/pipeline_swfs_test.yaml +++ b/.github/workflows/pipeline_swfs_test.yaml @@ -3,12 +3,12 @@ on: workflow_dispatch: pull_request: paths: - # - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + # - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/pipeline_swfs_test.yaml - apps/pipeline/upstream/** - # - tests/gh-actions/install_istio.sh - # - tests/gh-actions/install_cert_manager.sh - # - tests/gh-actions/install_oauth2-proxy.sh + # - tests/install_istio.sh + # - tests/install_cert_manager.sh + # - tests/install_oauth2-proxy.sh # - common/cert-manager/** # - common/oauth2-proxy/** # - common/istio*/** @@ -24,34 +24,34 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install KF Pipelines - run: ./tests/gh-actions/install_pipelines_swfs.sh + run: ./tests/pipelines_install.sh - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install kubeflow-istio-resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Verify Pipeline Integration run: | @@ -63,26 +63,26 @@ jobs: kubectl get secret mlpipeline-minio-artifact -n "$KF_PROFILE" -o json | jq -r '.data | keys[] as $k | "\($k): \(. | .[$k] | @base64d)"' | tr '\n' ' ' - name: Port forward - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: List and deploy test pipeline with authorized ServiceAccount Token run: | - pip3 install kfp==2.13.0 + pip3 install "kfp>=2.13.0" KF_PROFILE=kubeflow-user-example-com TOKEN="$(kubectl -n $KF_PROFILE create token default-editor)" - python3 tests/gh-actions/test_pipeline.py run_pipeline "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_test.py run_pipeline "${TOKEN}" "${KF_PROFILE}" - name: Fail to list pipelines with unauthorized ServiceAccount Token run: | - pip3 install kfp==2.13.0 + pip3 install "kfp>=2.13.0" KF_PROFILE=kubeflow-user-example-com TOKEN="$(kubectl -n default create token default)" - python3 tests/gh-actions/test_pipeline.py test_unauthorized_access "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_test.py test_unauthorized_access "${TOKEN}" "${KF_PROFILE}" echo "Test succeeded. Token from unauthorized ServiceAccount cannot list pipelines in $KF_PROFILE namespace." - name: Apply Pod Security Standards baseline levels for static namespaces - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -94,7 +94,7 @@ jobs: done - name: Applying Pod Security Standards restricted levels for static namespaces - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh - name: Collect Logs on Failure if: failure() diff --git a/.github/workflows/pipeline_test.yaml b/.github/workflows/pipeline_test.yaml index 11e37ed3c1..e5923233ea 100644 --- a/.github/workflows/pipeline_test.yaml +++ b/.github/workflows/pipeline_test.yaml @@ -2,17 +2,17 @@ name: Test Pipelines on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/pipeline_test.yaml - apps/pipeline/upstream/** - - tests/gh-actions/install_istio*.sh - - tests/gh-actions/install_cert_manager.sh - - tests/gh-actions/install_oauth2-proxy.sh + - tests/istio-cni_install.sh + - tests/cert_manager_install.sh + - tests/oauth2-proxy_install.sh - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** - - tests/gh-actions/test_pipeline_v1.py - - tests/gh-actions/test_pipeline_v2.py + - tests/pipeline_v1_test.py + - tests/pipeline_v2_test.py - experimental/security/PSS/* env: @@ -27,34 +27,34 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install KF Pipelines - run: ./tests/gh-actions/install_pipelines.sh + run: ./tests/pipelines_install.sh - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Install kubeflow-istio-resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Verify Pipeline Integration run: | @@ -68,28 +68,28 @@ jobs: run: kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 60s --field-selector=status.phase!=Succeeded - name: Port forward - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: V1 Pipeline Test run: | pip3 install "kfp>=1.8.22,<2.0.0" TOKEN="$(kubectl -n $KF_PROFILE create token default-editor)" - python3 tests/gh-actions/test_pipeline_v1.py "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_v1_test.py "${TOKEN}" "${KF_PROFILE}" - name: V2 Pipeline Test run: | pip3 install "kfp>=2.13.0" TOKEN="$(kubectl -n $KF_PROFILE create token default-editor)" - python3 tests/gh-actions/test_pipeline_v2.py run_pipeline "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_v2_test.py run_pipeline "${TOKEN}" "${KF_PROFILE}" - name: Test unauthorized access run: | TOKEN="$(kubectl -n default create token default)" - python3 tests/gh-actions/test_pipeline_v2.py test_unauthorized_access "${TOKEN}" "${KF_PROFILE}" + python3 tests/pipeline_v2_test.py test_unauthorized_access "${TOKEN}" "${KF_PROFILE}" echo "Test succeeded. Token from unauthorized ServiceAccount cannot list pipelines in $KF_PROFILE namespace." - name: Apply Pod Security Standards baseline levels for static namespaces - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -101,4 +101,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels for static namespaces - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/profiles_test.yaml b/.github/workflows/profiles_test.yaml index 0b7ba1ce62..52bda6f0c5 100644 --- a/.github/workflows/profiles_test.yaml +++ b/.github/workflows/profiles_test.yaml @@ -2,10 +2,10 @@ name: Test Profiles on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/profiles_test.yaml - apps/profiles/upstream/** - - tests/gh-actions/install_istio.sh + - tests/istio-cni_install.sh - common/istio*/** jobs: @@ -16,10 +16,10 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/ray_test.yaml b/.github/workflows/ray_test.yaml index 4a0f5174c4..f293e88439 100644 --- a/.github/workflows/ray_test.yaml +++ b/.github/workflows/ray_test.yaml @@ -2,12 +2,12 @@ name: Test Ray on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/ray_test.yaml - experimental/ray/** - - tests/gh-actions/install_istio.sh - - tests/gh-actions/install_cert_manager.sh - - tests/gh-actions/install_oauth2-proxy.sh + - tests/istio-cni_install.sh + - tests/cert_manager_install.sh + - tests/oauth2-proxy_install.sh - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** @@ -21,22 +21,22 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Create KF Profile run: kustomize build common/user-namespace/base | kubectl apply -f - diff --git a/.github/workflows/spark_test.yaml b/.github/workflows/spark_test.yaml index 1d83251483..437ad8adba 100644 --- a/.github/workflows/spark_test.yaml +++ b/.github/workflows/spark_test.yaml @@ -2,13 +2,13 @@ name: Test Spark on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/test_spark.yaml - apps/spark/** - - tests/gh-actions/spark*.sh - - tests/gh-actions/install_istio.sh - - tests/gh-actions/install_cert_manager.sh - - tests/gh-actions/install_oauth2-proxy.sh + - tests/spark*.sh + - tests/istio-cni_install.sh + - tests/cert_manager_install.sh + - tests/oauth2-proxy_install.sh - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** @@ -22,22 +22,22 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install oauth2-proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install cert-manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Create kubeflow namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install KF Multi Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Create KF Profile run: kustomize build common/user-namespace/base | kubectl apply -f - @@ -46,7 +46,7 @@ jobs: run: | cd apps/spark # TODO remove the debugging lines - ls -lah ../../tests/gh-actions/ - chmod u+x ../../tests/gh-actions/*.sh - ../../tests/gh-actions/install_spark.sh - ../../tests/gh-actions/test_spark.sh "kubeflow-user-example-com" + ls -lah ../../tests/ + chmod u+x ../../tests/*.sh + ../../tests/spark_install.sh + ../../tests/spark_test.sh "kubeflow-user-example-com" diff --git a/.github/workflows/tensorboard_controller_test.yaml b/.github/workflows/tensorboard_controller_test.yaml index 19d8eddc06..5776020adc 100644 --- a/.github/workflows/tensorboard_controller_test.yaml +++ b/.github/workflows/tensorboard_controller_test.yaml @@ -2,10 +2,10 @@ name: Test Tensorboard Controller on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/tensorboard_controller_test.yaml - apps/tensorboard/tensorboard-controller/upstream/** - - tests/gh-actions/install_istio.sh + - tests/istio-cni_install.sh - common/istio*/** jobs: @@ -17,10 +17,10 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/tensorboards_web_application_test.yaml b/.github/workflows/tensorboards_web_application_test.yaml index f3176b423d..09c610e4f8 100644 --- a/.github/workflows/tensorboards_web_application_test.yaml +++ b/.github/workflows/tensorboards_web_application_test.yaml @@ -2,10 +2,10 @@ name: Test Tensorboards Web Application on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/tensorboards_web_application_test.yaml - apps/tensorboard/tensorboards-web-app/upstream/** - - tests/gh-actions/install_istio.sh + - tests/istio-cni_install.sh - common/istio*/** jobs: @@ -17,10 +17,10 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install Istio - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Build & Apply manifests run: | diff --git a/.github/workflows/training_operator_test.yaml b/.github/workflows/training_operator_test.yaml index 1de0e81949..dc6b0d4aee 100644 --- a/.github/workflows/training_operator_test.yaml +++ b/.github/workflows/training_operator_test.yaml @@ -2,13 +2,13 @@ name: Deploy and Test Training Operator on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/training_operator_test.yaml - apps/training-operator/upstream/** - - tests/gh-actions/kf-objects/training_operator_job.yaml - - tests/gh-actions/install_istio-cni.sh - - tests/gh-actions/install_cert_manager.sh - - tests/gh-actions/install_oauth2-proxy.sh + - tests/training_operator_job.yaml + - tests/istio-cni_install.sh + - tests/cert_manager_install.sh + - tests/oauth2-proxy_install.sh - common/cert-manager/** - common/oauth2-proxy/** - common/istio*/** @@ -25,34 +25,34 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create Kubeflow Namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Certificate Manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install OAuth2 Proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install Kubeflow Istio Resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install Multi-Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Install Training Operator - run: ./tests/gh-actions/install_training_operator.sh + run: ./tests/training_operator_install.sh - name: Verify CRDs are ready run: | @@ -63,10 +63,10 @@ jobs: run: pip install pytest kubernetes requests - name: Port-forward the istio-ingress gateway - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: Run Training Operator Test - run: ./tests/gh-actions/test_training_operator.sh "${KF_PROFILE}" + run: ./tests/training_operator_test.sh "${KF_PROFILE}" - name: Test with Authorized Token run: kubectl get pytorchjobs -n $KF_PROFILE --token="$(kubectl -n $KF_PROFILE create token default-editor)" @@ -79,7 +79,7 @@ jobs: kubectl get pytorchjobs -n $KF_PROFILE --token="$UNAUTHORIZED_TOKEN" >/dev/null - name: Apply Pod Security Standards baseline levels - run: ./tests/gh-actions/enable_baseline_PSS.sh + run: ./tests/baseline_PSS_enable.sh - name: Unapply applied baseline labels run: | @@ -91,4 +91,4 @@ jobs: done - name: Applying Pod Security Standards restricted levels - run: ./tests/gh-actions/enable_restricted_PSS.sh + run: ./tests/restricted_PSS_enable.sh diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml index e5dc62319e..8ca1e8c63c 100644 --- a/.github/workflows/trivy.yaml +++ b/.github/workflows/trivy.yaml @@ -7,7 +7,7 @@ on: pull_request: paths: - '.github/workflows/trivy.yaml' - - 'tests/gh-actions/trivy_scan.py' + - 'tests/trivy_scan.py' jobs: image-extraction-and-security-scan: @@ -20,12 +20,12 @@ jobs: # Install kustomize - name: Install kustomize run: | - bash tests/gh-actions/install_kustomize.sh + bash tests/kustomize_install.sh # Install trivy - name: Install trivy run: | - bash tests/gh-actions/install_trivy.sh + bash tests/trivy_install.sh # Install Python - name: Setup Python @@ -40,7 +40,7 @@ jobs: - name: Run image extracting and security scanning script run: | - cd tests/gh-actions + cd tests python3 trivy_scan.py - name: Upload trivy scanned_results diff --git a/.github/workflows/volumes_web_application_test.yaml b/.github/workflows/volumes_web_application_test.yaml index 4e960a1323..51ccd5211c 100644 --- a/.github/workflows/volumes_web_application_test.yaml +++ b/.github/workflows/volumes_web_application_test.yaml @@ -2,16 +2,16 @@ name: Deploy and Test Volumes Web Application on: pull_request: paths: - - tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + - tests/install_KinD_create_KinD_cluster_install_kustomize.sh - .github/workflows/volumes_web_application_test.yaml - apps/volumes-web-app/upstream/** - - tests/gh-actions/install_istio-cni.sh + - tests/istio-cni_install.sh - common/istio*/** - common/oauth2-proxy/** - - tests/gh-actions/install_oauth2-proxy.sh - - tests/gh-actions/install_multi_tenancy.sh - - tests/gh-actions/install_volumes_web_application.sh - - tests/gh-actions/test_volumes_web_application.sh + - tests/oauth2-proxy_install.sh + - tests/multi_tenancy_install.sh + - tests/volumes_web_application_install.sh + - tests/volumes_web_application_test.sh env: KF_PROFILE: kubeflow-user-example-com @@ -25,34 +25,34 @@ jobs: uses: actions/checkout@v4 - name: Install KinD, Create KinD cluster and Install kustomize - run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh + run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh - name: Install kubectl - run: ./tests/gh-actions/install_kubectl.sh + run: ./tests/kubectl_install.sh - name: Create Kubeflow Namespace run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - - name: Install Certificate Manager - run: ./tests/gh-actions/install_cert_manager.sh + run: ./tests/cert_manager_install.sh - name: Install Istio CNI - run: ./tests/gh-actions/install_istio-cni.sh + run: ./tests/istio-cni_install.sh - name: Install OAuth2 Proxy - run: ./tests/gh-actions/install_oauth2-proxy.sh + run: ./tests/oauth2-proxy_install.sh - name: Install Kubeflow Istio Resources run: kustomize build common/istio-cni-1-24/kubeflow-istio-resources/base | kubectl apply -f - - name: Install Multi-Tenancy - run: ./tests/gh-actions/install_multi_tenancy.sh + run: ./tests/multi_tenancy_install.sh - name: Create KF Profile - run: ./tests/gh-actions/install_kubeflow_profile.sh + run: ./tests/kubeflow_profile_install.sh - name: Install Volumes Web Application - run: ./tests/gh-actions/install_volumes_web_application.sh + run: ./tests/volumes_web_application_install.sh - name: Wait for VWA Pods run: | @@ -60,7 +60,7 @@ jobs: sleep 15 - name: Port-forward the istio-ingress gateway - run: ./tests/gh-actions/port_forward_gateway.sh + run: ./tests/port_forward_gateway.sh - name: Test Volumes Web Application API - run: ./tests/gh-actions/test_volumes_web_application.sh "${KF_PROFILE}" + run: ./tests/volumes_web_application_test.sh "${KF_PROFILE}" diff --git a/tests/gh-actions/install_argo_cli.sh b/tests/argo_cli_install.sh similarity index 100% rename from tests/gh-actions/install_argo_cli.sh rename to tests/argo_cli_install.sh diff --git a/tests/gh-actions/enable_baseline_PSS.sh b/tests/baseline_PSS_enable.sh similarity index 100% rename from tests/gh-actions/enable_baseline_PSS.sh rename to tests/baseline_PSS_enable.sh diff --git a/tests/gh-actions/install_central_dashboard.sh b/tests/central_dashboard_install.sh similarity index 100% rename from tests/gh-actions/install_central_dashboard.sh rename to tests/central_dashboard_install.sh diff --git a/tests/gh-actions/install_cert_manager.sh b/tests/cert_manager_install.sh similarity index 100% rename from tests/gh-actions/install_cert_manager.sh rename to tests/cert_manager_install.sh diff --git a/tests/gh-actions/install_dex.sh b/tests/dex_install.sh similarity index 100% rename from tests/gh-actions/install_dex.sh rename to tests/dex_install.sh diff --git a/tests/gh-actions/test_dex_login.py b/tests/dex_login_test.py similarity index 100% rename from tests/gh-actions/test_dex_login.py rename to tests/dex_login_test.py diff --git a/tests/gh-actions/kf-objects/test_pipeline.py b/tests/gh-actions/kf-objects/test_pipeline.py deleted file mode 100755 index 6755d30ff4..0000000000 --- a/tests/gh-actions/kf-objects/test_pipeline.py +++ /dev/null @@ -1,29 +0,0 @@ -import kfp -from kfp import dsl -import kfp.components as comp - - -@comp.create_component_from_func -def echo_op(): - print("Test pipeline") - - -@dsl.pipeline(name="test-pipeline", description="A test pipeline.") -def hello_world_pipeline(): - echo_task = echo_op() - - -if __name__ == "__main__": - # Run the Kubeflow Pipeline in the user's namespace. - kfp_client = kfp.Client( - host="http://localhost:3000", namespace="kubeflow-user-example-com" - ) - kfp_client.runs.api_client.default_headers.update( - {"kubeflow-userid": "kubeflow-user-example-com"} - ) - # create the KFP run - run_id = kfp_client.create_run_from_pipeline_func( - hello_world_pipeline, - namespace="kubeflow-user-example-com", - arguments={}, - ).run_id diff --git a/tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh b/tests/install_KinD_create_KinD_cluster_install_kustomize.sh similarity index 100% rename from tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh rename to tests/install_KinD_create_KinD_cluster_install_kustomize.sh diff --git a/tests/gh-actions/install_istio-cni.sh b/tests/istio-cni_install.sh similarity index 100% rename from tests/gh-actions/install_istio-cni.sh rename to tests/istio-cni_install.sh diff --git a/tests/gh-actions/install_katib.sh b/tests/katib_install.sh similarity index 100% rename from tests/gh-actions/install_katib.sh rename to tests/katib_install.sh diff --git a/tests/gh-actions/kf-objects/katib_test.yaml b/tests/katib_test.yaml similarity index 100% rename from tests/gh-actions/kf-objects/katib_test.yaml rename to tests/katib_test.yaml diff --git a/tests/gh-actions/install_knative-cni.sh b/tests/knative-cni_install.sh similarity index 100% rename from tests/gh-actions/install_knative-cni.sh rename to tests/knative-cni_install.sh diff --git a/tests/gh-actions/kserve/data/iris_input.json b/tests/kserve/data/iris_input.json similarity index 100% rename from tests/gh-actions/kserve/data/iris_input.json rename to tests/kserve/data/iris_input.json diff --git a/tests/gh-actions/kserve/requirements.txt b/tests/kserve/requirements.txt similarity index 100% rename from tests/gh-actions/kserve/requirements.txt rename to tests/kserve/requirements.txt diff --git a/tests/gh-actions/kserve/test_sklearn.py b/tests/kserve/sklearn_test.py similarity index 100% rename from tests/gh-actions/kserve/test_sklearn.py rename to tests/kserve/sklearn_test.py diff --git a/tests/gh-actions/kserve/utils.py b/tests/kserve/utils.py similarity index 100% rename from tests/gh-actions/kserve/utils.py rename to tests/kserve/utils.py diff --git a/tests/gh-actions/install_kserve.sh b/tests/kserve_install.sh similarity index 100% rename from tests/gh-actions/install_kserve.sh rename to tests/kserve_install.sh diff --git a/tests/gh-actions/test_kserve.sh b/tests/kserve_test.sh similarity index 100% rename from tests/gh-actions/test_kserve.sh rename to tests/kserve_test.sh diff --git a/tests/gh-actions/kf-objects/kserve_test.yaml b/tests/kserve_test.yaml similarity index 100% rename from tests/gh-actions/kf-objects/kserve_test.yaml rename to tests/kserve_test.yaml diff --git a/tests/gh-actions/install_kubectl.sh b/tests/kubectl_install.sh similarity index 100% rename from tests/gh-actions/install_kubectl.sh rename to tests/kubectl_install.sh diff --git a/tests/gh-actions/install_kubeflow_profile.sh b/tests/kubeflow_profile_install.sh similarity index 100% rename from tests/gh-actions/install_kubeflow_profile.sh rename to tests/kubeflow_profile_install.sh diff --git a/tests/gh-actions/install_kustomize.sh b/tests/kustomize_install.sh similarity index 100% rename from tests/gh-actions/install_kustomize.sh rename to tests/kustomize_install.sh diff --git a/tests/gh-actions/install_multi_tenancy.sh b/tests/multi_tenancy_install.sh similarity index 100% rename from tests/gh-actions/install_multi_tenancy.sh rename to tests/multi_tenancy_install.sh diff --git a/tests/gh-actions/kf-objects/notebook.test.kubeflow-user-example.com.yaml b/tests/notebook.test.kubeflow-user-example.com.yaml similarity index 100% rename from tests/gh-actions/kf-objects/notebook.test.kubeflow-user-example.com.yaml rename to tests/notebook.test.kubeflow-user-example.com.yaml diff --git a/tests/gh-actions/install_oauth2-proxy.sh b/tests/oauth2-proxy_install.sh similarity index 100% rename from tests/gh-actions/install_oauth2-proxy.sh rename to tests/oauth2-proxy_install.sh diff --git a/tests/gh-actions/oauth2_dex_credentials.sh b/tests/oauth2_dex_credentials.sh similarity index 100% rename from tests/gh-actions/oauth2_dex_credentials.sh rename to tests/oauth2_dex_credentials.sh diff --git a/tests/pipeline_test.py b/tests/pipeline_test.py new file mode 100755 index 0000000000..6f86762cab --- /dev/null +++ b/tests/pipeline_test.py @@ -0,0 +1,61 @@ +import kfp +from kfp import dsl +import sys + +@dsl.component +def echo_op(): + print("Test pipeline") + +@dsl.pipeline(name="test-pipeline", description="A test pipeline.") +def hello_world_pipeline(): + echo_task = echo_op() + +def run_pipeline(token, namespace): + kfp_client = kfp.Client( + host="http://localhost:8080/pipeline", + namespace=namespace, + cookies="" + ) + kfp_client.runs.api_client.default_headers.update( + {"Authorization": f"Bearer {token}", "kubeflow-userid": namespace} + ) + kfp_client.create_run_from_pipeline_func( + hello_world_pipeline, + namespace=namespace, + arguments={}, + ) + +def test_unauthorized_access(token, namespace): + try: + kfp_client = kfp.Client( + host="http://localhost:8080/pipeline", + namespace=namespace, + cookies="" + ) + kfp_client.runs.api_client.default_headers.update( + {"Authorization": f"Bearer {token}", "kubeflow-userid": namespace} + ) + + pipelines = kfp_client.list_pipelines() + + if pipelines and len(pipelines.pipelines or []) > 0: + sys.exit(1) + else: + sys.exit(0) + except Exception: + sys.exit(0) + +if __name__ == "__main__": + if len(sys.argv) < 3: + sys.exit(1) + + action = sys.argv[1] + token = sys.argv[2] + namespace = sys.argv[3] + + if action == "run_pipeline": + run_pipeline(token, namespace) + elif action == "test_unauthorized_access": + test_unauthorized_access(token, namespace) + else: + sys.exit(1) \ No newline at end of file diff --git a/tests/gh-actions/test_pipeline_v1.py b/tests/pipeline_v1_test.py similarity index 100% rename from tests/gh-actions/test_pipeline_v1.py rename to tests/pipeline_v1_test.py diff --git a/tests/gh-actions/test_pipeline_v2.py b/tests/pipeline_v2_test.py similarity index 100% rename from tests/gh-actions/test_pipeline_v2.py rename to tests/pipeline_v2_test.py diff --git a/tests/gh-actions/install_pipelines.sh b/tests/pipelines_install.sh similarity index 100% rename from tests/gh-actions/install_pipelines.sh rename to tests/pipelines_install.sh diff --git a/tests/gh-actions/install_pipelines_swfs.sh b/tests/pipelines_swfs_install.sh similarity index 100% rename from tests/gh-actions/install_pipelines_swfs.sh rename to tests/pipelines_swfs_install.sh diff --git a/tests/gh-actions/kf-objects/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml b/tests/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml similarity index 100% rename from tests/gh-actions/kf-objects/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml rename to tests/poddefaults.access-ml-pipeline.kubeflow-user-example-com.yaml diff --git a/tests/gh-actions/port_forward_gateway.sh b/tests/port_forward_gateway.sh similarity index 100% rename from tests/gh-actions/port_forward_gateway.sh rename to tests/port_forward_gateway.sh diff --git a/tests/gh-actions/enable_restricted_PSS.sh b/tests/restricted_PSS_enable.sh similarity index 100% rename from tests/gh-actions/enable_restricted_PSS.sh rename to tests/restricted_PSS_enable.sh diff --git a/tests/gh-actions/run_and_wait_kubeflow_pipeline.py b/tests/run_and_wait_kubeflow_pipeline.py similarity index 100% rename from tests/gh-actions/run_and_wait_kubeflow_pipeline.py rename to tests/run_and_wait_kubeflow_pipeline.py diff --git a/tests/gh-actions/runasnonroot.sh b/tests/runasnonroot.sh similarity index 100% rename from tests/gh-actions/runasnonroot.sh rename to tests/runasnonroot.sh diff --git a/tests/gh-actions/install_spark.sh b/tests/spark_install.sh similarity index 100% rename from tests/gh-actions/install_spark.sh rename to tests/spark_install.sh diff --git a/tests/gh-actions/test_spark.sh b/tests/spark_test.sh similarity index 100% rename from tests/gh-actions/test_spark.sh rename to tests/spark_test.sh diff --git a/tests/gh-actions/install_training_operator.sh b/tests/training_operator_install.sh similarity index 100% rename from tests/gh-actions/install_training_operator.sh rename to tests/training_operator_install.sh diff --git a/tests/gh-actions/kf-objects/training_operator_job.yaml b/tests/training_operator_job.yaml similarity index 100% rename from tests/gh-actions/kf-objects/training_operator_job.yaml rename to tests/training_operator_job.yaml diff --git a/tests/gh-actions/test_training_operator.sh b/tests/training_operator_test.sh similarity index 90% rename from tests/gh-actions/test_training_operator.sh rename to tests/training_operator_test.sh index fefe6617ce..8a8c99bb11 100755 --- a/tests/gh-actions/test_training_operator.sh +++ b/tests/training_operator_test.sh @@ -2,7 +2,7 @@ set -euxo pipefail KF_PROFILE=${1:-kubeflow-user-example-com} -cat tests/gh-actions/kf-objects/training_operator_job.yaml | \ +cat tests/training_operator_job.yaml | \ sed 's/name: pytorch-simple/name: pytorch-simple\n namespace: '"$KF_PROFILE"'/g' > /tmp/pytorch-job.yaml kubectl apply -f /tmp/pytorch-job.yaml diff --git a/tests/gh-actions/install_trivy.sh b/tests/trivy_install.sh similarity index 100% rename from tests/gh-actions/install_trivy.sh rename to tests/trivy_install.sh diff --git a/tests/gh-actions/trivy_scan.py b/tests/trivy_scan.py similarity index 100% rename from tests/gh-actions/trivy_scan.py rename to tests/trivy_scan.py diff --git a/tests/gh-actions/install_volumes_web_application.sh b/tests/volumes_web_application_install.sh similarity index 100% rename from tests/gh-actions/install_volumes_web_application.sh rename to tests/volumes_web_application_install.sh diff --git a/tests/gh-actions/test_volumes_web_application.sh b/tests/volumes_web_application_test.sh similarity index 100% rename from tests/gh-actions/test_volumes_web_application.sh rename to tests/volumes_web_application_test.sh