aboutsummaryrefslogtreecommitdiff
path: root/addon-cp
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-08-07 08:22:42 +0200
committerStaffan Olsson <staffan@repos.se>2017-08-07 08:22:42 +0200
commitedeca3df36e72ddb464a10c580ae33b8ed1d2f17 (patch)
treea43a3e12bf91da1f5540a9f66ced248c61edc49a /addon-cp
parentff698326390c191a39c95b38d019f7b306fb0063 (diff)
downloadkubernetes-kafka-edeca3df36e72ddb464a10c580ae33b8ed1d2f17.tar.gz
kubernetes-kafka-edeca3df36e72ddb464a10c580ae33b8ed1d2f17.tar.bz2
kubernetes-kafka-edeca3df36e72ddb464a10c580ae33b8ed1d2f17.zip
Moves to an addon folder, kubectl apply -f addon-cp/
Diffstat (limited to 'addon-cp')
-rw-r--r--addon-cp/confluent-config.yml68
-rw-r--r--addon-cp/rest-service.yml10
-rw-r--r--addon-cp/rest.yml30
-rw-r--r--addon-cp/schemas-service.yml10
-rw-r--r--addon-cp/schemas.yml30
5 files changed, 148 insertions, 0 deletions
diff --git a/addon-cp/confluent-config.yml b/addon-cp/confluent-config.yml
new file mode 100644
index 0000000..b56484b
--- /dev/null
+++ b/addon-cp/confluent-config.yml
@@ -0,0 +1,68 @@
+kind: ConfigMap
+metadata:
+ name: confluent-config
+ namespace: kafka
+apiVersion: v1
+data:
+ schema-registry.properties: |-
+ # Copyright 2014 Confluent Inc.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+ listeners=http://0.0.0.0:80
+ #kafkastore.bootstrap.servers
+ kafkastore.connection.url=zookeeper:2181
+ kafkastore.topic=_schemas
+ debug=false
+
+ kafka-rest.properties: |-
+ ##
+ # Copyright 2015 Confluent Inc.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ ##
+
+ #id=kafka-rest-test-server
+ listeners=http://0.0.0.0:80
+ bootstrap.servers=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
+ zookeeper.connect=zookeeper:2181
+ schema.registry.url=http://schemas.kafka.svc.cluster.local:80
+ #
+ # Configure interceptor classes for sending consumer and producer metrics to Confluent Control Center
+ # Make sure that monitoring-interceptors-<version>.jar is on the Java class path
+ #consumer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor
+ #producer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor
+
+ log4j.properties: |-
+ log4j.rootLogger=INFO, stdout
+
+ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+ log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
+
+ log4j.logger.kafka=ERROR, stdout
+ log4j.logger.org.apache.zookeeper=ERROR, stdout
+ log4j.logger.org.apache.kafka=ERROR, stdout
+ log4j.logger.org.I0Itec.zkclient=ERROR, stdout
+ log4j.additivity.kafka.server=false
+ log4j.additivity.kafka.consumer.ZookeeperConsumerConnector=false
diff --git a/addon-cp/rest-service.yml b/addon-cp/rest-service.yml
new file mode 100644
index 0000000..a3ffda6
--- /dev/null
+++ b/addon-cp/rest-service.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: rest
+ namespace: kafka
+spec:
+ ports:
+ - port: 80
+ selector:
+ app: kafka-rest
diff --git a/addon-cp/rest.yml b/addon-cp/rest.yml
new file mode 100644
index 0000000..f03f5b5
--- /dev/null
+++ b/addon-cp/rest.yml
@@ -0,0 +1,30 @@
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: rest
+ namespace: kafka
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: kafka-rest
+ spec:
+ containers:
+ - name: cp
+ image: solsson/kafka-cp@sha256:a22047b9e8bf4b8badfd2fbba47f2d1acdcbb84dfb03c61a15e1ac203036cedf
+ env:
+ - name: KAFKAREST_LOG4J_OPTS
+ value: -Dlog4j.configuration=file:/etc/kafka-rest/log4j.properties
+ command:
+ - kafka-rest-start
+ - /etc/kafka-rest/kafka-rest.properties
+ ports:
+ - containerPort: 80
+ volumeMounts:
+ - name: config
+ mountPath: /etc/kafka-rest
+ volumes:
+ - name: config
+ configMap:
+ name: confluent-config
diff --git a/addon-cp/schemas-service.yml b/addon-cp/schemas-service.yml
new file mode 100644
index 0000000..2c30905
--- /dev/null
+++ b/addon-cp/schemas-service.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: schemas
+ namespace: kafka
+spec:
+ ports:
+ - port: 80
+ selector:
+ app: schema-registry
diff --git a/addon-cp/schemas.yml b/addon-cp/schemas.yml
new file mode 100644
index 0000000..f85d74c
--- /dev/null
+++ b/addon-cp/schemas.yml
@@ -0,0 +1,30 @@
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: schemas
+ namespace: kafka
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: schema-registry
+ spec:
+ containers:
+ - name: cp
+ image: solsson/kafka-cp@sha256:a22047b9e8bf4b8badfd2fbba47f2d1acdcbb84dfb03c61a15e1ac203036cedf
+ env:
+ - name: SCHEMA_REGISTRY_LOG4J_OPTS
+ value: -Dlog4j.configuration=file:/etc/schema-registry/log4j.properties
+ command:
+ - schema-registry-start
+ - /etc/schema-registry/schema-registry.properties
+ ports:
+ - containerPort: 80
+ volumeMounts:
+ - name: config
+ mountPath: /etc/schema-registry
+ volumes:
+ - name: config
+ configMap:
+ name: confluent-config