Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wait routine for m2m oidc configurator #2

Merged
2 changes: 1 addition & 1 deletion .github/workflows/kserve_m2m_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -

- name: Install Istio with ext auth
run: ./tests/gh-actions/install_istio_with_ext_auth.sh*
run: ./tests/gh-actions/install_istio_with_ext_auth.sh

- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/notebook_controller_m2m_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
run: |
kustomize build apps/jupyter/jupyter-web-app/upstream/overlays/istio/ | kubectl apply -f -
kustomize build apps/jupyter/notebook-controller/upstream/overlays/kubeflow/ | kubectl apply -f -
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 300s
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s \
--field-selector=status.phase!=Succeeded

- name: Create KF Profile
run: kustomize build common/user-namespace/base | kubectl apply -f -
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pipeline_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
nohup kubectl port-forward --namespace istio-system svc/${ingress_gateway_service} 8080:80 &
while ! curl localhost:8080; do echo waiting for port-forwarding; sleep 1; done; echo port-forwarding ready

- name: Wait for the kubeflow-m2m-oidc-configurator Job
run: |
./tests/gh-actions/wait_for_kubeflow_m2m_oidc_configurator.sh

- name: List and deploy test pipeline with authorized ServiceAccount Token
run: |
pip3 install kfp==2.4.0
Expand Down Expand Up @@ -116,4 +120,4 @@ jobs:
' "${TOKEN}" "${KF_PROFILE}"

echo "Test succeeded. Token from unauthorized ServiceAccount cannot list \
piplines in $KF_PROFILE namespace."
piplines in $KF_PROFILE namespace."
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: kubeflow-m2m-oidc-configurator
namespace: istio-system
spec:
schedule: '* * * * *'
schedule: '*/5 * * * *'
concurrencyPolicy: Forbid
jobTemplate:
spec:
ttlSecondsAfterFinished: 60
ttlSecondsAfterFinished: 600
template:
metadata:
labels: {}
Expand Down
3 changes: 2 additions & 1 deletion tests/gh-actions/install_istio_with_ext_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ kustomize build istio-install/overlays/oauth2-proxy | kubectl apply -f -
cd -

echo "Waiting for all Istio Pods to become ready..."
kubectl wait --for=condition=Ready pods --all -n istio-system --timeout 300s
kubectl wait --for=condition=Ready pods --all -n istio-system --timeout=300s \
--field-selector=status.phase!=Succeeded

echo "Installing oauth2-proxy..."
cd common/oidc-client
Expand Down
3 changes: 2 additions & 1 deletion tests/gh-actions/install_knative-cni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ kustomize build common/knative/knative-serving/base | kubectl apply -f -
kustomize build common/istio-cni-1-21/cluster-local-gateway/base | kubectl apply -f -
kustomize build common/istio-cni-1-21/kubeflow-istio-resources/base | kubectl apply -f -

kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 600s
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \
--field-selector=status.phase!=Succeeded
kubectl patch cm config-domain --patch '{"data":{"example.com":""}}' -n knative-serving
3 changes: 2 additions & 1 deletion tests/gh-actions/install_knative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ kustomize build common/knative/knative-serving/base | kubectl apply -f -
kustomize build common/istio-1-21/cluster-local-gateway/base | kubectl apply -f -
kustomize build common/istio-1-21/kubeflow-istio-resources/base | kubectl apply -f -

kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 600s
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \
--field-selector=status.phase!=Succeeded
kubectl patch cm config-domain --patch '{"data":{"example.com":""}}' -n knative-serving
3 changes: 2 additions & 1 deletion tests/gh-actions/install_kserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ echo "Waiting for crd/clusterservingruntimes.serving.kserve.io to be available .
kubectl wait --for condition=established --timeout=30s crd/clusterservingruntimes.serving.kserve.io
kustomize build kserve | kubectl apply -f -
kustomize build models-web-app/overlays/kubeflow | kubectl apply -f -
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 600s
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \
--field-selector=status.phase!=Succeeded
3 changes: 2 additions & 1 deletion tests/gh-actions/install_pipelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ echo "Waiting for crd/compositecontrollers.metacontroller.k8s.io to be available
kubectl wait --for condition=established --timeout=30s crd/compositecontrollers.metacontroller.k8s.io
kustomize build env/cert-manager/platform-agnostic-multi-user | kubectl apply -f -
sleep 60
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 600s
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \
--field-selector=status.phase!=Succeeded
cd -
Loading