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 BackendRefs for Primary and Canary with Proxy Integration #1738

Closed
kahirokunn opened this issue Dec 11, 2024 · 1 comment

Comments

@kahirokunn
Copy link
Contributor

Describe the feature

Currently, Flagger's backendRefs only support referencing the services generated for the primary and canary Deployments. This restriction prevents users from introducing intermediate proxies or other custom routing solutions between the generated resources.

What problem are you trying to solve?

In some architectures, it is beneficial to route traffic through an intermediate proxy or other service before reaching the primary or canary Deployments. For instance, this enables advanced traffic manipulation, observability, or security mechanisms that cannot be implemented directly in Flagger's current design. Additionally, having the ability to define separate proxies for the primary and canary stages allows for more granular control over traffic routing and monitoring, which is crucial for certain deployment strategies. Without the ability to customize backendRefs, users are forced to work around this limitation by creating separate controllers or manually modifying resources, which is inefficient and error-prone.

Proposed solution

Allow the backendRefs for both the primary and canary stages to be configurable, enabling users to define their own services or intermediate proxies independently for each stage. This could involve extending the Canary CRD to accept custom backendRefs for both primary and canary stages.

For example:

spec:
  gateway:
    backendRefs:
      primary:
        - name: primary-proxy
          namespace: primary
          port: 8080
      canary:
        - name: canary-proxy
          namespace: canary
          port: 8081

Benefits

  • Enables traffic routing through intermediate proxies for advanced use cases.
  • Supports independent configurations for primary and canary stages, allowing for greater flexibility.
  • Provides flexibility to integrate with existing infrastructure, such as observability or security services.
  • Simplifies the setup by reducing the need for additional tooling or manual intervention.

Drawbacks

  • Adds complexity to the Canary CRD and its reconciliation logic.
  • Might require more advanced configuration by users, increasing the learning curve.

Any alternatives you've considered?

  1. Manual modification of backendRefs: Users can manually edit the generated resources, but these changes will be overwritten during reconciliation.
  2. Custom controllers: A custom controller can be used to patch the backendRefs, but this adds operational overhead and complexity.
  3. Pre-defined proxies: Use predefined proxies for all deployments, but this reduces flexibility and might not meet specific requirements.

Allowing customizable backendRefs directly in Flagger would provide a streamlined and user-friendly solution for managing complex traffic routing scenarios.

@kahirokunn kahirokunn changed the title Support Custom BackendRefs for Primary and Canary with Proxy Integration Feature Request: Support Custom BackendRefs for Primary and Canary with Proxy Integration Dec 11, 2024
@kahirokunn
Copy link
Contributor Author

move to #1741

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