-
Notifications
You must be signed in to change notification settings - Fork 708
Closed
Labels
Milestone
Description
Description:
When using mergeType in a BackendTrafficPolicy to merge an HTTPRoute BackendTrafficPolicy object to a policy that is attached to a Gateway object there doesn't seem to be any way to patch out a field that is set on the parent BackendTrafficPolicy with the child policy.
For example if I create the following YAML blocks:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: foo-gateway-wide-policy
namespace: kube-system
spec:
compression:
- type: Gzip
targetRef:
group: gateway.networking.k8s.io
kind: Gateway
name: foo-gateway
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: bar-public
namespace: bar-service
spec:
hostnames:
- bar.foo
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: foo-gateway
namespace: kube-system
sectionName: https
rules:
# ... rules ... #
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
name: bar-backendpolicy
namespace: bar-service
spec:
compression: []
mergeType: StrategicMerge # can also be JSONMerge
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: bar-publicExpected behavior:
Traffic going through the bar.foo httproute should not have compression enabled, per the bar-backendpolicy BackendTrafficPolicy specs.
Actual behavior:
Traffic going through the bar.foo httproute has compression enabled as set by the foo-gateway-wide-policy BackendTrafficPolicy specs.
Relates to #6143
Reactions are currently unavailable