Skip to content

[FLINK-38577] Added BlueGreen active deployment ingress #1049

Merged
gyfora merged 2 commits intoapache:mainfrom
Shopify:dr.bg-ingress
Feb 2, 2026
Merged

[FLINK-38577] Added BlueGreen active deployment ingress #1049
gyfora merged 2 commits intoapache:mainfrom
Shopify:dr.bg-ingress

Conversation

@drossos
Copy link
Contributor

@drossos drossos commented Jan 9, 2026

[FLINK-38577] FlinkBlueGreenDeployment Stable Ingress

What is the purpose of the change

Adds parent-level ingress support to FlinkBlueGreenDeployment, enabling users to specify ingress configuration at the BlueGreen deployment level rather than only at the child FlinkDeployment level. The ingress automatically switches between Blue and Green deployments during transitions and can be updated independently without triggering a full blue-green transition.

Brief change log

  • Added ingress field to FlinkBlueGreenDeploymentSpec API

  • Modified Blue and Green deployments ingress names and routes to be preappended with Blue|Green

  • Implemented reconcileBlueGreenIngress() in IngressUtils for BlueGreen-specific ingress management

  • Added ingress secondary resource registration in FlinkBlueGreenDeploymentController.prepareEventSources()

  • Implemented reconcileIngressForActiveDeployment() in BlueGreenDeploymentService for immediate ingress updates in ACTIVE states

  • Updated ActiveStateHandler to reconcile ingress during normal reconciliation loops

  • Added exception handling around ingress reconciliation during finalization

  • Refactored IngressUtils.getIngress() to accept IngressSpec instead of FlinkDeploymentSpec for code reuse

  • Updated CRD schema to include ingress specification

    Verifying this change

    This change added tests and can be verified as follows:

    Unit Tests:

    • verifyIngressSwitchesDuringTransition
    • verifyIngressCreatedOnlyWhenConfigured

    E2E Test:

    • test_bluegreen_ingress_rotation.sh

    Also tested on remote K8s cluster with the following scenarios:

    • FlinkBlueGreenDeployment with parent-level ingress configuration
    • Ingress updates without triggering blue-green transitions
    • Ingress removal and re-addition
    • Multiple blue-green transitions with ingress present

    Does this pull request potentially affect one of the following parts:

    • Dependencies (does it add or upgrade a dependency): no
    • The public API, i.e., is any changes to the CustomResourceDescriptors: yes - adds optional ingress field to FlinkBlueGreenDeploymentSpec
    • Core observer or reconciler logic that is regularly executed: yes - adds ingress reconciliation to ActiveStateHandler and finalizeBlueGreenDeployment

    Documentation

    • Does this pull request introduce a new feature? yes
    • If yes, how is the feature documented?
      • API reference documentation updated in docs/content/docs/custom-resource/reference.md
      • CRD schema includes full ingress specification with properties documented
      • E2E test includes comprehensive comments explaining the feature
      • Javadoc added to new methods explaining when and how they're used

@drossos drossos marked this pull request as ready for review January 19, 2026 21:18
@gyfora
Copy link
Contributor

gyfora commented Jan 30, 2026

please rebase on the latest main, then we can merge this

…c + resolve path conflict on Blue and Green deployment ingresses
@drossos
Copy link
Contributor Author

drossos commented Feb 2, 2026

Resolved conflicts

@gyfora gyfora merged commit a31aeac into apache:main Feb 2, 2026
118 checks passed
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

Successfully merging this pull request may close these issues.

3 participants