forked from apecloud/kubeblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add pulsar cluster helm tests (apecloud#4353)
- Loading branch information
Showing
6 changed files
with
167 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{{- if .Values.tests.benchmark.kafka2Kafka }} | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "kblib.clusterName" . }}-omb-driver-cfg | ||
labels: {{ include "kblib.clusterLabels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
data: | ||
kafka_to_pulsar.yaml: |- | ||
name: Kafka producer and Pulsar consumer | ||
driverClass: io.openmessaging.benchmark.driver.kop.KopBenchmarkDriver | ||
producerType: kafka | ||
consumerType: pulsar | ||
# Pulsar configs | ||
pulsarConfig: | ||
serviceUrl: pulsar://{{ include "pulsar-cluster.brokerFQDN" . }}:6650 | ||
batchingMaxPublishDelayMs: 1 | ||
batchingMaxBytes: 1048576 | ||
# Kafka configs | ||
kafkaConfig: | | ||
bootstrap.servers={{ include "pulsar-cluster.brokerFQDN" . }}:9092 | ||
linger.ms=1 | ||
batch.size=1048576 | ||
kafka_to_kafka.yaml: |- | ||
name: Kafka producer and Pulsar consumer | ||
driverClass: io.openmessaging.benchmark.driver.kop.KopBenchmarkDriver | ||
producerType: kafka | ||
consumerType: kafka | ||
# Pulsar configs | ||
pulsarConfig: | ||
serviceUrl: pulsar://{{ include "pulsar-cluster.brokerFQDN" . }}:6650 | ||
# producer configs | ||
batchingEnabled: true | ||
batchingMaxPublishDelayMs: 1 | ||
batchingMaxBytes: 1048576 | ||
blockIfQueueFull: true | ||
pendingQueueSize: 1000 | ||
maxPendingMessagesAcrossPartitions: 50000 | ||
# consumer configs | ||
maxTotalReceiverQueueSizeAcrossPartitions: 50000 | ||
receiverQueueSize: 1000 | ||
# Kafka configs | ||
kafkaConfig: | | ||
bootstrap.servers={{ include "pulsar-cluster.brokerFQDN" . }}:9092 | ||
linger.ms=1 | ||
batch.size=1048576 | ||
pulsar_to_kafka.yaml: |- | ||
name: Pulsar producer and Kafka consumer | ||
driverClass: io.openmessaging.benchmark.driver.kop.KopBenchmarkDriver | ||
producerType: pulsar | ||
consumerType: kafka | ||
# Pulsar configs | ||
pulsarConfig: | ||
serviceUrl: pulsar://{{ include "pulsar-cluster.brokerFQDN" . }}:6650 | ||
batchingMaxPublishDelayMs: 1 | ||
batchingMaxBytes: 1048576 | ||
# Kafka configs | ||
kafkaConfig: | | ||
bootstrap.servers={{ include "pulsar-cluster.brokerFQDN" . }}:9092 | ||
linger.ms=1 | ||
batch.size=1048576 | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{ include "kblib.clusterName" . }}-omb-k2k | ||
labels: {{ include "kblib.clusterLabels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: omb-k2k | ||
image: docker.io/apecloud/omb:0.1 | ||
command: ['bin/benchmark'] | ||
args: | ||
- --drivers | ||
- driver-kop/kafka_to_kafka.yaml | ||
- workloads/1-topic-16-partitions-1kb.yaml | ||
env: | ||
- name: BOOTSTRAP_SERVERS | ||
value: "{{ include "pulsar-cluster.brokerFQDN" . }}:9092" | ||
volumeMounts: | ||
- name: out | ||
mountPath: /out | ||
- name: driver-cfg-k2k | ||
mountPath: /benchmark/driver-kop/kafka_to_kafka.yaml | ||
subPath: kafka_to_kafka.yaml | ||
readOnly: true | ||
- name: driver-cfg-k2p | ||
mountPath: /benchmark/driver-kop/kafka_to_pulsar.yaml | ||
subPath: kafka_to_pulsar.yaml | ||
readOnly: true | ||
- name: driver-cfg-p2k | ||
mountPath: /benchmark/driver-kop/pulsar_to_kafka.yaml | ||
subPath: pulsar_to_kafka.yaml | ||
readOnly: true | ||
restartPolicy: Never | ||
volumes: | ||
- name: out | ||
emptyDir: {} | ||
- name: driver-cfg-k2k | ||
configMap: | ||
name: {{ include "kblib.clusterName" . }}-omb-driver-cfg | ||
items: | ||
- key: kafka_to_kafka.yaml | ||
path: kafka_to_kafka.yaml | ||
- name: driver-cfg-k2p | ||
configMap: | ||
name: {{ include "kblib.clusterName" . }}-omb-driver-cfg | ||
items: | ||
- key: kafka_to_pulsar.yaml | ||
path: kafka_to_pulsar.yaml | ||
- name: driver-cfg-p2k | ||
configMap: | ||
name: {{ include "kblib.clusterName" . }}-omb-driver-cfg | ||
items: | ||
- key: pulsar_to_kafka.yaml | ||
path: pulsar_to_kafka.yaml | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters