Table of Contents |
---|
Status
Current state: Accepted
Under Discussion thread: here
Discussion Voting thread: here
JIRA: KAFKA-15445
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
- Secrets will be provided to the container using folder mount.
- If a property is provided both in the mounted file and as an environment variable, the value from the environment variable will take precedence.
Code changes
- We are introducing a Docker wrapper into the Kafka codebase. This wrapper will encapsulate the logic required to set up property files, adhering to the rules outlined in the previous section.
- This Docker wrapper will be supported by bash scripts, which will be situated within the Docker container. These scripts will serve as the entry point for the Docker image, streamlining the process.
- Previously, we utilized Golang for the setup of the property files. However, once the Docker wrapper changes are integrated, the Golang code will be removed. This change will eliminate the need for maintaining support for an additional language in the codebase, reducing overhead.
NOTE:
- Having the logic to configure property files in the kafka codebase, means that there will be a dependency on the kafka binary tarball that is containerised inside the docker image.
- Hence, previous versions of kafka which do not contain this Docker wrapper will not be supported for Docker image generation.
Class Data Sharing(CDS)
We did a small POC with class data sharing (CDS) feature that can help reduce the startup time and memory footprints for Java applications.
...
- Docker Image Size: Adding the jsa files will increase the size of the Docker image. Classes stored in the CDS are a few times (e.g., 2 – 5x) larger than classes stored in JAR files
- Choosing Application Usage for JSA: For our POC, we focused on Kafka startup using default configurations. It's crucial to decide how broadly the application should be used to generate jsa files.
- Startup Memory Footprint: While we did observe a reduction in startup memory footprint, we believe this difference may not significantly scale with production load.
- CDS Archive Exclusions: The CDS archive doesn't include pre-JDK 6 classes, which are present in our codebase.
- Limitations of CDS:
- The OpenJDK version used for building the jsa files and during runtime must be the same. If they are not, application wont fail but the expected optimisation won't be achieved.
- If a custom JAR is provided by the user, it's currently prepended to the existing classpath. However, CDS requires that the classpath used during jsa file generation should either be the same or a prefix of the classpath used during runtime. Otherwise, it will be disabled, and the expected optimisation won't be achieved.
...
- RM would have generated and pushed Apache Kafka's Release Candidate artifacts to apache sftp server hosted in home.apache.org by release.py script
- Run the script automation to build the docker image(using the above Release Candidate tarball URL) and test the image locally.
The docker image needs to be pushed to some Dockerhub repo(eg. Release Manager's) for the evaluation of RC Docker image.
Start the Voting for RC, which will include the Docker image as well as docker sanity tests report.
In case any docker image specific issue is detected, that will be evaluated by the community, if it’s a release blocker or not.
Once the vote passes, the image will be pushed to
apache/kafka
with the version as tag.Steps for the Docker image release will be included in the Release Process doc of Apache Kafka
- eg. for AK release 3.7.0 and image released will be
apache/kafka:3.7.0
(=> image contains AK 3.7.0)
...