aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-10-15 19:54:46 +0200
committerStaffan Olsson <staffan@repos.se>2017-10-16 10:55:24 +0200
commit0c68b1531406b0dc286b0273dde82568b8a8650e (patch)
tree418c1eaa448bfb068946cc5a70c6a5e8c591eb6b
parenta98a9fae09894fe3bb9678ace23fa3212f3703d5 (diff)
downloadkubernetes-kafka-0c68b1531406b0dc286b0273dde82568b8a8650e.tar.gz
kubernetes-kafka-0c68b1531406b0dc286b0273dde82568b8a8650e.tar.bz2
kubernetes-kafka-0c68b1531406b0dc286b0273dde82568b8a8650e.zip
Converted to latest Yolean/kube-test boilerplate
-rw-r--r--test/basic-with-kafkacat.yml49
1 files changed, 27 insertions, 22 deletions
diff --git a/test/basic-with-kafkacat.yml b/test/basic-with-kafkacat.yml
index c5a2503..45c1078 100644
--- a/test/basic-with-kafkacat.yml
+++ b/test/basic-with-kafkacat.yml
@@ -1,19 +1,17 @@
---
kind: ConfigMap
metadata:
- name: basic-with-kafkacat
- namespace: test-kafka
+ name: test-basic-with-kafkacat
+ namespace: default
apiVersion: v1
data:
setup.sh: |-
touch /tmp/testlog
- tail -f /tmp/testlog
- continue.sh: |-
- exit 0
+ tail -f /tmp/testlog
- run.sh: |-
+ test.sh: |-
exec >> /tmp/testlog
exec 2>&1
@@ -24,12 +22,17 @@ data:
exit 0
+ quit-on-nonzero-exit.sh: |-
+ exec >> /tmp/testlog
+ exec 2>&1
+
+ exit 0
---
apiVersion: batch/v1
kind: Job
metadata:
- name: basic-with-kafkacat
- namespace: test-kafka
+ name: test-basic-with-kafkacat
+ namespace: default
spec:
template:
spec:
@@ -53,51 +56,53 @@ spec:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
- name: basic-with-kafkacat
- namespace: test-kafka
+ name: test-basic-with-kafkacat
+ namespace: default
spec:
replicas: 1
+ strategy:
+ type: Recreate
template:
metadata:
labels:
- test-target: kafka
+ test-target: kube-test
test-type: readiness
+ # for example:
+ # readonly - can be used in production
+ # isolated - read/write but in a manner that does not affect other services
+ # load - unsuitable for production because it uses significant resources
+ # chaos - unsuitable for production because it injects failure modes
+ #test-use:
spec:
containers:
- name: testcase
- # common test images
- #image: solsson/curl@sha256:8b0927b81d10043e70f3e05e33e36fb9b3b0cbfcbccdb9f04fd53f67a270b874
image: solsson/kafkacat@sha256:ebebf47061300b14a4b4c2e1e4303ab29f65e4b95d34af1b14bb8f7ec6da7cef
- #image: solsson/kubectl-kafkacat@sha256:3715a7ede3f168f677ee6faf311ff6887aff31f660cfeecad5d87b4f18516321
env:
- name: BOOTSTRAP
#value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
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
+ - /test/test.sh
+ initialDelaySeconds: 10
+ periodSeconds: 10
livenessProbe:
exec:
command:
- /bin/bash
- -e
- - /test/continue.sh
+ - /test/quit-on-nonzero-exit.sh
volumeMounts:
- name: config
mountPath: /test
volumes:
- name: config
configMap:
- name: basic-with-kafkacat
+ name: test-basic-with-kafkacat