diff --git a/scripts/workers/code_upload_worker_utils/install_dependencies.sh b/scripts/workers/code_upload_worker_utils/install_dependencies.sh index 6eedbe0d4b..dadf1d35a8 100755 --- a/scripts/workers/code_upload_worker_utils/install_dependencies.sh +++ b/scripts/workers/code_upload_worker_utils/install_dependencies.sh @@ -45,9 +45,9 @@ echo "### Cilium Installed" sleep 120s; # Apply cilium network policy -# echo "### Setting up Cilium Network Policy..." -# cat /code/scripts/workers/code_upload_worker_utils/network_policies.yaml | sed "s/{{EVALAI_DNS}}/$EVALAI_DNS/" | kubectl apply -f - -# echo "### Cilium EvalAI Network Policy Installed" +echo "### Setting up Cilium Network Policy..." +cat /code/scripts/workers/code_upload_worker_utils/network_policies.yaml | sed "s/{{EVALAI_DNS}}/$EVALAI_DNS/" | kubectl apply -f - +echo "### Cilium EvalAI Network Policy Installed" # Set ssl-certificate echo $CERTIFICATE | base64 --decode > scripts/workers/certificate.crt diff --git a/scripts/workers/code_upload_worker_utils/network_policies.yaml b/scripts/workers/code_upload_worker_utils/network_policies.yaml index 4c318106fa..a11552be6a 100644 --- a/scripts/workers/code_upload_worker_utils/network_policies.yaml +++ b/scripts/workers/code_upload_worker_utils/network_policies.yaml @@ -8,8 +8,8 @@ spec: {} egress: - toFQDNs: - - matchName: archive.ubuntu.com - matchName: {{EVALAI_DNS}} + - matchPattern: "*.ubuntu.com" - toEndpoints: - matchLabels: "k8s:io.kubernetes.pod.namespace": kube-system