Skip to content

Commit fa661ec

Browse files
committed
refactor(profile-controller): align manifests structure with notebooks-v2
- Flatten crd directory: remove bases/ and patches/ subdirs - Move RBAC files to base/manager/ - Create base/webhook/ for webhook patches - Create components/kfam/ for kfam service - Move auth_proxy resources to components/prometheus/ - Update kustomization.yaml files to use new structure - Replace deprecated kustomize fields (commonLabels, namePrefix, vars) - Hardcode resource names with profiles- prefix - Update Makefile and suite_test.go paths Signed-off-by: alokdangre <alokdangre@gmail.com>
1 parent 311fad8 commit fa661ec

58 files changed

Lines changed: 951 additions & 1019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/central_dashboard_angular_frontend_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
kubectl create namespace kubeflow
9090
kustomize build profile-controller/manifests/kustomize/overlays/kubeflow | kubectl apply -f -
9191
kustomize build https://github.com/kubeflow/kubeflow//components/notebook-controller/config/overlays/kubeflow?ref=master | kubectl apply -f -
92-
kubectl wait pods -n kubeflow -l app=profiles --for=condition=Ready --timeout=300s
92+
kubectl wait pods -n kubeflow -l app.kubernetes.io/component=profile-controller --for=condition=Ready --timeout=300s
9393
kubectl wait pods -n kubeflow -l app=notebook-controller --for=condition=Ready --timeout=300s
9494
9595
- name: Apply JWA manifests

.github/workflows/central_dashboard_angular_integration_test.yaml

Lines changed: 140 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ on:
33
pull_request:
44
paths:
55
- components/centraldashboard-angular/**
6-
- components/access-management/**
7-
- components/profile-controller/**
6+
- components/access-management/**
7+
- components/profile-controller/**
88
- releasing/version/VERSION
99
branches:
1010
- main
@@ -24,143 +24,143 @@ jobs:
2424
integration-test:
2525
runs-on: ubuntu-22.04
2626
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
32-
- name: Setup Docker Buildx
33-
uses: docker/setup-buildx-action@v3
34-
35-
- name: Install KinD
36-
run: ./testing/gh-actions/install_kind.sh
37-
38-
- name: Create KinD Cluster
39-
run: kind create cluster --config testing/gh-actions/kind-1-33.yaml
40-
41-
- name: Install kustomize
42-
run: ./testing/gh-actions/install_kustomize.sh
43-
44-
- name: Install Istio
45-
run: ./testing/gh-actions/install_istio.sh
46-
47-
- name: Create Kubeflow Namespace
48-
run: kubectl create namespace kubeflow
49-
50-
- name: Build Access Management Image
51-
run: |
52-
cd components/access-management
53-
make docker-build-multi-arch IMG="${ACCESS_MANAGEMENT_IMG}" TAG="${TAG}"
54-
kind load docker-image "${ACCESS_MANAGEMENT_IMG}:${TAG}"
55-
cd ../..
56-
57-
- name: Build and Deploy Profile Controller with KFAM
58-
run: |
59-
cd components/profile-controller
60-
make docker-build-multi-arch IMG="${PROFILE_CONTROLLER_IMG}" TAG="${TAG}"
61-
kind load docker-image "${PROFILE_CONTROLLER_IMG}:${TAG}"
62-
cd manifests/kustomize
63-
kustomize build overlays/kubeflow \
64-
| sed "s|ghcr.io/kubeflow/dashboard/profile-controller:[a-zA-Z0-9_.-]*|${PROFILE_CONTROLLER_IMG}:${TAG}|g" \
65-
| sed "s|ghcr.io/kubeflow/dashboard/access-management:[a-zA-Z0-9_.-]*|${ACCESS_MANAGEMENT_IMG}:${TAG}|g" \
66-
| kubectl apply -f -
67-
kubectl wait --for=condition=Available deployment -n kubeflow profiles-deployment --timeout=300s
68-
kubectl wait --for=condition=Ready pods -n kubeflow -l app=profiles --timeout=300s
69-
70-
- name: Deploy CentralDashboard-Angular Component
71-
run: |
72-
./testing/shared/deploy_component.sh \
73-
"components/centraldashboard-angular" \
74-
"${DASHBOARD_IMG}" \
75-
"${TAG}" \
76-
"manifests/kustomize" \
77-
"overlays/kserve"
78-
kubectl wait --for=condition=Ready pods -n kubeflow -l app=dashboard-angular --timeout=300s
79-
kubectl wait --for=condition=Available deployment -n kubeflow dashboard-angular --timeout=300s
80-
81-
- name: Create Test Profile for Dashboard Testing
82-
run: |
83-
cat <<EOF | kubectl apply -f -
84-
apiVersion: kubeflow.org/v1
85-
kind: Profile
86-
metadata:
87-
name: test-dashboard-profile
88-
spec:
89-
owner:
90-
kind: User
91-
name: dashboard-user@example.com
92-
EOF
93-
94-
for i in {1..60}; do
95-
if kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
96-
break
97-
fi
98-
echo "Waiting for namespace... (attempt $i/60)"
99-
sleep 5
100-
done
101-
102-
if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
103-
exit 1
104-
fi
105-
106-
kubectl get profile test-dashboard-profile
107-
kubectl get namespace test-dashboard-profile
108-
109-
- name: Validate Service
110-
run: |
111-
./testing/shared/test_service.sh validate-service dashboard-angular kubeflow
112-
113-
- name: Start Port Forward for Dashboard Testing
114-
run: |
115-
./testing/shared/test_service.sh port-forward dashboard-angular kubeflow 8080 80
116-
117-
- name: Test Dashboard Health
118-
run: |
119-
./testing/shared/test_service.sh test-health dashboard-angular kubeflow 8080
120-
121-
- name: Test Dashboard Web Interface
122-
run: |
123-
curl -f "http://localhost:8080/" >/dev/null 2>&1
124-
125-
curl -f "http://localhost:8080/healthz" >/dev/null 2>&1
126-
127-
RESPONSE=$(curl -s "http://localhost:8080/" | head -c 100)
128-
if [[ -n "$RESPONSE" ]]; then
129-
echo "Dashboard is serving content: ${RESPONSE:0:50}..."
130-
else
131-
exit 1
132-
fi
133-
134-
kubectl get service dashboard-angular -n kubeflow
135-
kubectl get pods -n kubeflow -l app=dashboard-angular
136-
137-
- name: Test Dashboard Performance
138-
run: |
139-
./testing/shared/test_service.sh performance-test dashboard-angular kubeflow 8080 80 8
140-
141-
- name: Test Dashboard Metrics
142-
run: |
143-
./testing/shared/test_service.sh test-metrics dashboard-angular kubeflow 8080
144-
145-
- name: Check Dashboard Logs
146-
run: |
147-
./testing/shared/test_service.sh check-logs dashboard-angular kubeflow 50
148-
149-
- name: Check for Errors in Logs
150-
run: |
151-
./testing/shared/test_service.sh check-errors dashboard-angular kubeflow
152-
153-
- name: Stop Port Forward
154-
run: |
155-
./testing/shared/test_service.sh stop-port-forward dashboard-angular kubeflow 8080
156-
157-
- name: Cleanup Test Resources
158-
run: |
159-
kubectl delete profile test-dashboard-profile --ignore-not-found=true
160-
for i in {1..30}; do
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Install KinD
36+
run: ./testing/gh-actions/install_kind.sh
37+
38+
- name: Create KinD Cluster
39+
run: kind create cluster --config testing/gh-actions/kind-1-33.yaml
40+
41+
- name: Install kustomize
42+
run: ./testing/gh-actions/install_kustomize.sh
43+
44+
- name: Install Istio
45+
run: ./testing/gh-actions/install_istio.sh
46+
47+
- name: Create Kubeflow Namespace
48+
run: kubectl create namespace kubeflow
49+
50+
- name: Build Access Management Image
51+
run: |
52+
cd components/access-management
53+
make docker-build-multi-arch IMG="${ACCESS_MANAGEMENT_IMG}" TAG="${TAG}"
54+
kind load docker-image "${ACCESS_MANAGEMENT_IMG}:${TAG}"
55+
cd ../..
56+
57+
- name: Build and Deploy Profile Controller with KFAM
58+
run: |
59+
cd components/profile-controller
60+
make docker-build-multi-arch IMG="${PROFILE_CONTROLLER_IMG}" TAG="${TAG}"
61+
kind load docker-image "${PROFILE_CONTROLLER_IMG}:${TAG}"
62+
cd manifests/kustomize
63+
kustomize build overlays/kubeflow \
64+
| sed "s|ghcr.io/kubeflow/dashboard/profile-controller:[a-zA-Z0-9_.-]*|${PROFILE_CONTROLLER_IMG}:${TAG}|g" \
65+
| sed "s|ghcr.io/kubeflow/dashboard/access-management:[a-zA-Z0-9_.-]*|${ACCESS_MANAGEMENT_IMG}:${TAG}|g" \
66+
| kubectl apply -f -
67+
kubectl wait --for=condition=Available deployment -n kubeflow profiles-deployment --timeout=300s
68+
kubectl wait --for=condition=Ready pods -n kubeflow -l app.kubernetes.io/component=profile-controller --timeout=300s
69+
70+
- name: Deploy CentralDashboard-Angular Component
71+
run: |
72+
./testing/shared/deploy_component.sh \
73+
"components/centraldashboard-angular" \
74+
"${DASHBOARD_IMG}" \
75+
"${TAG}" \
76+
"manifests/kustomize" \
77+
"overlays/kserve"
78+
kubectl wait --for=condition=Ready pods -n kubeflow -l app=dashboard-angular --timeout=300s
79+
kubectl wait --for=condition=Available deployment -n kubeflow dashboard-angular --timeout=300s
80+
81+
- name: Create Test Profile for Dashboard Testing
82+
run: |
83+
cat <<EOF | kubectl apply -f -
84+
apiVersion: kubeflow.org/v1
85+
kind: Profile
86+
metadata:
87+
name: test-dashboard-profile
88+
spec:
89+
owner:
90+
kind: User
91+
name: dashboard-user@example.com
92+
EOF
93+
94+
for i in {1..60}; do
95+
if kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
96+
break
97+
fi
98+
echo "Waiting for namespace... (attempt $i/60)"
99+
sleep 5
100+
done
101+
161102
if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
162-
break
103+
exit 1
163104
fi
164-
echo "Waiting for namespace deletion... (attempt $i/30)"
165-
sleep 5
166-
done
105+
106+
kubectl get profile test-dashboard-profile
107+
kubectl get namespace test-dashboard-profile
108+
109+
- name: Validate Service
110+
run: |
111+
./testing/shared/test_service.sh validate-service dashboard-angular kubeflow
112+
113+
- name: Start Port Forward for Dashboard Testing
114+
run: |
115+
./testing/shared/test_service.sh port-forward dashboard-angular kubeflow 8080 80
116+
117+
- name: Test Dashboard Health
118+
run: |
119+
./testing/shared/test_service.sh test-health dashboard-angular kubeflow 8080
120+
121+
- name: Test Dashboard Web Interface
122+
run: |
123+
curl -f "http://localhost:8080/" >/dev/null 2>&1
124+
125+
curl -f "http://localhost:8080/healthz" >/dev/null 2>&1
126+
127+
RESPONSE=$(curl -s "http://localhost:8080/" | head -c 100)
128+
if [[ -n "$RESPONSE" ]]; then
129+
echo "Dashboard is serving content: ${RESPONSE:0:50}..."
130+
else
131+
exit 1
132+
fi
133+
134+
kubectl get service dashboard-angular -n kubeflow
135+
kubectl get pods -n kubeflow -l app=dashboard-angular
136+
137+
- name: Test Dashboard Performance
138+
run: |
139+
./testing/shared/test_service.sh performance-test dashboard-angular kubeflow 8080 80 8
140+
141+
- name: Test Dashboard Metrics
142+
run: |
143+
./testing/shared/test_service.sh test-metrics dashboard-angular kubeflow 8080
144+
145+
- name: Check Dashboard Logs
146+
run: |
147+
./testing/shared/test_service.sh check-logs dashboard-angular kubeflow 50
148+
149+
- name: Check for Errors in Logs
150+
run: |
151+
./testing/shared/test_service.sh check-errors dashboard-angular kubeflow
152+
153+
- name: Stop Port Forward
154+
run: |
155+
./testing/shared/test_service.sh stop-port-forward dashboard-angular kubeflow 8080
156+
157+
- name: Cleanup Test Resources
158+
run: |
159+
kubectl delete profile test-dashboard-profile --ignore-not-found=true
160+
for i in {1..30}; do
161+
if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
162+
break
163+
fi
164+
echo "Waiting for namespace deletion... (attempt $i/30)"
165+
sleep 5
166+
done

0 commit comments

Comments
 (0)