Skip to content

Commit 8c10e7b

Browse files
committed
Merge branch 'kubeflow:master' into feature/kubeflow-sdk-integrate
Signed-off-by: Prateek Bala <[email protected]>
2 parents 0dca0f6 + de3feb5 commit 8c10e7b

File tree

10 files changed

+364
-60
lines changed

10 files changed

+364
-60
lines changed

.github/actions/deploy/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inputs:
2727
description: "If KFP should be deployed in multi-user mode"
2828
required: false
2929
default: 'false'
30+
artifact_proxy:
31+
description: "Enables artifact proxy"
32+
required: false
33+
default: 'false'
3034
storage_backend:
3135
description: "Storage backend to use (minio or seaweedfs)"
3236
required: false
@@ -94,6 +98,11 @@ runs:
9498
ARGS="${ARGS} --multi-user"
9599
fi
96100
101+
if [ "${{ inputs.artifact_proxy }}" = "true" ]; then
102+
echo "Enabling artifact proxy"
103+
ARGS="${ARGS} --artifact-proxy"
104+
fi
105+
97106
if [ "${{ inputs.storage_backend }}" != "seaweedfs" ] && [ -n "${{ inputs.storage_backend }}" ]; then
98107
echo "Deploying with artifact storage ${{ inputs.storage_backend }}"
99108
ARGS="${ARGS} --storage ${{ inputs.storage_backend }}"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../default
6+
7+
patches:
8+
- target:
9+
kind: ConfigMap
10+
name: pipeline-install-config
11+
patch: |
12+
- op: add
13+
path: /data/ARTIFACTS_PROXY_ENABLED
14+
value: "true"
15+
- target:
16+
kind: Deployment
17+
name: kubeflow-pipelines-profile-controller
18+
patch: |
19+
- op: add
20+
path: /spec/template/spec/containers/0/env/-
21+
value:
22+
name: DISABLE_ISTIO_SIDECAR
23+
value: "true" # Dangerous and only for CI/CD, not production usage
24+

.github/resources/scripts/deploy-kfp.sh

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ TEST_MANIFESTS=".github/resources/manifests"
2828
PIPELINES_STORE="database"
2929
USE_PROXY=false
3030
CACHE_DISABLED=false
31+
ARTIFACT_PROXY_ENABLED=false
3132
MULTI_USER=false
3233
STORAGE_BACKEND="seaweedfs"
3334
AWF_VERSION=""
@@ -55,6 +56,10 @@ while [ "$#" -gt 0 ]; do
5556
MULTI_USER=true
5657
shift
5758
;;
59+
--artifact-proxy)
60+
ARTIFACT_PROXY_ENABLED=true
61+
shift
62+
;;
5863
--storage)
5964
STORAGE_BACKEND="$2"
6065
shift 2
@@ -86,11 +91,6 @@ if [ "${MULTI_USER}" == "true" ] && [ "${USE_PROXY}" == "true" ]; then
8691
exit 1
8792
fi
8893

89-
if [ "${STORAGE_BACKEND}" != "minio" ] && [ "${STORAGE_BACKEND}" != "seaweedfs" ]; then
90-
echo "ERROR: Storage backend must be either 'minio' or 'seaweedfs'."
91-
exit 1
92-
fi
93-
9494
if [ -n "${AWF_VERSION}" ]; then
9595
echo "NOTE: Argo version ${AWF_VERSION} specified, updating Argo Workflow manifests..."
9696
echo "${AWF_VERSION}" > third_party/argo/VERSION
@@ -134,15 +134,6 @@ if [ "${MULTI_USER}" == "true" ]; then
134134
echo "Installing Profile Controller Resources..."
135135
kubectl apply -k https://github.com/kubeflow/manifests/applications/profiles/upstream/overlays/kubeflow?ref=master
136136
kubectl -n kubeflow wait --for=condition=Ready pods -l kustomize.component=profiles --timeout 180s
137-
138-
echo "Creating KF Profile..."
139-
kubectl apply -f test_data/kubernetes/seaweedfs/test-profiles.yaml
140-
141-
echo "Applying kubeflow-edit ClusterRole with proper aggregation..."
142-
kubectl apply -f test_data/kubernetes/seaweedfs/kubeflow-edit-clusterrole.yaml
143-
144-
echo "Applying network policy to allow user namespace access to kubeflow services..."
145-
kubectl apply -f test_data/kubernetes/seaweedfs/allow-user-namespace-access.yaml
146137
fi
147138

148139
# Manifests will be deployed according to the flag provided
@@ -176,17 +167,20 @@ elif [ "${MULTI_USER}" == "false" ] && [ "${PIPELINES_STORE}" == "kubernetes" ];
176167
fi
177168
elif [ "${MULTI_USER}" == "true" ]; then
178169
TEST_MANIFESTS="${TEST_MANIFESTS}/multiuser"
179-
if [ "${STORAGE_BACKEND}" == "minio" ]; then
170+
if $ARTIFACT_PROXY_ENABLED && [ "${STORAGE_BACKEND}" == "seaweedfs" ]; then
171+
TEST_MANIFESTS="${TEST_MANIFESTS}/artifact-proxy"
172+
elif [ "${STORAGE_BACKEND}" == "minio" ]; then
180173
TEST_MANIFESTS="${TEST_MANIFESTS}/minio"
181-
elif $CACHE_DISABLED; then
182-
TEST_MANIFESTS="${TEST_MANIFESTS}/cache-disabled"
183174
elif $CACHE_DISABLED && [ "${STORAGE_BACKEND}" == "minio" ]; then
184175
TEST_MANIFESTS="${TEST_MANIFESTS}/cache-disabled-minio"
176+
elif $CACHE_DISABLED; then
177+
TEST_MANIFESTS="${TEST_MANIFESTS}/cache-disabled"
185178
else
186179
TEST_MANIFESTS="${TEST_MANIFESTS}/default"
187180
fi
188181
fi
189182

183+
190184
echo "Deploying ${TEST_MANIFESTS}..."
191185

192186
kubectl apply -k "${TEST_MANIFESTS}" || EXIT_CODE=$?
@@ -215,6 +209,18 @@ if [ "${STORAGE_BACKEND}" == "seaweedfs" ]; then
215209
echo "SeaweedFS init job completed successfully."
216210
fi
217211

212+
if [ "${MULTI_USER}" == "true" ]; then
213+
echo "Creating KF Profile..."
214+
kubectl apply -f test_data/kubernetes/seaweedfs/test-profiles.yaml
215+
sleep 30 # Let the profile controler reconcile the namespace
216+
217+
echo "Applying kubeflow-edit ClusterRole with proper aggregation..."
218+
kubectl apply -f test_data/kubernetes/seaweedfs/kubeflow-edit-clusterrole.yaml
219+
220+
echo "Applying network policy to allow user namespace access to kubeflow services..."
221+
kubectl apply -f test_data/kubernetes/seaweedfs/allow-user-namespace-access.yaml
222+
fi
223+
218224
# Verify pipeline integration for multi-user mode
219225
if [ "${MULTI_USER}" == "true" ]; then
220226
echo "Verifying Pipeline Integration..."

.github/workflows/e2e-test.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,15 @@ jobs:
172172
storage: [ "seaweedfs", "minio"]
173173
multi_user: [ "true" ]
174174
test_label: [ "E2ECritical" ]
175+
include:
176+
- multi_user: "true"
177+
artifact_proxy: "true"
178+
storage: "seaweedfs"
179+
k8s_version: "v1.31.0"
180+
cache_enabled: "true"
181+
test_label: "E2ECritical"
175182
fail-fast: false
176-
name: End to End Critical Scenario Multi User Tests - K8s ${{ matrix.k8s_version }} cacheEnabled=${{ matrix.cache_enabled }} multiUser=${{ matrix.multi_user }} argoVersion=${{ matrix.argo_version}} proxy=${{ matrix.proxy}} storage=${{ matrix.storage }}
183+
name: End to End Critical Scenario Multi User Tests - K8s ${{ matrix.k8s_version }} cacheEnabled=${{ matrix.cache_enabled }} multiUser=${{ matrix.multi_user }} argoVersion=${{ matrix.argo_version}} proxy=${{ matrix.proxy}} storage=${{ matrix.storage }} artifactProxy=${{ matrix.artifact_proxy }}
177184
steps:
178185
- name: Checkout code
179186
uses: actions/checkout@v5
@@ -196,6 +203,7 @@ jobs:
196203
cache_enabled: ${{ matrix.cache_enabled }}
197204
multi_user: "true"
198205
storage_backend: ${{ matrix.storage }}
206+
artifact_proxy: ${{ matrix.artifact_proxy }}
199207
image_path: ${{ needs.build.outputs.IMAGE_PATH }}
200208
image_tag: ${{ needs.build.outputs.IMAGE_TAG }}
201209
image_registry: ${{ needs.build.outputs.IMAGE_REGISTRY }}
@@ -225,6 +233,15 @@ jobs:
225233
kind --name kfp load docker-image registry.domain.local/modelcar:test
226234
continue-on-error: true
227235

236+
- name: Test Artifact Proxy
237+
id: test-artifact-proxy
238+
if: ${{ steps.deploy.outcome == 'success' && matrix.artifact_proxy == 'true' }}
239+
shell: bash
240+
env:
241+
USER_NAMESPACE: ${{ env.USER_NAMESPACE }}
242+
run: |
243+
./test/artifact-proxy/test-artifact-proxy.sh "$USER_NAMESPACE"
244+
228245
- name: Run Tests
229246
uses: ./.github/actions/test-and-report
230247
if: ${{ steps.configure.outcome == 'success' }}

manifests/kustomize/base/installs/generic/pipeline-install-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,11 @@ data:
100100
## if you specifically need to access unique pipeline root buckets per
101101
## namespace that are outside the kubeflow namespace's access.
102102
## Valid values are 'true' and 'false'. Defaults to 'false'.
103-
## For more information see: https://github.com/kubeflow/pipelines/issues/11987
103+
## For more information see: https://github.com/kubeflow/pipelines/pull/11965
104104
ARTIFACTS_PROXY_ENABLED: "false"
105+
## ARTIFACT_RETENTION_DAYS: Defines the retention period (in days) for artifacts stored in SeaweedFS.
106+
## - A positive integer specifies the number of days after which the artifact will be automatically deleted.
107+
## - A negative integer (e.g., -1) disables automatic deletion, meaning artifacts are retained indefinitely.
108+
## Note: The unit of this configuration is always in days.
109+
ARTIFACT_RETENTION_DAYS: "-1"
110+

manifests/kustomize/base/installs/multi-user/pipelines-profile-controller/deployment.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ spec:
3535
name: pipeline-install-config
3636
key: appVersion
3737
- name: AWS_ENDPOINT_URL
38-
value: http://seaweedfs:8111
38+
value: http://seaweedfs.kubeflow:8111
39+
- name: S3_ENDPOINT_URL
40+
value: http://seaweedfs.kubeflow:8333
3941
- name: AWS_REGION
4042
value: us-east-1
4143
- name: AWS_ACCESS_KEY_ID
@@ -60,6 +62,11 @@ spec:
6062
key: ARTIFACTS_PROXY_ENABLED
6163
name: pipeline-install-config
6264
optional: true
65+
- name: ARTIFACT_RETENTION_DAYS
66+
valueFrom:
67+
configMapKeyRef:
68+
key: ARTIFACT_RETENTION_DAYS
69+
name: pipeline-install-config
6370
volumeMounts:
6471
- name: hooks
6572
mountPath: /hooks

0 commit comments

Comments
 (0)