Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Print version info
id: semver
Expand All @@ -26,10 +26,10 @@ jobs:

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- name: Build kafka
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Print version info
id: semver
Expand All @@ -27,13 +27,13 @@ jobs:

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
12 changes: 12 additions & 0 deletions kafka/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ temp_apply_config="/opt/kafka/config/temp-config/apply.config.properties"
temp_operator_config="/opt/kafka/config/temp-config/config.properties"
temp_ssl_config="/opt/kafka/config/temp-config/ssl.properties"
temp_clientauth_config="/opt/kafka/config/temp-config/clientauth.properties"
external_listeners_config="/opt/kafka/config/temp-config/external-listeners.properties"
# Kafka KRaft configuration files
controller_config="/opt/kafka/config/kraft/controller.properties"
broker_config="/opt/kafka/config/kraft/broker.properties"
Expand Down Expand Up @@ -85,6 +86,17 @@ update_advertised_listeners() {
modified_elements+=("$element") # Skip modification
fi
done
# The operator mounts this file only when external access is enabled. It has one
# <pod-name>=EXTERNAL://<address>:<port> line per broker.
if [[ -f "$external_listeners_config" ]]; then
external_listener=$(grep "^$HOSTNAME=" "$external_listeners_config" | cut -d'=' -f 2-)
# Starting without it would leave this broker unreachable for external clients after bootstrap
if [[ -z "$external_listener" ]]; then
echo "Error: no external listener found for $HOSTNAME in $external_listeners_config" >&2
exit 1
fi
modified_elements+=("$external_listener")
fi
# Join the modified elements into a string using commas as delimiters
output_string=$(IFS=','; echo "${modified_elements[*]}")
advertised_listeners=$output_string
Expand Down
Loading