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

Improve the UX for setting custom weight selectors in the DNSPolicy create page #60

Closed
david-martin opened this issue Sep 11, 2024 · 0 comments

Comments

@david-martin
Copy link
Contributor

When the routing strategy is changed from Simple to Load Balanced, the loadBalancing.geo and loadBalancing.weighted fields become required.
In the UI, when you change from Simple routing strategy to Load Balanced, it looks like:

image

A custom weight selector is then needed, set on the loadBalancing.weighted.custom key.
When you click the 'Add Custom Weight Selector' button, new fields are shown like this:

image

You need to add 1 or more matchLabels or matchExpressions. (at least 1 of either, but can mix and match).
When you click 'Add Match Label', it looks like this:

image

You can modify it, remove it, or add more.
These end up looking like this in yaml:

spec:
  loadBalancing:
    geo:
      defaultGeo: eu
    weighted:
      custom:
        - selector:
            matchLabels:
              key-1: value1
              key-2: value2

When you click 'Add Match Expression', it looks like this:

image

You can modify the key, operator and value. You can also add more values.
If you set the operator to 'Exists' or 'NotExists', the values are removed.
Here's what it might look like in yaml:

spec:
  loadBalancing:
    geo:
      defaultGeo: eu
    weighted:
      custom:
        - selector:
            matchExpressions:
              - key: test
                operator: In
                values:
                  - val1
                  - val2

Things can get a little confusing as you add more match labels and match expressions. Here's with 2 of either:

image

Functionally, it allows you to build up what's possible in the CRD spec.
However, there's definitely improvements to the layout (like grouping with labelled boxes, and limiting the width of fields and boxes) that would make for a better overall UX in this complex part of the view.

@david-martin david-martin mentioned this issue Sep 11, 2024
8 tasks
@R-Lawton R-Lawton closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants