@@ -283,6 +283,11 @@ jobs:
283283 run : |
284284 cd applications/mlflow
285285
286+ # Save kubeconfig to a file
287+ KUBECONFIG_FILE="/tmp/kubeconfig-helm-test-${{ github.run_id }}"
288+ echo "$KUBECONFIG" > "$KUBECONFIG_FILE"
289+ echo "Saved kubeconfig to $KUBECONFIG_FILE"
290+
286291 echo "Running Helm installation test with custom values..."
287292
288293 # Determine OCI URL - prefer direct OCI_URL if provided, otherwise construct from app/channel
@@ -323,12 +328,12 @@ jobs:
323328 fi
324329
325330 # Create namespace if it doesn't exist
326- kubectl create namespace values-test 2>/dev/null || true
331+ KUBECONFIG="$KUBECONFIG_FILE" kubectl create namespace values-test 2>/dev/null || true
327332
328333 # Install infra chart from Replicated registry
329334 echo "Installing infra chart from Replicated registry..."
330335 echo "Chart path: $OCI_URL/infra"
331- helm upgrade --install infra-values-test $OCI_URL/infra \
336+ KUBECONFIG="$KUBECONFIG_FILE" helm upgrade --install infra-values-test $OCI_URL/infra \
332337 --namespace values-test \
333338 --wait --timeout 5m --debug || {
334339 echo "ERROR: Failed to install infra chart from $OCI_URL/infra"
@@ -340,7 +345,7 @@ jobs:
340345 echo "Installing mlflow chart from Replicated registry with custom values..."
341346 echo "Chart path: $OCI_URL/mlflow"
342347 echo "Using values args: $MLFLOW_VALUES_ARGS"
343- helm upgrade --install mlflow-values-test $OCI_URL/mlflow \
348+ KUBECONFIG="$KUBECONFIG_FILE" helm upgrade --install mlflow-values-test $OCI_URL/mlflow \
344349 --namespace values-test \
345350 $MLFLOW_VALUES_ARGS \
346351 --wait --timeout 5m --debug || {
@@ -361,16 +366,25 @@ jobs:
361366 - name : Run Application Tests
362367 run : |
363368 cd applications/mlflow
369+
370+ # Save kubeconfig to a file (if not already saved)
371+ KUBECONFIG_FILE="/tmp/kubeconfig-helm-test-${{ github.run_id }}"
372+ if [ ! -f "$KUBECONFIG_FILE" ]; then
373+ echo "$KUBECONFIG" > "$KUBECONFIG_FILE"
374+ fi
375+
364376 echo "Installing Python dependencies for tests..."
365377 pip install mlflow pandas scikit-learn requests urllib3
366378
367379 echo "Running MLflow application tests against ${{ steps.expose-port.outputs.hostname }}"
368380 echo "This may take some time as it will retry connections for up to 2 minutes"
369- python tests/mlflow_test.py ${{ steps.expose-port.outputs.hostname }} \
381+ KUBECONFIG="$KUBECONFIG_FILE" python tests/mlflow_test.py ${{ steps.expose-port.outputs.hostname }} \
370382 --protocol https \
371383 --connection-timeout 60 \
372384 --debug
373385 timeout-minutes : 5
386+ env :
387+ KUBECONFIG : ${{ steps.create-cluster.outputs.cluster-kubeconfig }}
374388
375389 - name : Install troubleshoot
376390 run : curl -L https://github.com/replicatedhq/troubleshoot/releases/latest/download/support-bundle_linux_amd64.tar.gz | tar xzvf -
0 commit comments