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

Revisit GatewayParameters merge logic #10038

Open
jenshu opened this issue Sep 13, 2024 · 0 comments
Open

Revisit GatewayParameters merge logic #10038

jenshu opened this issue Sep 13, 2024 · 0 comments
Labels
Area: Gloo Gateway Issues related to the Gloo Gateway project Area: K8S Gateway API Issues related to the Kubernetes Gateway API Type: Enhancement New feature or request Type: Tech Debt

Comments

@jenshu
Copy link
Contributor

jenshu commented Sep 13, 2024

Do you have a suggestion for code improvement or tracking existing technical debt? Please describe.

Currently we get the GatewayParameters for a Gateway by doing a deep merge of the default gwp with the Gateway-specific gwp. This includes merging maps by combining all entries in src/dst, and merging slices by appending src and dst. When a slice/map field is set in both the default and Gateway-specific gwp, there is no way for the Gateway-specific one to completely override the default one.

Describe the solution you'd like

A few possible options are:

  • provide a flag that the user can set which determines which merge strategy to use (e.g. deep/shallow merge). We already do something like this in our helm chart. We would need to decide whether this can be set globally or per-Gateway or per-field (which might get messy)
  • default to overwriting instead of merging - i think this is safer/more flexible than the current behavior, because if you still wanted to carry over values from default gwp you could just copy over those values into the gw-specific gwp field
  • custom merge logic for each specific field in gwp (i.e. do either deep or shallow merge on a case-by-case basis) - this would be hard to maintain, and users may want different merge behavior than what we've implemented

Additional Context

recent PR comment

┆Issue is synchronized with this Asana task by Unito

@jenshu jenshu added Type: Tech Debt Type: Enhancement New feature or request Area: Gloo Gateway Issues related to the Gloo Gateway project Area: K8S Gateway API Issues related to the Kubernetes Gateway API labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Gloo Gateway Issues related to the Gloo Gateway project Area: K8S Gateway API Issues related to the Kubernetes Gateway API Type: Enhancement New feature or request Type: Tech Debt
Projects
None yet
Development

No branches or pull requests

1 participant