@@ -28,9 +28,12 @@ TEST_MANIFESTS=".github/resources/manifests"
2828PIPELINES_STORE=" database" 
2929USE_PROXY=false
3030CACHE_DISABLED=false
31+ ARTIFACT_PROXY_ENABLED=false
3132MULTI_USER=false
3233STORAGE_BACKEND=" seaweedfs" 
3334AWF_VERSION=" " 
35+ POD_TO_POD_TLS_ENABLED=false
36+ SEAWEEDFS_INIT_TIMEOUT=300s
3437
3538#  Loop over script arguments passed. This uses a single switch-case
3639#  block with default value in case we want to make alternative deployments
@@ -53,6 +56,10 @@ while [ "$#" -gt 0 ]; do
5356      MULTI_USER=true
5457      shift 
5558      ;;
59+     --artifact-proxy)
60+       ARTIFACT_PROXY_ENABLED=true
61+       shift 
62+       ;;
5663    --storage)
5764      STORAGE_BACKEND=" $2 " 
5865      shift  2
@@ -67,6 +74,10 @@ while [ "$#" -gt 0 ]; do
6774        exit  1
6875      fi 
6976      ;;
77+     --tls-enabled)
78+       POD_TO_POD_TLS_ENABLED=true
79+       shift 
80+       ;;
7081  esac 
7182done 
7283
@@ -80,11 +91,6 @@ if [ "${MULTI_USER}" == "true" ] && [ "${USE_PROXY}" == "true" ]; then
8091  exit  1
8192fi 
8293
83- if  [ " ${STORAGE_BACKEND} " !=  " minio" &&  [ " ${STORAGE_BACKEND} " !=  " seaweedfs" ;  then 
84-   echo  " ERROR: Storage backend must be either 'minio' or 'seaweedfs'." 
85-   exit  1
86- fi 
87- 
8894if  [ -n  " ${AWF_VERSION} " ;  then 
8995  echo  " NOTE: Argo version ${AWF_VERSION}  specified, updating Argo Workflow manifests..." 
9096  echo  " ${AWF_VERSION} " >  third_party/argo/VERSION
@@ -100,8 +106,8 @@ if [[ $EXIT_CODE -ne 0 ]]; then
100106  exit  $EXIT_CODE 
101107fi 
102108
103- #  If pipelines store is set to 'kubernetes', cert-manager must be deployed
104- if  [ " ${PIPELINES_STORE} " ==  " kubernetes" ;  then 
109+ #  If pipelines store is set to 'kubernetes' or pod-to-pod TLS is set to 'true' , cert-manager must be deployed
110+ if  [ " ${PIPELINES_STORE} " ==  " kubernetes"   ||  [  " ${POD_TO_POD_TLS_ENABLED} "   ==   " true "  ] ;  then 
105111  # Install cert-manager
106112  make -C ./backend install-cert-manager ||  EXIT_CODE=$? 
107113  if  [[ $EXIT_CODE  -ne  0 ]]
@@ -128,15 +134,6 @@ if [ "${MULTI_USER}" == "true" ]; then
128134  echo  " Installing Profile Controller Resources..." 
129135  kubectl apply -k https://github.com/kubeflow/manifests/applications/profiles/upstream/overlays/kubeflow? ref=master
130136  kubectl -n kubeflow wait  --for=condition=Ready pods -l kustomize.component=profiles --timeout 180s
131- 
132-   echo  " Creating KF Profile..." 
133-   kubectl apply -f test_data/kubernetes/seaweedfs/test-profiles.yaml
134- 
135-   echo  " Applying kubeflow-edit ClusterRole with proper aggregation..." 
136-   kubectl apply -f test_data/kubernetes/seaweedfs/kubeflow-edit-clusterrole.yaml
137- 
138-   echo  " Applying network policy to allow user namespace access to kubeflow services..." 
139-   kubectl apply -f test_data/kubernetes/seaweedfs/allow-user-namespace-access.yaml
140137fi 
141138
142139#  Manifests will be deployed according to the flag provided
@@ -156,6 +153,8 @@ if [ "${MULTI_USER}" == "false" ] && [ "${PIPELINES_STORE}" != "kubernetes" ]; t
156153    TEST_MANIFESTS=" ${TEST_MANIFESTS} /proxy-minio" 
157154  elif  $CACHE_DISABLED  &&  $USE_PROXY  &&  [ " ${STORAGE_BACKEND} " ==  " minio" ;  then 
158155    TEST_MANIFESTS=" ${TEST_MANIFESTS} /cache-disabled-proxy-minio" 
156+   elif  $POD_TO_POD_TLS_ENABLED ;  then 
157+     TEST_MANIFESTS=" ${TEST_MANIFESTS} /tls-enabled" 
159158  else 
160159    TEST_MANIFESTS=" ${TEST_MANIFESTS} /default" 
161160  fi 
@@ -168,17 +167,20 @@ elif [ "${MULTI_USER}" == "false" ] && [ "${PIPELINES_STORE}" == "kubernetes" ];
168167  fi 
169168elif  [ " ${MULTI_USER} " ==  " true" ;  then 
170169  TEST_MANIFESTS=" ${TEST_MANIFESTS} /multiuser" 
171-   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 
172173    TEST_MANIFESTS=" ${TEST_MANIFESTS} /minio" 
173-   elif  $CACHE_DISABLED ;  then 
174-     TEST_MANIFESTS=" ${TEST_MANIFESTS} /cache-disabled" 
175174  elif  $CACHE_DISABLED  &&  [ " ${STORAGE_BACKEND} " ==  " minio" ;  then 
176175    TEST_MANIFESTS=" ${TEST_MANIFESTS} /cache-disabled-minio" 
176+   elif  $CACHE_DISABLED ;  then 
177+     TEST_MANIFESTS=" ${TEST_MANIFESTS} /cache-disabled" 
177178  else 
178179    TEST_MANIFESTS=" ${TEST_MANIFESTS} /default" 
179180  fi 
180181fi 
181182
183+ 
182184echo  " Deploying ${TEST_MANIFESTS} ..." 
183185
184186kubectl apply -k " ${TEST_MANIFESTS} " ||  EXIT_CODE=$? 
@@ -196,6 +198,29 @@ then
196198  exit  1
197199fi 
198200
201+ #  Ensure SeaweedFS S3 auth is configured before proceeding
202+ if  [ " ${STORAGE_BACKEND} " ==  " seaweedfs" ;  then 
203+   wait_for_seaweedfs_init kubeflow " ${SEAWEEDFS_INIT_TIMEOUT} " ||  EXIT_CODE=$? 
204+   if  [[ $EXIT_CODE  -ne  0 ]]
205+   then 
206+     echo  " SeaweedFS init job did not complete successfully." 
207+     exit  1
208+   fi 
209+   echo  " SeaweedFS init job completed successfully." 
210+ fi 
211+ 
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+ 
199224#  Verify pipeline integration for multi-user mode
200225if  [ " ${MULTI_USER} " ==  " true" ;  then 
201226  echo  " Verifying Pipeline Integration..." 
0 commit comments