chore: make dashboard release-able (part 1) #27
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CentralDashboard Integration Test | |
| on: | |
| pull_request: | |
| paths: | |
| - components/centraldashboard/** | |
| - releasing/version/VERSION | |
| - .github/workflows/central_dashboard_integration_test.yaml | |
| branches: | |
| - main | |
| - v*-branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | |
| cancel-in-progress: true | |
| env: | |
| IMG: ghcr.io/kubeflow/dashboard/central-dashboard | |
| TAG: integration-test | |
| PROFILE_IMG: ghcr.io/kubeflow/kubeflow/profile-controller | |
| KFAM_IMG: ghcr.io/kubeflow/dashboard/kfam | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Install KinD | |
| run: ./testing/gh-actions/install_kind.sh | |
| - name: Create KinD Cluster | |
| run: kind create cluster --config testing/gh-actions/kind-1-33.yaml | |
| - name: Install kustomize | |
| run: ./testing/gh-actions/install_kustomize.sh | |
| - name: Install Istio | |
| run: ./testing/gh-actions/install_istio.sh | |
| - name: Create Kubeflow Namespace | |
| run: kubectl create namespace kubeflow | |
| - name: Build KFAM Image (prerequisite) | |
| run: | | |
| cd components/access-management | |
| make docker-build-multi-arch IMG="${KFAM_IMG}" TAG="${TAG}" | |
| kind load docker-image "${KFAM_IMG}:${TAG}" | |
| - name: Build Profile Controller Image (prerequisite) | |
| run: | | |
| cd components/profile-controller | |
| make docker-build-multi-arch IMG="${PROFILE_IMG}" TAG="${TAG}" | |
| kind load docker-image "${PROFILE_IMG}:${TAG}" | |
| - name: Deploy Profile Controller (prerequisite) | |
| run: | | |
| cd components/profile-controller/config | |
| kustomize build overlays/kubeflow \ | |
| | sed "s|ghcr.io/kubeflow/kubeflow/profile-controller:[a-zA-Z0-9_.-]*|${PROFILE_IMG}:${TAG}|g" \ | |
| | sed "s|ghcr.io/kubeflow/dashboard/kfam:[a-zA-Z0-9_.-]*|${KFAM_IMG}:${TAG}|g" \ | |
| | kubectl apply -f - | |
| - name: Wait for Profile Controller to be Ready | |
| run: | | |
| kubectl wait --for=condition=Ready pods -n kubeflow -l kustomize.component=profiles --timeout=300s | |
| kubectl wait --for=condition=Available deployment -n kubeflow profiles-deployment --timeout=300s | |
| - name: Build CentralDashboard Image | |
| run: | | |
| cd components/centraldashboard | |
| make docker-build-multi-arch IMG="${IMG}" TAG="${TAG}" | |
| kind load docker-image "${IMG}:${TAG}" | |
| - name: Deploy CentralDashboard Component | |
| run: | | |
| ./testing/gh-actions/deploy_component.sh \ | |
| "centraldashboard" \ | |
| "components/centraldashboard" \ | |
| "${IMG}" \ | |
| "${TAG}" \ | |
| "manifests" \ | |
| "overlays/kserve" | |
| - name: Debug CentralDashboard Deployment | |
| run: | | |
| echo "=== Checking if CentralDashboard image was built and loaded ===" | |
| docker images | grep central-dashboard || echo "No central-dashboard images found in local Docker" | |
| echo "=== Checking images in KinD cluster ===" | |
| docker exec kind-control-plane crictl images | grep central-dashboard || echo "No central-dashboard images found in KinD" | |
| echo "=== Checking CentralDashboard pod status ===" | |
| kubectl get pods -n kubeflow -l app=centraldashboard -o wide | |
| echo "=== Checking CentralDashboard deployment ===" | |
| kubectl get deployment centraldashboard -n kubeflow -o yaml | grep -A5 -B5 image: || echo "No deployment found" | |
| echo "=== Checking recent events ===" | |
| kubectl get events -n kubeflow --sort-by=.metadata.creationTimestamp | tail -10 | |
| echo "=== Checking pod details ===" | |
| kubectl describe pods -n kubeflow -l app=centraldashboard || echo "No pods to describe" | |
| - name: Wait for CentralDashboard to be Ready | |
| run: | | |
| kubectl wait --for=condition=Ready pods -n kubeflow -l app=centraldashboard --timeout=300s | |
| kubectl wait --for=condition=Available deployment -n kubeflow centraldashboard --timeout=300s | |
| - name: Create Test Profile for Dashboard Testing | |
| run: | | |
| kubectl apply -f testing/gh-actions/resources/profile-dashboard-test.yaml | |
| for i in {1..60}; do | |
| if kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then | |
| break | |
| fi | |
| echo "Waiting for namespace... (attempt $i/60)" | |
| sleep 5 | |
| done | |
| if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then | |
| exit 1 | |
| fi | |
| kubectl get profile test-dashboard-profile | |
| kubectl get namespace test-dashboard-profile | |
| - name: Validate Service | |
| run: | | |
| ./testing/gh-actions/test_service.sh validate-service centraldashboard kubeflow | |
| - name: Start Port Forward for Dashboard Testing | |
| run: | | |
| ./testing/gh-actions/test_service.sh port-forward centraldashboard kubeflow 8082 80 | |
| - name: Test Dashboard Health | |
| run: | | |
| ./testing/gh-actions/test_service.sh test-health centraldashboard kubeflow 8082 | |
| - name: Test Dashboard Web Interface | |
| run: | | |
| curl -f "http://localhost:8082/" >/dev/null 2>&1 | |
| curl -f "http://localhost:8082/healthz" >/dev/null 2>&1 | |
| RESPONSE=$(curl -s "http://localhost:8082/" | head -c 100) | |
| if [[ -n "$RESPONSE" ]]; then | |
| echo "Dashboard is serving content: ${RESPONSE:0:50}..." | |
| else | |
| exit 1 | |
| fi | |
| kubectl get service centraldashboard -n kubeflow | |
| kubectl get pods -n kubeflow -l app=centraldashboard | |
| - name: Test Dashboard Performance | |
| run: | | |
| ./testing/gh-actions/test_service.sh performance-test centraldashboard kubeflow 8082 80 10 | |
| - name: Test Dashboard Metrics | |
| run: | | |
| ./testing/gh-actions/test_service.sh test-metrics centraldashboard kubeflow 8082 | |
| - name: Check Dashboard Logs | |
| run: | | |
| ./testing/gh-actions/test_service.sh check-logs centraldashboard kubeflow 50 | |
| - name: Check for Errors in Logs | |
| run: | | |
| ./testing/gh-actions/test_service.sh check-errors centraldashboard kubeflow | |
| - name: Test Dashboard Configuration | |
| run: | | |
| kubectl get configmap centraldashboard-config -n kubeflow | |
| kubectl describe configmap centraldashboard-config -n kubeflow | |
| - name: Test Virtual Service (if Istio is configured) | |
| run: | | |
| kubectl get virtualservice centraldashboard -n kubeflow | |
| - name: Stop Port Forward | |
| run: | | |
| ./testing/gh-actions/test_service.sh stop-port-forward centraldashboard kubeflow 8082 | |
| - name: Cleanup Test Resources | |
| run: | | |
| kubectl delete profile test-dashboard-profile --ignore-not-found=true | |
| for i in {1..30}; do | |
| if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then | |
| break | |
| fi | |
| echo "Waiting for namespace deletion... (attempt $i/30)" | |
| sleep 5 | |
| done |