forked from rondinif/openshift-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resources.yaml
83 lines (81 loc) · 1.96 KB
/
resources.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
kind: List
apiVersion: v1
metadata: {}
items:
- apiVersion: v1
kind: Template
metadata:
name: apache-kafka
annotations:
description: 1-pod Apache Kafka
tags: messaging,streaming,kafka
parameters:
- name: NAME
description: Name prefix for each object created
required: true
value: apache-kafka
- name: IMAGE
description: Image with Apache Kafka and Apache ZooKeeper
required: true
value: rondinif/openshift-kafka
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${NAME}
spec:
replicas: 1
selector:
deploymentconfig: ${NAME}
template:
metadata:
labels:
deploymentconfig: ${NAME}
spec:
hostname: ${NAME}
containers:
- name: apache-kafka
image: ${IMAGE}
command:
- bin/kafka-server-start.sh
args:
- config/server.properties
- --override
- advertised.host.name=${NAME}
- --override
- log.segment.bytes=10485760
- --override
- log.retention.bytes=10485760
volumeMounts:
- mountPath: /tmp/kafka-logs
name: kafka-logs
ports:
- containerPort: 9092
- name: apache-zookeeper
image: ${IMAGE}
command:
- bin/zookeeper-server-start.sh
args:
- config/zookeeper.properties
volumeMounts:
- mountPath: /tmp/zookeeper
name: zookeeper
ports:
- containerPort: 2181
volumes:
- name: kafka-logs
emptyDir: {}
- name: zookeeper
emptyDir: {}
- apiVersion: v1
kind: Service
metadata:
name: ${NAME}
spec:
ports:
- name: kafka
port: 9092
- name: zookeeper
port: 2181
selector:
deploymentconfig: ${NAME}