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

[ST] Improve the way to configure custom HTTP bridge image for Helm Charts system tests #11066

Open
ppatierno opened this issue Jan 22, 2025 · 1 comment

Comments

@ppatierno
Copy link
Member

While working on this PR #11032, which has changes on the operator but also need a new bridge (not released yet), I needed to run the system tests by using a custom bridge image.
For mostly all of them I needed to specify the bridge image within the .azure/templates/steps/system_test_general.yaml file by setting something like:

BRIDGE_IMAGE: "quay.io/ppatierno/kafka-bridge:bridge-config"

For the Helm Charts tests (from the HelmChartST class) I actually needed two changes.
One for running the right operator by modifying its info here https://github.com/strimzi/strimzi-kafka-operator/blob/main/packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml#L15 like:

image:
  registry: "quay.io"
  repository: "ppatierno"
  name: operator
  tag: "bridge-config"

and then hard-coding the bridge image data here https://github.com/strimzi/strimzi-kafka-operator/blob/main/systemtest/src/main/java/io/strimzi/systemtest/resources/operator/specific/HelmResource.java#L59 like:

values.put("kafkaBridge.image.repository", "ppatierno");
...
values.put("kafkaBridge.image.tag", "bridge-config");

Usually, for the operator there is no need to make any changes, because the STs are getting the image from the PR build while for Helm Charts STs you need to tweak the values.yaml as above.
For the bridge image it's worse because you need to hard-code stuff into the HelmResource class.
It would be useful to simplify and improve the configurability of Helm Charts STs.

@ppatierno
Copy link
Member Author

It turned out these changes for Helm Charts are also not enough.
The build would fail in the pipeline with following error related to a naming check:

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

@im-konge im-konge self-assigned this Jan 22, 2025
@scholzj scholzj changed the title Improve the way to configure custom HTTP bridge image for Helm Charts system tests [ST] Improve the way to configure custom HTTP bridge image for Helm Charts system tests Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants