Skip to content

Commit

Permalink
Merge pull request #90 from Yolean/1.8-manifests
Browse files Browse the repository at this point in the history
Updates manifests to beta2 workload API, k8s 1.8
  • Loading branch information
solsson authored Nov 9, 2017
2 parents 6b24807 + b8f6078 commit 2257cd1
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 65 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

_Manifests here require Kubernetes 1.8 now.
On earlier versions use [v2.1.0](https://github.com/Yolean/kubernetes-kafka/tree/v2.1.0)._

# Kafka on Kubernetes

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

```
kubectl apply -f ./
kubectl apply -f ./kafka/
```

You might want to verify in logs that Kafka found its own DNS name(s) correctly. Look for records like:
Expand All @@ -61,7 +62,6 @@ kubectl -n kafka logs kafka-0 | grep "Registered broker"
That's it. Just add business value :wink:.
For clients we tend to use [librdkafka](https://github.com/edenhill/librdkafka)-based drivers like [node-rdkafka](https://github.com/Blizzard/node-rdkafka).
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.
And don't forget the [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s.

## RBAC

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

```
kubectl apply -f test/
# Anything that isn't READY here is a failed test
kubectl get pods -l test-type=readiness -w --namespace=test-kafka
```
Run self-tests or not. They do generate some load, but indicate if the platform is working or not.
* To include tests, replace `apply -f` with `apply -R -f` in your `kubectl`s above.
* 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.
6 changes: 5 additions & 1 deletion 50kafka.yml → kafka/50kafka.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: kafka
namespace: kafka
spec:
spec:
selector:
matchLabels:
app: kafka
serviceName: "broker"
replicas: 3
template:
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions test/kafkacat.yml → kafka/test/kafkacat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ data:
echo "${UNIQUE: -41:5}:Test $UNIQUE" >> /shared/produce.tmp
sleep $PC_WAIT
LAST=$(tail -n 1 /shared/consumed.tmp)
[ -z "$LAST" ] && echo "Nothing consumed" && exit 1
LAST_TS=$(echo $LAST | awk -F';' '{print $1}')
[ -z "$LAST_TS" ] && echo "Failed to get timestamp for message: $LAST" && exit 1
LAST_MSG=$(echo $LAST | awk -F';' '{print $4}')
NOW=$(date -u +%s%3N)
DIFF_S=$((($NOW - $LAST_TS)/1000))
Expand Down
File renamed without changes.
51 changes: 0 additions & 51 deletions qa-yolean.sh

This file was deleted.

4 changes: 2 additions & 2 deletions rbac-namespace-default/node-reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: node-reader
labels:
Expand All @@ -22,7 +22,7 @@ rules:
- get
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kafka-node-reader
labels:
Expand Down
2 changes: 1 addition & 1 deletion yahoo-kafka-manager/kafka-manager.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: kafka-manager
Expand Down
7 changes: 6 additions & 1 deletion zookeeper/50pzoo.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: pzoo
namespace: kafka
spec:
spec:
selector:
matchLabels:
app: zookeeper
storage: persistent
serviceName: "pzoo"
replicas: 3
template:
Expand Down
6 changes: 5 additions & 1 deletion zookeeper/51zoo.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: zoo
namespace: kafka
spec:
selector:
matchLabels:
app: zookeeper
storage: ephemeral
serviceName: "zoo"
replicas: 2
template:
Expand Down

0 comments on commit 2257cd1

Please sign in to comment.