---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kafka-rest-proxy
  namespace: kafka
  labels:
    app: kafka-rest-proxy
spec:
  replicas: 2
  selector:
    matchLabels:
      app: kafka-rest-proxy
  template:
    metadata:
      labels:
        app: kafka-rest-proxy
    spec:
      containers:
      - name: kafka-rest-proxy
        image: confluentinc/cp-kafka-rest:5.0.0
        ports:
        - containerPort: 8082
        env:
        - name: KAFKA_REST_ID
          value: "1"
        - name: KAFKA_REST_BOOTSTRAP_SERVERS
          value: bootstrap:9092
        - name: KAFKA_REST_ZOOKEEPER_CONNECT
          value: zookeeper:2181
        - name: KAFKA_REST_LISTENERS
          value: http://0.0.0.0:8082
        - name: KAFKA_REST_SCHEMA_REGISTRY_URL
          value: http://$(CP_SCHEMA_REGISTRY_SERVICE_HOST):$(CP_SCHEMA_REGISTRY_SERVICE_PORT)
        - name: KAFKA_REST_HOST_NAME
          value: http://35.239.231.151
        - name: KAFKA_REST_DEBUG
          value: "true"