Kuadrant / testsuite

3 stars 12 forks source link

Add test for basic load balancing (Round Robin) to multicluster tests #495

Closed trepel closed 1 day ago

trepel commented 1 month ago

Summary

Add test for basic load balancing (Round Robin) to multicluster tests.

Documentation

Additional context

It is multicluster test, so at least two clusters are required. Start with DNS on AWS (Route 53).

On each cluster

Success Criteria

Follow ups

As part of working on this one can also implement (or create a follow up issues for):

averevki commented 1 month ago

@trepel Simple and basic strategies refer to the same test that you are linking here, as far as I understand. The issue that we have with the existing test is it doesn't return addresses in round robin in kubernetes pod, so it can't run in nightlies successfully. This is the problem with kubernetes resolver(caching?) or maybe python dns library

trepel commented 1 month ago

@averevki Not sure if I follow. When I said "simple routing strategy" I meant having .spec.routingStrategy: simple in DNSPolicy. This is what we currently have covered by that test_multicluster_dns test. When I said basic loadbalancing I meant:

spec:
  routingStrategy: loadbalanced
  loadBalancing:
    weighted:
      defaultWeight: 10

which effectively produces Round Robin.

Now I don't understand this fully but I think that only one IP should be returned (not a list) if using having Round Robin configured. If this is indeed the case we can create a test for that if for nothing else.

What we can also do is to check the generated DNS records in cloud provider directly. This would require test suite to have access to cloud provider (AWS likely to be the one) and to configure the DNS stuff properly.

We can keep generating requests for X (not sure for how many) minutes and validating that both clusters were used for handling at least 1 of the generated requests.