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

[Do not review] [WIP] Test PR for testing junit dependency fix. #224

Open
wants to merge 94 commits into
base: 7.4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2b02fea
Bump Confluent to 7.5.0-0, Kafka to 7.5.0-0
ConfluentJenkins Jan 25, 2023
61ba189
Merge branch '7.4.x'
gracechensd Feb 23, 2023
fad798c
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 23, 2023
49eced2
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
3ce7caa
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
921ceb8
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
9a8b6fa
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
321ab94
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
62dcf0e
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
e6822c5
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
53d7e5e
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 24, 2023
9b00429
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
18d9273
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
719f5cd
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
3c95f4d
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
1fe903a
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
1eac7c5
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 25, 2023
9e5dbdc
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
189f5d1
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
501a4b7
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
8104291
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
db14cc2
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
73b6cca
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
fda1757
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
c890a9c
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Feb 26, 2023
4b09f43
Merge branch '7.4.x' into master by gracechensd
ConfluentJenkins Mar 1, 2023
aa10c63
Merge branch '7.4.x' into master by gracechensd
ConfluentJenkins Mar 16, 2023
8a6a1ee
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Mar 29, 2023
26f193a
Merge branch '7.4.x' into master by stejani-cflt
ConfluentJenkins Mar 29, 2023
20abe5f
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Mar 30, 2023
10dd117
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Mar 30, 2023
a6204e6
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Mar 31, 2023
5d283d6
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Mar 31, 2023
f8fffe9
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 3, 2023
c314051
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 4, 2023
704b50f
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 5, 2023
4a2287d
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 6, 2023
ee52136
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 6, 2023
8d1090b
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 6, 2023
400cf76
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 6, 2023
e4c5578
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 6, 2023
7cfd414
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
b3066e1
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
1abc519
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
80fb504
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
9125efe
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
649529d
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
cb0ad58
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
d4019b5
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins Apr 7, 2023
3d85dad
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins May 3, 2023
b21c046
Merge branch '7.4.x' into master (using strategy ours)
ConfluentJenkins May 5, 2023
7c2e3af
add new image cp-kafka-kraft
utkarsh5474 Mar 10, 2023
07de5ae
enhance config checks
utkarsh5474 Mar 15, 2023
a8e3620
rename image to cp-kafka-lite
utkarsh5474 Mar 15, 2023
a0c6ca1
sync with latest kraft mode changes in kafka image
utkarsh5474 Mar 30, 2023
9b0c727
adding testcontainer tests (initial commit)
ujjwalkalia May 2, 2023
e031166
Make use of go utilities(ub)
May 4, 2023
3cced0e
Remove unused files
May 4, 2023
2dbb708
trial run with junit fix
ujjwalkalia May 10, 2023
ae2cca8
adding changes for rebase in kafka plus rest
ujjwalkalia May 11, 2023
c44470a
skipping tests in server pom
ujjwalkalia May 11, 2023
99641de
skipping python tox tests
ujjwalkalia May 11, 2023
dbb7f68
image name fix
ujjwalkalia May 11, 2023
94533ed
trying with latest test changes
ujjwalkalia May 17, 2023
b8d3ca0
image changes
ujjwalkalia May 17, 2023
b9475ef
appending ub
ujjwalkalia May 17, 2023
0ed4eb6
test fixes
ujjwalkalia May 17, 2023
0fb6551
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
96dd571
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
f1e316c
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
62e48f4
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
48c3ee4
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
7a69183
fixes related to ub and encryption format
ujjwalkalia May 18, 2023
b762b5b
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
74c7be1
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
f08e3ab
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
e711be9
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
70a2bd9
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
d3628ab
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
eddea1a
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
2803d7c
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
06ac664
fixes related to ub and encryption format
ujjwalkalia May 19, 2023
07a4f6b
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
ee1af70
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
16b2c20
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
d74469a
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
f205aa0
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
36fceb6
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
65a8279
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
a3e3b26
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
cfbd3da
fixes related to ub and encryption format
ujjwalkalia May 20, 2023
de0b5e0
fixes related to ub and encryption format
ujjwalkalia May 22, 2023
c6907db
fixes related to ub and encryption format
ujjwalkalia May 23, 2023
1c80a2c
fixes related to ub and encryption format
ujjwalkalia May 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ dockerfile {
dockerPush = true
dockerRepos = ['confluentinc/cp-server-connect', 'confluentinc/cp-server-connect-base',
'confluentinc/cp-kafka-connect', 'confluentinc/cp-kafka-connect-base',
'confluentinc/cp-enterprise-kafka', 'confluentinc/cp-kafka',
'confluentinc/cp-enterprise-kafka', 'confluentinc/cp-kafka', 'confluentinc/cp-kafka-kraft',
'confluentinc/cp-server', 'confluentinc/cp-zookeeper']
mvnPhase = 'package'
mvnPhase = 'verify'
mvnSkipDeploy = true
nodeLabel = 'docker-debian-jdk8-compose'
slackChannel = 'kafka-warn'
upstreamProjects = []
dockerPullDeps = ['confluentinc/cp-base-new']
dockerPullDeps = ['confluentinc/cp-base-new', 'confluentinc/cp-base-lite']
usePackages = true
cron = '' // Disable the cron because this job requires parameters
cpImages = true
Expand Down
2 changes: 1 addition & 1 deletion ce-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.confluent.kafka-images</groupId>
<artifactId>kafka-images-parent</artifactId>
<version>7.4.1-0</version>
<version>7.5.0-0</version>
</parent>

<groupId>io.confluent.kafka-images</groupId>
Expand Down
4 changes: 2 additions & 2 deletions kafka-connect-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.confluent.kafka-images</groupId>
<artifactId>kafka-images-parent</artifactId>
<version>7.4.1-0</version>
<version>7.5.0-0</version>
</parent>

<groupId>io.confluent.kafka-images</groupId>
Expand All @@ -32,6 +32,6 @@

<properties>
<docker.skip-build>false</docker.skip-build>
<docker.skip-test>false</docker.skip-test>
<docker.skip-test>true</docker.skip-test>
</properties>
</project>
2 changes: 1 addition & 1 deletion kafka-connect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.confluent.kafka-images</groupId>
<artifactId>kafka-images-parent</artifactId>
<version>7.4.1-0</version>
<version>7.5.0-0</version>
</parent>

<groupId>io.confluent.kafka-images</groupId>
Expand Down
87 changes: 87 additions & 0 deletions kafka-plus-rest/Dockerfile.ubi8
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# Copyright 2019 Confluent Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG DOCKER_UPSTREAM_REGISTRY
ARG DOCKER_UPSTREAM_TAG=ubi8-latest

FROM ${DOCKER_UPSTREAM_REGISTRY}confluentinc/cp-base-lite:${DOCKER_UPSTREAM_TAG}

ARG PROJECT_VERSION
ARG ARTIFACT_ID
ARG GIT_COMMIT

LABEL maintainer="[email protected]"
LABEL vendor="Confluent"
LABEL version=$GIT_COMMIT
LABEL release=$PROJECT_VERSION
LABEL name=$ARTIFACT_ID
LABEL summary="Kafka with Rest Proxy"
LABEL io.confluent.docker=true
LABEL io.confluent.docker.git.id=$GIT_COMMIT
ARG BUILD_NUMBER=-1
LABEL io.confluent.docker.build.number=$BUILD_NUMBER
LABEL io.confluent.docker.git.repo="confluentinc/kafka-images"

ARG CONFLUENT_VERSION
ARG CONFLUENT_PACKAGES_REPO
ARG CONFLUENT_PLATFORM_LABEL

# allow arg override of required env params
ARG KAFKA_ZOOKEEPER_CONNECT
ENV KAFKA_ZOOKEEPER_CONNECT=${KAFKA_ZOOKEEPER_CONNECT}
ARG KAFKA_ADVERTISED_LISTENERS
ENV KAFKA_ADVERTISED_LISTENERS=${KAFKA_ADVERTISED_LISTENERS}
ARG CLUSTER_ID
ENV CLUSTER_ID=${CLUSTER_ID}

# exposed ports
EXPOSE 9092 8082

USER root

RUN echo "===> Installing kafka and kafka rest..." \
&& echo "===> Adding confluent repository...${CONFLUENT_PACKAGES_REPO}" \
&& rpm --import ${CONFLUENT_PACKAGES_REPO}/archive.key \
&& printf "[Confluent.dist] \n\
name=Confluent repository (dist) \n\
baseurl=${CONFLUENT_PACKAGES_REPO}/\$releasever \n\
gpgcheck=1 \n\
gpgkey=${CONFLUENT_PACKAGES_REPO}/archive.key \n\
enabled=1 \n\
\n\
[Confluent] \n\
name=Confluent repository \n\
baseurl=${CONFLUENT_PACKAGES_REPO}/ \n\
gpgcheck=1 \n\
gpgkey=${CONFLUENT_PACKAGES_REPO}/archive.key \n\
enabled=1 " > /etc/yum.repos.d/confluent.repo \
&& yum install -y confluent-kafka-${CONFLUENT_VERSION} \
&& yum install -y confluent-kafka-rest-${CONFLUENT_VERSION} \
&& echo "===> clean up ..." \
&& yum clean all \
&& rm -rf /tmp/* /etc/yum.repos.d/confluent.repo \
&& echo "===> Setting up dirs" \
&& mkdir -p /var/lib/kafka/data /etc/kafka/secrets \
&& chown appuser:root -R /etc/kafka-rest /etc/kafka /var/log/kafka /var/log/confluent /var/lib/kafka /var/lib/zookeeper /etc/kafka/secrets /var/lib/kafka /etc/kafka \
&& chmod -R ug+w /etc/kafka-rest /etc/kafka /var/log/kafka /var/log/confluent /var/lib/kafka /var/lib/zookeeper /var/lib/kafka /etc/kafka/secrets /etc/kafka


VOLUME ["/var/lib/kafka/data", "/etc/kafka/secrets"]

COPY --chown=appuser:appuser include/etc/confluent/docker /etc/confluent/docker

USER appuser

CMD ["/etc/confluent/docker/run"]
31 changes: 31 additions & 0 deletions kafka-plus-rest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Confluent Community Docker Image for Apache Kafka and Kafka Rest

Docker image for deploying and running the Community Version of Kafka alongwith Kafka Rest Proxy.

## Using the image

* [Notes on using the image](https://docs.confluent.io/platform/current/installation/docker/installation.html)
* [Configuration Reference](https://docs.confluent.io/platform/current/installation/docker/config-reference.html#confluent-ak-configuration)

## Resources

* [Docker Quick Start for Apache Kafka using Confluent Platform](https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html#ce-docker-quickstart)

* [Learn Kafka](https://developer.confluent.io/learn-kafka)

* [Confluent Developer](https://developer.confluent.io): blogs, tutorials, videos, and podcasts for learning all about Apache Kafka and Confluent Platform

* [confluentinc/cp-demo](https://github.com/confluentinc/cp-demo): GitHub demo that you can run locally. The demo uses this Docker image to showcase Confluent Server in a secured, end-to-end event streaming platform. It has an accompanying playbook that shows users how to use Confluent Control Center to manage and monitor Kafka connect, Schema Registry, REST Proxy, KSQL, and Kafka Streams.

* [confluentinc/examples](https://github.com/confluentinc/examples): additional curated examples in GitHub that you can run locally.

## Contribute

Start by reading our guidelines on contributing to this project found here.

* [Source Code](https://github.com/confluentinc/kafka-images)
* [Issue Tracker](https://github.com/confluentinc/kafka-images/issues)

## License

This Docker image is licensed under the Apache 2 license. For more information on the licenses for each of the individual Confluent Platform components packaged in this image, please refer to the respective [Confluent Platform documentation](https://docs.confluent.io/platform/current/installation/docker/image-reference.html).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"prefixes": {
"KAFKA_REST_CLIENT": false
}
}
188 changes: 188 additions & 0 deletions kafka-plus-rest/include/etc/confluent/docker/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
#!/usr/bin/env bash
#
# Copyright 2016 Confluent Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

. /etc/confluent/docker/bash-config

# --- for broker

# If KAFKA_PROCESS_ROLES is defined it means we are running in KRaft mode

# unset KAFKA_ADVERTISED_LISTENERS from ENV in KRaft mode when running as controller only
if [[ -n "${KAFKA_PROCESS_ROLES-}" ]]
then
echo "Running in KRaft mode..."
ub ensure CLUSTER_ID
if [[ $KAFKA_PROCESS_ROLES == "controller" ]]
then
if [[ -n "${KAFKA_ADVERTISED_LISTENERS-}" ]]
then
echo "KAFKA_ADVERTISED_LISTENERS is not supported on a KRaft controller."
exit 1
else
unset KAFKA_ADVERTISED_LISTENERS
fi
else
ub ensure KAFKA_ADVERTISED_LISTENERS
fi
else
echo "Running in Zookeeper mode..."
ub ensure KAFKA_ZOOKEEPER_CONNECT
ub ensure KAFKA_ADVERTISED_LISTENERS
fi
# By default, LISTENERS is derived from ADVERTISED_LISTENERS by replacing
# hosts with 0.0.0.0. This is good default as it ensures that the broker
# process listens on all ports.
if [[ -z "${KAFKA_LISTENERS-}" ]] && ( [[ -z "${KAFKA_PROCESS_ROLES-}" ]] || [[ $KAFKA_PROCESS_ROLES != "controller" ]] )
then
export KAFKA_LISTENERS
KAFKA_LISTENERS=$(echo "$KAFKA_ADVERTISED_LISTENERS" | sed -e 's|://[^:]*:|://0.0.0.0:|g')
fi

ub path /etc/kafka/ writable

if [[ -z "${KAFKA_LOG_DIRS-}" ]]
then
export KAFKA_LOG_DIRS
KAFKA_LOG_DIRS="/var/lib/kafka/data"
fi

# advertised.host, advertised.port, host and port are deprecated. Exit if these properties are set.
if [[ -n "${KAFKA_ADVERTISED_PORT-}" ]]
then
echo "advertised.port is deprecated. Please use KAFKA_ADVERTISED_LISTENERS instead."
exit 1
fi

if [[ -n "${KAFKA_ADVERTISED_HOST-}" ]]
then
echo "advertised.host is deprecated. Please use KAFKA_ADVERTISED_LISTENERS instead."
exit 1
fi

if [[ -n "${KAFKA_HOST-}" ]]
then
echo "host is deprecated. Please use KAFKA_ADVERTISED_LISTENERS instead."
exit 1
fi

if [[ -n "${KAFKA_PORT-}" ]]
then
echo "port is deprecated. Please use KAFKA_ADVERTISED_LISTENERS instead."
exit 1
fi

# Set if ADVERTISED_LISTENERS has SSL:// or SASL_SSL:// endpoints.
if [[ -n "${KAFKA_ADVERTISED_LISTENERS-}" ]] && [[ $KAFKA_ADVERTISED_LISTENERS == *"SSL://"* ]]
then
echo "SSL is enabled."

ub ensure KAFKA_SSL_KEYSTORE_FILENAME
export KAFKA_SSL_KEYSTORE_LOCATION="/etc/kafka/secrets/$KAFKA_SSL_KEYSTORE_FILENAME"
directory="/etc/kafka/secrets"

# Check if the directory exists
if [ -d "$directory" ]; then
# Loop through each file and subdirectory in the directory
for file in "$directory"/*; do
# Echo the file or subdirectory name
echo "$(basename "$file")"
done
else
echo "Directory not found: $directory"
fi


ub path "$KAFKA_SSL_KEYSTORE_LOCATION" existence

ub ensure KAFKA_SSL_KEY_CREDENTIALS
KAFKA_SSL_KEY_CREDENTIALS_LOCATION="/etc/kafka/secrets/$KAFKA_SSL_KEY_CREDENTIALS"


ub path "$KAFKA_SSL_KEY_CREDENTIALS_LOCATION" existence
export KAFKA_SSL_KEY_PASSWORD
KAFKA_SSL_KEY_PASSWORD=$(cat "$KAFKA_SSL_KEY_CREDENTIALS_LOCATION")

ub ensure KAFKA_SSL_KEYSTORE_CREDENTIALS
KAFKA_SSL_KEYSTORE_CREDENTIALS_LOCATION="/etc/kafka/secrets/$KAFKA_SSL_KEYSTORE_CREDENTIALS"
ub path "$KAFKA_SSL_KEYSTORE_CREDENTIALS_LOCATION" existence
export KAFKA_SSL_KEYSTORE_PASSWORD
KAFKA_SSL_KEYSTORE_PASSWORD=$(cat "$KAFKA_SSL_KEYSTORE_CREDENTIALS_LOCATION")

if [[ -n "${KAFKA_SSL_CLIENT_AUTH-}" ]] && ( [[ $KAFKA_SSL_CLIENT_AUTH == *"required"* ]] || [[ $KAFKA_SSL_CLIENT_AUTH == *"requested"* ]] )
then
ub ensure KAFKA_SSL_TRUSTSTORE_FILENAME
export KAFKA_SSL_TRUSTSTORE_LOCATION="/etc/kafka/secrets/$KAFKA_SSL_TRUSTSTORE_FILENAME"
ub path "$KAFKA_SSL_TRUSTSTORE_LOCATION" existence

ub ensure KAFKA_SSL_TRUSTSTORE_CREDENTIALS
KAFKA_SSL_TRUSTSTORE_CREDENTIALS_LOCATION="/etc/kafka/secrets/$KAFKA_SSL_TRUSTSTORE_CREDENTIALS"
ub path "$KAFKA_SSL_TRUSTSTORE_CREDENTIALS_LOCATION" existence
export KAFKA_SSL_TRUSTSTORE_PASSWORD
KAFKA_SSL_TRUSTSTORE_PASSWORD=$(cat "$KAFKA_SSL_TRUSTSTORE_CREDENTIALS_LOCATION")
fi

fi

# Set if KAFKA_ADVERTISED_LISTENERS has SASL_PLAINTEXT:// or SASL_SSL:// endpoints.
if [[ -n "${KAFKA_ADVERTISED_LISTENERS-}" ]] && [[ $KAFKA_ADVERTISED_LISTENERS =~ .*SASL_.*://.* ]]
then
echo "SASL" is enabled.

ub ensure KAFKA_OPTS

if [[ ! $KAFKA_OPTS == *"java.security.auth.login.config"* ]]
then
echo "KAFKA_OPTS should contain 'java.security.auth.login.config' property."
fi
fi

if [[ -n "${KAFKA_JMX_OPTS-}" ]]
then
if [[ ! $KAFKA_JMX_OPTS == *"com.sun.management.jmxremote.rmi.port"* ]]
then
echo "KAFKA_OPTS should contain 'com.sun.management.jmxremote.rmi.port' property. It is required for accessing the JMX metrics externally."
fi
fi


# --- for rest proxy
ub ensure KAFKA_REST_BOOTSTRAP_SERVERS
ub path /etc/kafka-rest/ writable

if [[ -n "${KAFKA_REST_PORT-}" ]]
then
echo "PORT is deprecated. Please use KAFKA_REST_LISTENERS instead."
exit 1
fi

if [[ -n "${KAFKAREST_JMX_OPTS-}" ]]
then
if [[ ! $KAFKAREST_JMX_OPTS == *"com.sun.management.jmxremote.rmi.port"* ]]
then
echo "KAFKA_REST_OPTS should contain 'com.sun.management.jmxremote.rmi.port' property. It is required for accessing the JMX metrics externally."
fi
fi


# --- for broker
ub render-properties /etc/confluent/docker/kafka-propertiesSpec.json > /etc/kafka/kafka.properties
ub render-template /etc/confluent/docker/kafka-log4j.properties.template > /etc/kafka/log4j.properties
ub render-template /etc/confluent/docker/kafka-tools-log4j.properties.template > /etc/kafka/tools-log4j.properties

# --- for rest proxy
ub render-properties /etc/confluent/docker/kafka-rest-propertiesSpec.json > /etc/kafka-rest/kafka-rest.properties
ub render-properties /etc/confluent/docker/admin-propertiesSpec.json > /etc/kafka-rest/admin.properties
ub render-template /etc/confluent/docker/kafka-rest-log4j.properties.template > /etc/kafka-rest/log4j.properties
Loading