-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Use new istio-iptables cleanup methodology in VMs #52918
Conversation
Skipping CI for Draft Pull Request. |
@@ -66,7 +66,7 @@ if [ "${ISTIO_CUSTOM_IP_TABLES}" != "true" ] ; then | |||
if [[ ${1-} == "init" || ${1-} == "-p" ]] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find where this codepath is used but I adjusted it anyway. Perhaps it is something old we don't need to support anymore?
@@ -77,7 +77,7 @@ if [ "${ISTIO_CUSTOM_IP_TABLES}" != "true" ] ; then | |||
if [[ ${1-} != "run" ]] ; then | |||
# clean the previous Istio iptables chains. This part is different from the init image mode, | |||
# where the init container runs in a fresh environment and there cannot be previous Istio chains | |||
"${ISTIO_BIN_BASE}/pilot-agent" istio-clean-iptables | |||
"${ISTIO_BIN_BASE}/pilot-agent" istio-iptables --cleanup-only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could have been simplified in one ""${ISTIO_BIN_BASE}/pilot-agent" istio-iptables --reconcile" cmd but I'm keeping the "preemptive cleanup"+apply step separate to be as consistent as possible with the old handling
* upstream/master: Automator: update proxy@master in istio/istio@master (istio#52957) Add/Increase retry timeout due to delay in AWS config propagation (istio#52938) Apply local weight lb only when locality lb is enabled (istio#52898) Fix sending to external service entry from a VS (istio#52589) Automator: update proxy@master in istio/istio@master (istio#52946) Add option to exclude CRDs during install (istio#52947) Use new istio-iptables cleanup methodology in VMs (istio#52918)
This update will change the current handling of start/stop/clean operations in VMs to rely on
istio-iptables --cleanup-only
instead of the oldistio-clean-iptables
command.istio-iptables --cleanup-only
computes the rules that need to be deleted in a "dynamic" way based on what the command would have applied if the cleanup option was not used.On the other hand,
istio-clean-iptables
relied on hardcoded logic which was separate from the one used to create rules in istio-iptables. This approach required constant maintenance to ensure that the two different tools did not diverge over time.This change removes the need to maintain
istio-clean-iptables
and prevents issues similar to #52835 and #41431 from occurring.I'm not sure whether the istio-clean-iptables source code in the repo should be removed right away or not. We could keep it around for 1-2 releases in case someone is using it outside of our scripts but that would entail that we still need to support it a bit more in case of changes in istio-iptables rules.