Skip to content

Commit

Permalink
Code Upload Worker: Enable cilium network policy(#3578)
Browse files Browse the repository at this point in the history
Co-authored-by: Rishabh Jain <[email protected]>
  • Loading branch information
Ram81 and RishabhJain2018 authored Aug 23, 2021
1 parent 1b18817 commit f44061a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ kubectl apply -f /code/scripts/workers/code_upload_worker_utils/persistent_volum

# Install cilium
# Cilium is being used to provide networking and network policy
# kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.9/install/kubernetes/quick-install.yaml
# echo "### Cilium Installed"
kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.9/install/kubernetes/quick-install.yaml
echo "### Cilium Installed"

sleep 120s;

# Apply cilium network policy
# cat /code/scripts/workers/code_upload_worker_utils/network_policies.yaml | sed "s/{{EVALAI_DNS}}/$EVALAI_DNS/" | kubectl apply -f -
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
{}
egress:
- toFQDNs:
- matchName: archive.ubuntu.com
- matchName: {{EVALAI_DNS}}
- toEndpoints:
- matchLabels:
Expand Down

0 comments on commit f44061a

Please sign in to comment.