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

Feature Request: Support Custom BackendRef for Primary and Canary Services #1741

Open
kahirokunn opened this issue Dec 12, 2024 · 0 comments

Comments

@kahirokunn
Copy link
Contributor

kahirokunn commented Dec 12, 2024

Problem Statement

Currently, Flagger automatically generates backend references for primary and canary services based on the service names. However, in complex deployment scenarios, teams often need to:

  • Insert intermediate proxies for security requirements
  • Add service-specific monitoring
  • Implement circuit breakers
  • Route through different mesh configurations
  • Apply different filtering rules for primary and canary traffic

This limitation makes it difficult to implement advanced deployment patterns where primary and canary services need different routing configurations or must be routed through different intermediary services.

Proposed Solution

Extend the CanaryService spec to allow custom backend references for both primary and canary services. This would allow users to:

  • Specify custom backend services/configurations for both primary and canary traffic
  • Define service-specific filters
  • Configure different routing paths for primary and canary deployments
  • Maintain existing automatic backend reference generation as default behavior

Technical Details

Add a new backendRef and filters to spec.service.canary and spec.service.primary:

service:
  primary:
    backendRef: #new
      name: primary-proxy
      namespace: monitoring
    filters: #new
      - type: RequestHeaderModifier
        requestHeaderModifier:
          set:
            - name: x-route
              value: primary
  canary:
    backendRef: #new
      name: canary-proxy
      namespace: monitoring
    filters: #new
      - type: RequestHeaderModifier
        requestHeaderModifier:
          set:
            - name: x-route
              value: canary

Benefits

  • Enhanced flexibility for complex deployment scenarios
  • Better support for security and monitoring requirements
  • Improved control over traffic routing
  • Easier integration with existing infrastructure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant