Skip to content

Commit 0289b91

Browse files
Enable KoP in generic Kafka e2e
1 parent 95d25d8 commit 0289b91

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

.ci/clusters/values_skywalking_e2e_cluster.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ components:
3131
pulsar_manager: false
3232
sql_worker: false
3333
proxy: false
34+
kop: true
3435

3536
## disable monitoring stack
3637
monitoring:

.ci/helm.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,26 @@ function ci::ensure_kafka_topic() {
375375
topic=$1
376376
kafka_bootstrap_server=$2
377377
properties_file=$3
378+
for attempt in $(seq 1 30); do
379+
if kubectl exec -n ${NAMESPACE} kafka-client -- kafka-topics.sh \
380+
--bootstrap-server "${kafka_bootstrap_server}" \
381+
--command-config "/opt/bitnami/kafka/config/${properties_file}" \
382+
--list > /dev/null 2>&1; then
383+
break
384+
fi
385+
if [ "${attempt}" -eq 30 ]; then
386+
echo "Kafka broker ${kafka_bootstrap_server} is not ready"
387+
kubectl get pods -n ${NAMESPACE} -o wide || true
388+
return 1
389+
fi
390+
sleep 5
391+
done
378392
kubectl exec -n ${NAMESPACE} kafka-client -- kafka-topics.sh \
379393
--bootstrap-server "${kafka_bootstrap_server}" \
380394
--create \
381395
--if-not-exists \
382396
--topic "${topic}" \
383-
--command-config "/opt/bitnami/kafka/config/${properties_file}" || true
397+
--command-config "/opt/bitnami/kafka/config/${properties_file}"
384398
}
385399

386400
function ci::verify_kafka_exclamation_function() {

.ci/tests/integration/cases/generic-kafka-function/verify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ kubectl wait pod kafka-client --for=condition=Ready --timeout=2m || {
4848
exit 1
4949
}
5050

51-
ci::ensure_kafka_topic "${input_topic}" "${kafka_bootstrap_server}" "${kafka_properties_file}" > /dev/null 2>&1
52-
ci::ensure_kafka_topic "${output_topic}" "${kafka_bootstrap_server}" "${kafka_properties_file}" > /dev/null 2>&1
51+
ci::ensure_kafka_topic "${input_topic}" "${kafka_bootstrap_server}" "${kafka_properties_file}"
52+
ci::ensure_kafka_topic "${output_topic}" "${kafka_bootstrap_server}" "${kafka_properties_file}"
5353
kubectl apply -f "${manifests_file}" > /dev/null 2>&1
5454

5555
kubectl wait -l compute.functionmesh.io/name=generic-kafka-function --for=condition=Ready pod --timeout=2m || {

0 commit comments

Comments
 (0)