envoyproxy / envoyproxy/gateway
feat: optional cluster-wide default for BackendTrafficPolicy mergeType
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Description*:
`BackendTrafficPolicy.spec.mergeType` decides whether a more specific policy merges with a less
specific one or replaces it. When it is unset, the more specific policy replaces, which is easy to
miss for teams that keep policies at several scopes (a baseline plus route-level overrides).
It would help to let an operator set a cluster-wide default `mergeType` for policies that don't
specify one. The behavior should be optional and off by default, leave an explicitly set `mergeType`
untouched, allow opting out per resource via a label, skip the control-plane namespace, and never
block writes if the control plane is unavailable.
A possible shape on the EnvoyGateway config:
```yaml
backendTrafficPolicy:
mutation:
enabled: true # default: false
defaultMergeType: StrategicMerge # StrategicMerge | JSONMerge
excludeLabel: gateway.envoyproxy.io/skip-merge-mutation
```
I have a working implementation (a CREATE-only mutating webhook, following the topology-injector
pattern) and am happy to contribute it. I am also open to doing the defaulting at translation time
instead of a webhook if that fits the project better. Glad to settle the approach before opening a
PR.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the topology-injector pattern and the existing EnvoyGateway configuration and BackendTrafficPolicy translation paths. Decide between the proposed CREATE-only mutating webhook and translation-time defaulting, then verify opt-in behavior, explicit values, per-resource exclusion, control-plane namespace handling, and non-blocking writes when the control plane is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- api, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100