Skip to content

Commit 2257cd1

Browse files
authored
Merge pull request #90 from Yolean/1.8-manifests
Updates manifests to beta2 workload API, k8s 1.8
2 parents 6b24807 + b8f6078 commit 2257cd1

File tree

14 files changed

+27
-65
lines changed

14 files changed

+27
-65
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
_Manifests here require Kubernetes 1.8 now.
2+
On earlier versions use [v2.1.0](https://github.com/Yolean/kubernetes-kafka/tree/v2.1.0)._
23

34
# Kafka on Kubernetes
45

@@ -49,7 +50,7 @@ To support automatic migration in the face of availability zone unavailability w
4950
## Start Kafka
5051

5152
```
52-
kubectl apply -f ./
53+
kubectl apply -f ./kafka/
5354
```
5455

5556
You might want to verify in logs that Kafka found its own DNS name(s) correctly. Look for records like:
@@ -61,7 +62,6 @@ kubectl -n kafka logs kafka-0 | grep "Registered broker"
6162
That's it. Just add business value :wink:.
6263
For clients we tend to use [librdkafka](https://github.com/edenhill/librdkafka)-based drivers like [node-rdkafka](https://github.com/Blizzard/node-rdkafka).
6364
To use [Kafka Connect](http://kafka.apache.org/documentation/#connect) and [Kafka Streams](http://kafka.apache.org/documentation/streams/) you may want to take a look at our [sample](https://github.com/solsson/dockerfiles/tree/master/connect-files) [Dockerfile](https://github.com/solsson/dockerfiles/tree/master/streams-logfilter)s.
64-
And don't forget the [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s.
6565

6666
## RBAC
6767

@@ -75,8 +75,6 @@ kubectl apply -f rbac-namespace-default/
7575
Tests are based on the [kube-test](https://github.com/Yolean/kube-test) concept.
7676
Like the rest of this repo they have `kubectl` as the only local dependency.
7777

78-
```
79-
kubectl apply -f test/
80-
# Anything that isn't READY here is a failed test
81-
kubectl get pods -l test-type=readiness -w --namespace=test-kafka
82-
```
78+
Run self-tests or not. They do generate some load, but indicate if the platform is working or not.
79+
* To include tests, replace `apply -f` with `apply -R -f` in your `kubectl`s above.
80+
* Anything that isn't READY in `kubectl get pods -l test-type=readiness --namespace=test-kafka` is a failed test.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

50kafka.yml renamed to kafka/50kafka.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
apiVersion: apps/v1beta1
1+
apiVersion: apps/v1beta2
22
kind: StatefulSet
33
metadata:
44
name: kafka
55
namespace: kafka
66
spec:
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: kafka
711
serviceName: "broker"
812
replicas: 3
913
template:
File renamed without changes.

test/kafkacat.yml renamed to kafka/test/kafkacat.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ data:
2323
echo "${UNIQUE: -41:5}:Test $UNIQUE" >> /shared/produce.tmp
2424
sleep $PC_WAIT
2525
LAST=$(tail -n 1 /shared/consumed.tmp)
26+
[ -z "$LAST" ] && echo "Nothing consumed" && exit 1
2627
2728
LAST_TS=$(echo $LAST | awk -F';' '{print $1}')
29+
[ -z "$LAST_TS" ] && echo "Failed to get timestamp for message: $LAST" && exit 1
2830
LAST_MSG=$(echo $LAST | awk -F';' '{print $4}')
2931
NOW=$(date -u +%s%3N)
3032
DIFF_S=$((($NOW - $LAST_TS)/1000))
File renamed without changes.

qa-yolean.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

rbac-namespace-default/node-reader.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
---
1010
kind: ClusterRole
11-
apiVersion: rbac.authorization.k8s.io/v1beta1
11+
apiVersion: rbac.authorization.k8s.io/v1
1212
metadata:
1313
name: node-reader
1414
labels:
@@ -22,7 +22,7 @@ rules:
2222
- get
2323
---
2424
kind: ClusterRoleBinding
25-
apiVersion: rbac.authorization.k8s.io/v1beta1
25+
apiVersion: rbac.authorization.k8s.io/v1
2626
metadata:
2727
name: kafka-node-reader
2828
labels:

yahoo-kafka-manager/kafka-manager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1beta1
1+
apiVersion: apps/v1beta2
22
kind: Deployment
33
metadata:
44
name: kafka-manager

zookeeper/50pzoo.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
apiVersion: apps/v1beta1
1+
apiVersion: apps/v1beta2
22
kind: StatefulSet
33
metadata:
44
name: pzoo
55
namespace: kafka
66
spec:
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: zookeeper
11+
storage: persistent
712
serviceName: "pzoo"
813
replicas: 3
914
template:

zookeeper/51zoo.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
apiVersion: apps/v1beta1
1+
apiVersion: apps/v1beta2
22
kind: StatefulSet
33
metadata:
44
name: zoo
55
namespace: kafka
66
spec:
7+
selector:
8+
matchLabels:
9+
app: zookeeper
10+
storage: ephemeral
711
serviceName: "zoo"
812
replicas: 2
913
template:

0 commit comments

Comments
 (0)