This proposal suggests reducing Strimzi test-client's images.
Test-clients repository contains 2 HTTP - producer & consumer - and 4 Kafka - producer, consumer, admin & streams - clients.
For each client we are building separate image.
Kafka clients are then build for each supported Kafka version, which are specified in kafka.version
file.
That means we can end up with 10 images for a release, when we are supporting 2 Kafka versions.
Image base is same for all the clients, only difference is used jar
.
During releases of test-clients, we found few difficulties with current implementation.
The dependencies are mostly the same for all the clients.
After we added support for new architectures (ppc64le
, s390x
, arm64
), the whole build process became chaotic.
At the same time, in our systemtest
module, we need to specify image for each client.
Client's code bases will remain the same as they are. The image build process will be different. Both HTTP and Kafka clients will be inside one image.
/opt/test-clients
- base folder for test-clients/opt/test-clients/bin
- scripts for running each client- f.e:
http_producer_run.sh
- scripts will contain correct classpath, Java options and path to main class
- f.e:
/opt/test-clients/lib
- all needed dependencies for running the clients
The approach will be similar to the operator
's image inside Strimzi.
Current pattern:
quay.io/strimzi-test-clients/test-client-kafka-{client-type}:{version}-kafka-{kafka-version}
quay.io/strimzi-test-clients/test-client-http-{client-type}:{version}
will be changed to quay.io/strimzi-test-clients/test-clients:{version}-kafka-{kafka-version}
.
- Environment variables will be reduced
TEST_PRODUCER_IMAGE
,TEST_CONSUMER_IMAGE
and other environment variables will be removedTEST_CLIENT_IMAGE
will be added
- Container configuration of each client will contain
args
section with appropriate*_run.sh
args: - /opt/test-clients/bin/http_producer_run.sh
- One image instead of six (for one Kafka version)
- Easier and clearer building system
- Simple usage in STs
Test-clients repository and systemtest
module in operators repository.
There are no rejected alternatives at the moment.