You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See test .../tests/istio_testcases/example_policies/testcase2/testcase2-istio-scheme.yaml, the difference between istio6 and istio7 configs.
In istio6 the action is 'ALLOW', and thus the only allowed sources connected to the selected peers are those explicitly defined in the policy rules. Since IP blocks are not mentioned in the rules, they are not connected to the selected peers.
In istio7, on the other hand, the action is 'DENY'. and thus all connections to the selected peers are allowed except of those mentioned in the policy rules. Since only IPv4 blocks are mentioned in the policy, all the rest (IPv6) blocks are connected to the selected peers.
Thus, the connectivity maps of istio6 and istio7 differ by IPv6 block (this difference may be observed when setting the option excludeIPv6Range to false (by default it is true and the difference cannot be observed).
This change in the connectivity maps is observed due to the inclusion of all IPs block in peers to compare, as follows:
A comment from @tanyaveksler :
On a second thought, the problem is not in disjoint_referenced_ip_blocks calculation, but rather in the expected result of the equivalence query, and the fact that excludeIPv6Range flag masks the difference.
See test
.../tests/istio_testcases/example_policies/testcase2/testcase2-istio-scheme.yaml
, the difference betweenistio6
andistio7
configs.In
istio6
the action is 'ALLOW', and thus the only allowed sources connected to the selected peers are those explicitly defined in the policy rules. Since IP blocks are not mentioned in the rules, they are not connected to the selected peers.In
istio7
, on the other hand, the action is 'DENY'. and thus all connections to the selected peers are allowed except of those mentioned in the policy rules. Since only IPv4 blocks are mentioned in the policy, all the rest (IPv6) blocks are connected to the selected peers.Thus, the connectivity maps of
istio6
andistio7
differ by IPv6 block (this difference may be observed when setting the optionexcludeIPv6Range
tofalse
(by default it is true and the difference cannot be observed).This change in the connectivity maps is observed due to the inclusion of all IPs block in peers to compare, as follows:
However, in the equivalence query, peers to compare are calculated as follows (in the function
disjoint_referenced_ip_blocks
)Thus, the
EquivalenceQuery
returns thatistio6
andistio7
configs are equivalent, even when theexcludeIPv6Range
isfalse
.This inconsistency between
ConnectivityMapQuery
andEquivalenceQuery
is misleading and should be resolved in either way.The text was updated successfully, but these errors were encountered: