Skip to content

[FLINK-37193] Feature flag if operator should manage ingress#1018

Merged
gyfora merged 4 commits into
apache:mainfrom
csviri:ingress-feature-switch
Aug 25, 2025
Merged

[FLINK-37193] Feature flag if operator should manage ingress#1018
gyfora merged 4 commits into
apache:mainfrom
csviri:ingress-feature-switch

Conversation

@csviri
Copy link
Copy Markdown
Contributor

@csviri csviri commented Aug 22, 2025

What is the purpose of the change

This change adds a feature flag to set if the controller should manage the ingress. If set to false controller won't register the related InformerEventSource, and won't create ingress even if set in the spec.

Brief change log

  • adds feature flag as described above and related tests

Verifying this change

This change added tests and can be verified as follows:

  • Added unit tests for the non-trivial logic

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: no
  • Core observer or reconciler logic that is regularly executed: yes

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? JavaDocs

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri requested a review from gyfora August 22, 2025 12:26
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
EventRecorder eventRecorder) {
if (!ctx.getOperatorConfig().isManageIngress()) {
if (spec.getIngress() != null) {
log.warn(INGRESS_MANAGEMENT_OFF_BUT_SPEC_SET);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to both log and trigger the event as events are already logged. Logging can be removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed log, thx!

Copy link
Copy Markdown
Contributor

@gyfora gyfora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from the minor comment related to redundant logging, looks good

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@gyfora gyfora merged commit 9c49fb2 into apache:main Aug 25, 2025
331 of 349 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.

2 participants