diff options
author | Staffan Olsson <staffan@repos.se> | 2017-11-29 06:52:48 +0100 |
---|---|---|
committer | Staffan Olsson <staffan@repos.se> | 2017-11-29 06:52:48 +0100 |
commit | 59a2afa9fa4a216a7896ecb05565bf83d8a9166f (patch) | |
tree | ab9caf3d85c4c544b3a7519b39861fde851a7398 /addon-cp | |
parent | 99d22ad8a96a847928264f80c340931f37ee7376 (diff) | |
parent | 3b6a11ecfd707e738b6e65c4c179048e77336dfd (diff) | |
download | kubernetes-kafka-59a2afa9fa4a216a7896ecb05565bf83d8a9166f.tar.gz kubernetes-kafka-59a2afa9fa4a216a7896ecb05565bf83d8a9166f.tar.bz2 kubernetes-kafka-59a2afa9fa4a216a7896ecb05565bf83d8a9166f.zip |
Merge remote-tracking branch 'origin/addon-rest' into 1.8-confluent-rest
Diffstat (limited to 'addon-cp')
-rw-r--r-- | addon-cp/confluent-config.yml | 68 | ||||
-rw-r--r-- | addon-cp/rest-service.yml | 10 | ||||
-rw-r--r-- | addon-cp/rest.yml | 43 | ||||
-rw-r--r-- | addon-cp/schemas-service.yml | 10 | ||||
-rw-r--r-- | addon-cp/schemas.yml | 43 |
5 files changed, 174 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..c835ebf --- /dev/null +++ b/addon-cp/rest.yml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: rest + namespace: kafka +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + template: + metadata: + labels: + app: kafka-rest + spec: + containers: + - name: cp + image: solsson/kafka-cp@sha256:89e5b3b326bf8ef888efa9501cd22fb941ca7b5ccef8dfc2f44a1e218f4427e1 + env: + - name: KAFKAREST_LOG4J_OPTS + value: -Dlog4j.configuration=file:/etc/kafka-rest/log4j.properties + command: + - kafka-rest-start + - /etc/kafka-rest/kafka-rest.properties + readinessProbe: + httpGet: + path: / + port: 80 + livenessProbe: + httpGet: + path: / + port: 80 + 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..c762d63 --- /dev/null +++ b/addon-cp/schemas.yml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: schemas + namespace: kafka +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + template: + metadata: + labels: + app: schema-registry + spec: + containers: + - name: cp + image: solsson/kafka-cp@sha256:89e5b3b326bf8ef888efa9501cd22fb941ca7b5ccef8dfc2f44a1e218f4427e1 + 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 + readinessProbe: + httpGet: + path: / + port: 80 + livenessProbe: + httpGet: + path: / + port: 80 + ports: + - containerPort: 80 + volumeMounts: + - name: config + mountPath: /etc/schema-registry + volumes: + - name: config + configMap: + name: confluent-config |