Skip to content

Commit 3e61392

Browse files
refactor: profile-controller manifests similar to notebooks v2 (#199)
* refactor(profile-controller): extract istio resources into component Move kubeflow overlay Istio manifests (authorization policy, virtual service, params config) into config/components/istio and compose them from overlays/kubeflow. Update common labels in default and overlay kustomizations and align the authorization policy selector with app labels. Signed-off-by: alokdangre <alokdangre@gmail.com> * refactor(profile-controller): move manifests into kustomize structure Reorganize profile-controller manifests under manifests/kustomize.\nUpdate Makefile, release tooling, and install script paths to the new layout. Signed-off-by: alokdangre <alokdangre@gmail.com> * fix(ci): update profile-controller paths after manifest move Switch workflows to manifests/kustomize and update envtest CRD path for profile-controller unit tests. Signed-off-by: alokdangre <alokdangre@gmail.com> * fix(ci): updated the labels correction Signed-off-by: alokdangre <alokdangre@gmail.com> * 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> * mathew: 1 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 2 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 3 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 4 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 5 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 6 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * mathew: 7 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> --------- Signed-off-by: alokdangre <alokdangre@gmail.com> Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
1 parent 8d08130 commit 3e61392

103 files changed

Lines changed: 1559 additions & 1455 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: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
node-version: 16
4646

47-
- name: Install dependecies
47+
- name: Install dependencies
4848
run: |
4949
BASE="${{ github.workspace }}/components/centraldashboard-angular"
5050
cd "$BASE/frontend"
@@ -83,24 +83,29 @@ jobs:
8383
- name: Install Istio
8484
run: ./testing/gh-actions/install_istio.sh
8585

86-
- name: Apply KF Controllers
86+
- name: Create Kubeflow Namespace
8787
run: |
88-
cd components
8988
kubectl create namespace kubeflow
90-
kustomize build profile-controller/config/overlays/kubeflow | kubectl apply -f -
91-
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 kustomize.component=profiles --for=condition=Ready --timeout=300s
89+
90+
- name: Apply Profile Controller + KFAM
91+
run: |
92+
kustomize apply -k components/profile-controller/manifests/kustomize/overlays/kubeflow
93+
kubectl wait pods -n kubeflow -l app=profile-controller --for=condition=Ready --timeout=300s
94+
95+
- name: Apply Notebooks Controller
96+
run: |
97+
kubectl apply -k "https://github.com/kubeflow/kubeflow/components/notebook-controller/config/overlays/kubeflow?ref=v1.10.0"
9398
kubectl wait pods -n kubeflow -l app=notebook-controller --for=condition=Ready --timeout=300s
9499
95-
- name: Apply JWA manifests
100+
- name: Apply Jupyter Web App manifests
96101
run: |
97-
kustomize build https://github.com/kubeflow/kubeflow//components/crud-web-apps/jupyter/manifests/overlays/istio?ref=master | kubectl apply -f -
102+
kubectl apply -k "https://github.com/kubeflow/kubeflow/components/crud-web-apps/jupyter/manifests/overlays/istio?ref=v1.10.0"
98103
kubectl wait pods -n kubeflow -l app=jupyter-web-app --for=condition=Ready --timeout=300s
99104
kubectl port-forward -n kubeflow svc/jupyter-web-app-service 8085:80 &
100105
101-
- name: Apply VWA manifests
106+
- name: Apply Volumes Web App manifests
102107
run: |
103-
kustomize build https://github.com/kubeflow/kubeflow//components/crud-web-apps/volumes/manifests/overlays/istio?ref=master | kubectl apply -f -
108+
kubectl apply -k "https://github.com/kubeflow/kubeflow/components/crud-web-apps/volumes/manifests/overlays/istio?ref=v1.10.0"
104109
kubectl wait pods -n kubeflow -l app=volumes-web-app --for=condition=Ready --timeout=300s
105110
kubectl port-forward -n kubeflow svc/volumes-web-app-service 8087:80 &
106111
@@ -117,7 +122,7 @@ jobs:
117122
curl -H "kubeflow-userid: user" localhost:8085
118123
curl -H "kubeflow-userid: user" localhost:8087
119124
120-
- name: Install dependecies
125+
- name: Install dependencies
121126
run: |
122127
BASE="${{ github.workspace }}/components/centraldashboard-angular"
123128
cd "$BASE/frontend"

.github/workflows/central_dashboard_angular_integration_test.yaml

Lines changed: 137 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,140 @@ 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 config
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 kustomize.component=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=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 for Errors in Logs
146+
run: |
147+
kubectl logs --tail=100 --prefix -n kubeflow -l app=dashboard-angular
148+
./testing/shared/test_service.sh check-errors dashboard-angular kubeflow
149+
150+
- name: Stop Port Forward
151+
run: |
152+
./testing/shared/test_service.sh stop-port-forward dashboard-angular kubeflow 8080
153+
154+
- name: Cleanup Test Resources
155+
run: |
156+
kubectl delete profile test-dashboard-profile --ignore-not-found=true
157+
for i in {1..30}; do
158+
if ! kubectl get namespace test-dashboard-profile >/dev/null 2>&1; then
159+
break
160+
fi
161+
echo "Waiting for namespace deletion... (attempt $i/30)"
162+
sleep 5
163+
done

.github/workflows/central_dashboard_integration_test.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ jobs:
8585
./testing/shared/test_service.sh test-dashboard dashboard kubeflow 8082
8686
./testing/shared/test_service.sh performance-test dashboard kubeflow 8082 80 10
8787
./testing/shared/test_service.sh test-metrics dashboard kubeflow 8082
88-
./testing/shared/test_service.sh check-logs dashboard kubeflow 50
88+
89+
- name: Check Logs for Errors
90+
run: |
91+
kubectl logs --tail=100 --prefix -n kubeflow -l app=dashboard
8992
./testing/shared/test_service.sh check-errors dashboard kubeflow
9093
9194
- name: Test Dashboard Configuration

0 commit comments

Comments
 (0)