-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! dev-docs: full L3 connectivity in VPN chart
- Loading branch information
Showing
17 changed files
with
68 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.../howto/vpn/helm/files/routing/operator.sh → ...wto/vpn/helm/files/operator/entrypoint.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
set -u | ||
|
||
if [ "$$" -eq "1" ]; then | ||
echo 'This script must run in the root PID namespace, but $$ == 1!' >&2 | ||
exit 1 | ||
fi | ||
|
||
myip() { | ||
ip -j addr show eth0 | jq -r '.[0].addr_info[] | select(.family == "inet") | .local' | ||
} | ||
|
||
# Disable source IP verification on our network interface. Otherwise, VPN | ||
# packets will be dropped by Cilium. | ||
reconcile_sip_verification() { | ||
# We want all of the cilium calls in this function to target the same | ||
# process, so that we fail if the agent restarts in between. Thus, we only | ||
# query the pid once per reconciliation. | ||
cilium_agent=$(pidof cilium-agent) || return 0 | ||
|
||
cilium() { | ||
nsenter -t "${cilium_agent}" -a -r -w cilium "$@" | ||
} | ||
|
||
myendpoint=$(cilium endpoint get "ipv4:$(myip)" | jq '.[0].id') || return 0 | ||
|
||
if [ "$(cilium endpoint config "${myendpoint}" -o json | jq -r .realized.options.SourceIPVerification)" = "Enabled" ]; then | ||
cilium endpoint config "${myendpoint}" SourceIPVerification=Disabled | ||
fi | ||
} | ||
|
||
# Set up the route from the node network namespace to the VPN pod. | ||
reconcile_route() { | ||
for cidr in ${VPN_PEER_CIDRS}; do | ||
nsenter -t 1 -n ip route replace "${cidr}" via "$(myip)" | ||
done | ||
} | ||
|
||
while true; do | ||
reconcile_route | ||
reconcile_sip_verification | ||
sleep 10 | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.