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

istio-router-check: wip poc #408

Merged
merged 7 commits into from
Jul 11, 2024
Merged

istio-router-check: wip poc #408

merged 7 commits into from
Jul 11, 2024

Conversation

cainelli
Copy link
Collaborator

@cainelli cainelli commented Jul 9, 2024

  • Move it to hack directory as it is still rough edges and early development.
  • Drop wrapping of router_check_tool and just make it a generator of VirtualService to Envoy routes and aggregator of tests.
  • Rough conversion support of existing testing format to keep it running internally as PoC.
  • Support 'gateway view' when parsing VirtualServices.

cainelli added 5 commits July 4, 2024 11:44
Signed-off-by: Fernando Cainelli <[email protected]>
Signed-off-by: Fernando Cainelli <[email protected]>
Signed-off-by: Fernando Cainelli <[email protected]>
Signed-off-by: Fernando Cainelli <[email protected]>
@cainelli cainelli requested review from x-way and gygrobot as code owners July 9, 2024 18:53
@cainelli cainelli requested a review from Smeb July 9, 2024 18:53
cmd.Flags().IntVarP(&rootCmd.Verbosity, "", "v", LevelInfo, "log verbosity level")
cmd.Flags().StringVarP(&rootCmd.Gateway, "gateway", "", "", "only consider VirtualServices bound to this gateway")
cmd.Flags().StringVarP(&rootCmd.ConfigDir, "config-dir", "c", "", "directory containing Istio VirtualService and Gateway configs")
cmd.Flags().StringVarP(&rootCmd.TestDir, "test-dir", "t", "", "directory containing old format tests")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still the old format?

Copy link
Collaborator Author

@cainelli cainelli Jul 10, 2024

Choose a reason for hiding this comment

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

I consolidated to a single test-dir flag and control if is Envoy or istio-config-validator format through a hidden --convert-tests.

if err := c.prepareRoutes(ctx, routeFile); err != nil {
return fmt.Errorf("failed to prepare routes: %w", err)
if err := c.prepareEnvoyTests(ctx); err != nil {
return fmt.Errorf("failed to prepare tests: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to specify envoy tests here, as the error is the same on l88

cainelli added 2 commits July 10, 2024 19:29
Signed-off-by: Fernando Cainelli <[email protected]>
@cainelli cainelli merged commit c4d85fe into main Jul 11, 2024
5 checks passed
@cainelli cainelli deleted the conver-tests branch July 11, 2024 11:27
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