--- kind: ConfigMap metadata: name: connect-jdbc namespace: test-kafka apiVersion: v1 data: setup.sh: |- echo "TODO setup" apk add --update sqlite touch /tmp/testlog tail -f /tmp/testlog continue.sh: |- exit 0 run.sh: |- exec >> /tmp/testlog exec 2>&1 echo "NOP" exit 0 --- apiVersion: batch/v1 kind: Job metadata: name: connect-jdbc namespace: test-kafka spec: template: spec: containers: - name: topic-create image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce command: - ./bin/kafka-topics.sh - --zookeeper - zookeeper.kafka.svc.cluster.local:2181 - --create - --if-not-exists - --topic - test-connect-jdbc-table1 - --partitions - "1" - --replication-factor - "1" restartPolicy: Never --- apiVersion: apps/v1beta1 kind: Deployment metadata: name: connect-jdbc namespace: test-kafka spec: replicas: 1 template: metadata: labels: test-target: kafka test-type: readiness spec: containers: - name: testcase image: solsson/curl@sha256:523319afd39573746e8f5a7c98d4a6cd4b8cbec18b41eb30c8baa13ede120ce3 env: - name: BOOTSTRAP value: kafka-0.broker.kafka.svc.cluster.local:9092 - name: ZOOKEEPER value: zookeeper.kafka.svc.cluster.local:2181 # Test set up command: - /bin/bash - -e - /test/setup.sh # Test run, again and again readinessProbe: exec: command: - /bin/bash - -e - /test/run.sh # Test quit on nonzero exit livenessProbe: exec: command: - /bin/bash - -e - /test/continue.sh volumeMounts: - name: config mountPath: /test volumes: - name: config configMap: name: connect-jdbc