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

Moved bridge configuration setup within the operator #11032

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

ppatierno
Copy link
Member

@ppatierno ppatierno commented Jan 14, 2025

Type of change

  • Refactoring

Description

This PR fixes #10959 by moving the configuration of the bridge to be generated by the operator within a ConfigMap (actually using the same one that today is used for the metrics and logging configuratio, but with a different entry in the data section) then mounted on the bridge pod and loaded from there.

NOTE: the temporary change in the .azure/templates/steps/system_test_general.yaml file is for using a custom bridge image which doesn't use its script to generate the configuration anymore. Of course the commit to the file will be reverted before merging the PR. It's there for running STs.

Checklist

  • Write tests
  • Make sure all tests pass
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md

@ppatierno ppatierno added this to the 0.46.0 milestone Jan 14, 2025
@ppatierno
Copy link
Member Author

ppatierno commented Jan 14, 2025

This PR comes together with strimzi/strimzi-kafka-bridge#963
I guess the bridge PR should be merged first, and the bridge 0.32.0 released.
After that we can update this PR by setting the new bridge release as well and removing the temporary change in the mentioned azure/templates/steps/system_test_general.yaml to use the right bridge.

@see-quick
Copy link
Member

/azp run bridge

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@strimzi strimzi deleted a comment from see-quick Jan 15, 2025
@strimzi strimzi deleted a comment from azure-pipelines bot Jan 15, 2025
@ppatierno
Copy link
Member Author

/azp run bridge

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno ppatierno force-pushed the bridge-config-via-configmap branch from 76c9c35 to d889705 Compare January 15, 2025 16:32
@ppatierno ppatierno marked this pull request as ready for review January 15, 2025 16:42
@ppatierno
Copy link
Member Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno ppatierno requested a review from scholzj January 15, 2025 16:44
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

i made just a quick pass ... but left bunch of comments.

Copy link
Contributor

@tinaselenge tinaselenge 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 :)

Copy link
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

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

There are a couple of test failures, but the overall approach LGTM.

I also left a minor comment. Thanks.

CHANGELOG.md Show resolved Hide resolved
@ppatierno
Copy link
Member Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno ppatierno force-pushed the bridge-config-via-configmap branch 2 times, most recently from 1c964e1 to de427e5 Compare January 21, 2025 13:57
@ppatierno
Copy link
Member Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno
Copy link
Member Author

@scholzj I think I addressed all your comments.
Regarding the changes you see on the values.yaml and HelmResource.java, they are temporary for running the STs and allowing to bring the right operator and bridge for the Helm Charts one. I also opened an issue about that #11066
Of course these changes will be reverted before merging the PR.

@ppatierno
Copy link
Member Author

ppatierno commented Jan 22, 2025

actually it was worse. With the above changes I was able to run HelmCharts system tests locally but now the build is failing because of some checks we do on the naming:

FAIL  strimzi operator deployment	strimzi-kafka-operator/tests/operator_deployment_test.yaml
	- should have latest image with default image registry when no image is provided

		- asserts[1] `matchRegex` fail
			Template:	strimzi-kafka-operator/templates/060-Deployment-strimzi-cluster-operator.yaml
			DocumentIndex:	0
			Path:	spec.template.spec.containers[0].image
			Expected to match:
				quay.io/strimzi/operator:(latest|[0-9]+\.[0-9]+\.[0-9]+)
			Actual:
				quay.io/ppatierno/operator:bridge-config

Tbh, there are too many changes to make for having all regression STs running as they are now. What should we do? @scholzj @im-konge ideas?
Should I revert back these changes and live with a failing Helm Charts system test until the bridge release?

[UPDATE]
I did that to make the build passing. We'll have one regression test (related to Helm Charts) failing for sure.

@ppatierno
Copy link
Member Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno
Copy link
Member Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ppatierno
Copy link
Member Author

So as mentioned on the related bridge PR strimzi/strimzi-kafka-bridge#963, I made a change on the bridge.version to set "latest" and run make bridge_version and then push the changes.
This way all the needed deployment files were updated for running the STs and they are all green. Of course, we have to revert this change as soon as we have a bridge 0.32.0 release. I will open an issue for that when this PR is merged.
@scholzj would you mind to have another pass and checking if everything looks fine to you now?

Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

One nit for the CHANGELOG. LGTM otherwise.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Paolo Patierno <[email protected]>

Reverted back original operator Deployment
Set different bridge image for STs

Signed-off-by: Paolo Patierno <[email protected]>

Fixed missing env vars to setup the truststore

Signed-off-by: Paolo Patierno <[email protected]>

Removed ST using env vars not in place anymore

Signed-off-by: Paolo Patierno <[email protected]>

Fixed checkstyle errors

Signed-off-by: Paolo Patierno <[email protected]>

CHANGELOG update

Signed-off-by: Paolo Patierno <[email protected]>

Fixed updated systemtests bridge MD

Signed-off-by: Paolo Patierno <[email protected]>

Fixed scholzj comments

Signed-off-by: Paolo Patierno <[email protected]>

Factored out a dedicated withConfigProviders method for the bridge
configuration builder
Refactored bridge configuration builder to use isEquivalent

Signed-off-by: Paolo Patierno <[email protected]>

Fixed tinaselenge comments

Signed-off-by: Paolo Patierno <[email protected]>

Fixed checkstyle issues

Signed-off-by: Paolo Patierno <[email protected]>

Fixed rolling bridge pod on configuration change

Signed-off-by: Paolo Patierno <[email protected]>

Fixed scholzj and tinaselenge feedback

Signed-off-by: Paolo Patierno <[email protected]>

Fixed KafkaBridgeAssemblyOperator tests about the missing new hash annotation

Signed-off-by: Paolo Patierno <[email protected]>

Reverted back some deleted tests

Signed-off-by: Paolo Patierno <[email protected]>

Adapted system tests to changes in configuration

Signed-off-by: Paolo Patierno <[email protected]>

Fixed scholzj and fvaleri feedback

Signed-off-by: Paolo Patierno <[email protected]>
Temporary charts related changes to run STs

Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
@ppatierno ppatierno force-pushed the bridge-config-via-configmap branch from 99a0d55 to 90427e7 Compare January 24, 2025 07:27
@ppatierno ppatierno merged commit 984f294 into strimzi:main Jan 24, 2025
13 checks passed
@ppatierno ppatierno deleted the bridge-config-via-configmap branch January 24, 2025 08:44
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.

Move Bridge configuration preparation from the shell scripts to the operator
6 participants