Skip to content
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

second part of supporting istio egress gateways #605

Merged
merged 95 commits into from
Dec 31, 2023

Conversation

tanyaveksler
Copy link
Member

@tanyaveksler tanyaveksler commented Sep 24, 2023

issue #637

…pairs (key, value) to allow missing pods having the same label key but different label values.

Bug fix in IngressNetworkLayer._allowed_xgress_conns_optimized: all_allowed_conns should always include allowed_conns.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Bug fix: considering DNS entries when computing allowed connections in the Ingress layer.
Removing duplicates from the list of missing livesim resources.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
…on of istio-egressgateway resource to livesim, and changing the namespace of istio-ingressgateway to istio-system.

Signed-off-by: Tanya <tatyana@il.ibm.com>
…ding policy rules.

Signed-off-by: Tanya <tatyana@il.ibm.com>
@tanyaveksler tanyaveksler self-assigned this Sep 24, 2023
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
…ned with livesim, until #610 is implemented).

Extending IngressPolicy to both directions (ingress/egress)
Splitting livesim ingress/egress gateway resources to separated files.

Signed-off-by: Tanya <tatyana@il.ibm.com>
…ned with livesim, until #610 is implemented).

Extending IngressPolicy to both directions (ingress/egress)
Splitting livesim ingress/egress gateway resources to separated files.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
…according to the change in livesim implementation of these gateways.

Temporarily commenting out other expected results, until ingress/egress gateway implementation is completes.

Signed-off-by: Tanya <tatyana@il.ibm.com>
…according to the change in livesim implementation of these gateways.

Signed-off-by: Tanya <tatyana@il.ibm.com>
@adisos adisos changed the base branch from master to 566-support-for-istio-egress-gateway October 15, 2023 06:33
Copy link
Member

@adisos adisos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some basic example so that we can take a look at the analysis output with egress gateway.

Copy link
Member

@adisos adisos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial few comments, did not yet review the parser file.

Signed-off-by: Tanya <tatyana@il.ibm.com>
566-support-for-istio-egress-gateway

Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Updated istio-ingress-test and its expected results.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Renamed Ingress policy kind and Ingress layer name to IngressEgressGateway policy type and layer name.
Renamed IngressNetworkLayer to GatewayLayer.
Changed creation of deny policy - a single deny policy with one rule.
Handling denied connections in GatewayLayer; using captured_cond_func (to avoid denied connections affect captured).

Signed-off-by: Tanya <tatyana@il.ibm.com>
Fixing lint errors.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
@tanyaveksler tanyaveksler changed the base branch from 566-support-for-istio-egress-gateway to master October 31, 2023 17:03
tanyaveksler and others added 20 commits December 19, 2023 16:01
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
…eway-part2' into 566-support-for-istio-egress-gateway-part2
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Adding empty gateway policy in case no policies were generated, in order to keep findings.

Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
Signed-off-by: Tanya <tatyana@il.ibm.com>
@tanyaveksler tanyaveksler requested a review from adisos December 24, 2023 18:40
Comment on lines 98 to 100
self.vs_parser.warning(f"Ignoring partially defined egress flow: mesh-to-egress-gateway part of the flow "
f"is {part1_status}, while egress-gateway-to-external-service part of the flow "
f"is {part2_status}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrase the warning, add details on the VS ignored

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tanyaveksler tanyaveksler requested a review from adisos December 26, 2023 09:44
- name: istio-egress
resourceList:
- ./resources
expectedWarnings: 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this test I can see two related warnings:

Warning: Ignoring partially specified connections through egress gateway: mesh-to-egress-gateway connections are missing, while egress-gateway-to-external-service connections are specified in virtual service default/httpbin, route number 1, gateway istio-system/my-gateway.
Warning: no valid VirtualServices found. Ignoring istio ingress/egress gateway traffic

Can we avoid the second warning here?
Also, in cases the second warning is relevant, can it specify ingress or egress only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoided printing the second warning in the above case.
Removed 'ingress/egress' from the second warning, apparently for invalid/partially defined virtual services / gateways we cannot always detect whether it is an ingress or egress flow.

Signed-off-by: Tanya <tatyana@il.ibm.com>
@tanyaveksler tanyaveksler requested a review from adisos December 26, 2023 14:29
@tanyaveksler tanyaveksler merged commit c235f1f into master Dec 31, 2023
16 checks passed
@tanyaveksler tanyaveksler deleted the 566-support-for-istio-egress-gateway-part2 branch December 31, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants