Kuadrant / kuadrant-operator

The Operator to install and manage the lifecycle of the Kuadrant components deployments.
Apache License 2.0
37 stars 33 forks source link

Simplify geo and weighted options in DNSPolicy #855

Closed maleck13 closed 1 month ago

maleck13 commented 2 months ago

What

In the past we worked with OCM which brought the idea of a hub cluster and multiple views of the same gateway. We no longer support OCM but some of that legacy has remained in our API we should simplify this to reflect a policy can only target one gateway and even if it could target multiple they would be in the same cluster.

Currently we have

  loadBalancing:
    weighted:
      defaultWeight: 120
      custom: # <--- New Custom Weights being added
        - weight: 255
          selector:
            matchLabels:
              kuadrant.io/lb-attribute-custom-weight: AWS
    geo: 
      defaultGeo: US #catch all geo         

we then have to set attributes on the gateway in the form of annotations to set these custom weights. This no longer makes sense.

Proposed change is to have the values set directly on the policy and indicated if geo is a default or not

  loadBalancing: # each of these values would be required.
    weight: 100
    geo: U.S
    defaultGEO: true #indicates whether to use this as a the wilcard / catchall geo
maleck13 commented 2 months ago

@mikenairn any additionl thoughts here? If not I can look at putting together and RFC would ideally like this to happen before v1 @philbrookes @maksymvavilov

maleck13 commented 2 months ago

@trepel @azgabur This is an important up-coming change we are going to prioritise.

guicassolato commented 2 months ago

@maleck13, do we want this change into v1alpha2, therefore also automatically in v1, of the DNSPolicy API (targeting Kuadrant v1)?

maleck13 commented 2 months ago

yes