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

Avoid updating connector status again and again when Connect is scaled to 0 #9945

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Apr 10, 2024

Type of change

  • Bugfix

Description

When Kafka Connect is scaled to 0, we keep updating the status of its connectors again and again. This is because a different status is set by the KafkaConnect reconciliation based on the time and by the KafkaConnector watch. So the timer updates the connector status, that triggers the watch which updates it again. And next periodic reconciliation, the same repeats.

This PR updates the status update method used to set the zero replicas status in the connector watch to set the same status as the periodical reconciliation does and that way, the status is updated only once. It also removed the default empty list for the used topics and uses null instead when we actually cannot get the real list of topics.

Checklist

  • Make sure all tests pass
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally

Signed-off-by: Jakub Scholz <www@scholzj.com>
@scholzj scholzj added this to the 0.41.0 milestone Apr 10, 2024
@scholzj scholzj requested a review from ppatierno April 10, 2024 21:54
@scholzj
Copy link
Member Author

scholzj commented Apr 10, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@see-quick see-quick left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@scholzj scholzj merged commit d39f91e into strimzi:main Apr 12, 2024
21 checks passed
@scholzj scholzj deleted the avoid-updating-connector-statuses-again-and-again-when-connect-is-scaled-to-0 branch April 12, 2024 08:22
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.

None yet

3 participants