Describe the feature
When using provider: gatewayapi:v1, Flagger auto-creates HTTPRoutes for canary traffic splitting. Currently there's no way to attach Gateway API filters to these auto-created HTTPRoutes — most importantly ExtensionRef filters that reference implementation-specific resources (e.g. NGINX Gateway Fabric's SnippetsFilter).
ExtensionRef support is the most critical gap — it's the Gateway API mechanism for implementation-specific behavior that has no equivalent in the Canary spec. Other filter types (RequestHeaderModifier, RequestRedirect, etc.) have partial equivalents via headers, rewrite, etc., but ExtensionRef has none.
This is a blocker for migrating canaries from provider: nginx (Ingress-based) to provider: gatewayapi:v1 when routes require implementation-specific behavior like auth subrequests, custom headers, or CORS that can't be expressed through the existing Canary spec fields.
Proposed solution
Add an optional filters field to the Canary service spec that gets propagated to the auto-created HTTPRoute rules:
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: my-app
spec:
provider: "gatewayapi:v1"
service:
gatewayRefs:
- name: my-gateway
namespace: gateway-ns
filters:
- type: ExtensionRef
extensionRef:
group: gateway.nginx.org
kind: SnippetsFilter
name: my-auth-filter
This would allow the generated HTTPRoute rules to include these filters alongside Flagger's traffic-splitting backendRefs.
Use case
We're migrating from Ingress-based canaries (provider: nginx) to Gateway API (provider: gatewayapi:v1) with NGINX Gateway Fabric. Our Ingress routes use auth_request annotations for authentication subrequests. With Gateway API, this is handled via SnippetsFilter resources attached as ExtensionRef on HTTPRoute rules.
Since Flagger's auto-created HTTPRoute has no filters, the canary route has no authentication — which is a security concern. The current workaround is applying auth at the gateway listener level (via SnippetsPolicy), but this is coarse-grained and not always appropriate.
Alternatives considered
- SnippetsPolicy at listener level: Works but applies auth to ALL routes on the listener, requiring
auth_request off overrides on routes that shouldn't have auth. Not ideal when multiple services with different auth requirements share a listener.
- Manually patching Flagger's auto-created HTTPRoute: Flagger overwrites it on every reconciliation.
Environment
- Flagger version: 1.40.0
- Gateway API provider:
gatewayapi:v1
- Gateway implementation: NGINX Gateway Fabric
Describe the feature
When using
provider: gatewayapi:v1, Flagger auto-creates HTTPRoutes for canary traffic splitting. Currently there's no way to attach Gateway API filters to these auto-created HTTPRoutes — most importantlyExtensionReffilters that reference implementation-specific resources (e.g. NGINX Gateway Fabric'sSnippetsFilter).ExtensionRefsupport is the most critical gap — it's the Gateway API mechanism for implementation-specific behavior that has no equivalent in the Canary spec. Other filter types (RequestHeaderModifier,RequestRedirect, etc.) have partial equivalents viaheaders,rewrite, etc., butExtensionRefhas none.This is a blocker for migrating canaries from
provider: nginx(Ingress-based) toprovider: gatewayapi:v1when routes require implementation-specific behavior like auth subrequests, custom headers, or CORS that can't be expressed through the existing Canary spec fields.Proposed solution
Add an optional
filtersfield to the Canary service spec that gets propagated to the auto-created HTTPRoute rules:This would allow the generated HTTPRoute rules to include these filters alongside Flagger's traffic-splitting backendRefs.
Use case
We're migrating from Ingress-based canaries (
provider: nginx) to Gateway API (provider: gatewayapi:v1) with NGINX Gateway Fabric. Our Ingress routes useauth_requestannotations for authentication subrequests. With Gateway API, this is handled viaSnippetsFilterresources attached asExtensionRefon HTTPRoute rules.Since Flagger's auto-created HTTPRoute has no filters, the canary route has no authentication — which is a security concern. The current workaround is applying auth at the gateway listener level (via
SnippetsPolicy), but this is coarse-grained and not always appropriate.Alternatives considered
auth_request offoverrides on routes that shouldn't have auth. Not ideal when multiple services with different auth requirements share a listener.Environment
gatewayapi:v1