diff --git a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/kafka/kafka-deployment.yaml b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/kafka/kafka-deployment.yaml index d6de79a3..188d9746 100644 --- a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/kafka/kafka-deployment.yaml +++ b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/kafka/kafka-deployment.yaml @@ -17,19 +17,41 @@ spec: app: kafka component: kafka-broker spec: + # otherwise we will get an env var "KAFKA_PORT" (from service name: "kafka" and appended with "_PORT") + # and this will cause this problem: https://github.com/confluentinc/cp-docker-images/blob/master/debian/kafka/include/etc/confluent/docker/configure#L58-L62 + # Another solution is to rename the service. + enableServiceLinks: false containers: - - name: kafka - image: wurstmeister/kafka:2.13-2.6.0 - ports: - - containerPort: 9092 - env: - - name: KAFKA_PORT - value: "9092" - - name: KAFKA_ADVERTISED_PORT - value: "9092" - - name: KAFKA_ADVERTISED_HOST_NAME - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: KAFKA_ZOOKEEPER_CONNECT - value: zookeeper:2181 + - name: kafka + image: confluentinc/cp-kafka:7.2.1 + ports: + - containerPort: 9092 + env: + - name: KAFKA_LISTENERS + value: "INTERNAL://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094" + + - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP + value: "INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT" + + - name: KAFKA_ZOOKEEPER_CONNECT + value: "INTERNAL://kafka:9092,OUTSIDE://localhost:9094" + + - name: KAFKA_ADVERTISED_LISTENERS + value: "INTERNAL://kafka:9092,OUTSIDE://localhost:9094" + + - name: KAFKA_INTER_BROKER_LISTENER_NAME + value: "INTERNAL" + + - name: KAFKA_ADVERTISED_HOST_NAME + valueFrom: + fieldRef: + fieldPath: status.podIP + + - name: KAFKA_ZOOKEEPER_CONNECT + value: zookeeper:2181 + + # we have enabled auto creation of topics and when this happens there is a replication factor of 3 + # that is set automatically. Since we don't have that many, producers will fail. + # This setting ensures that there is just one replication + - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR + value: 1 diff --git a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/zookeeper/zookeeper-deployment.yaml b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/zookeeper/zookeeper-deployment.yaml index d4c940b4..3c285c30 100644 --- a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/zookeeper/zookeeper-deployment.yaml +++ b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-configuration-watcher-it/src/test/resources/zookeeper/zookeeper-deployment.yaml @@ -18,12 +18,14 @@ spec: component: zookeeper spec: containers: - - name: zookeeper - image: zookeeper:3.6.2 - ports: - - containerPort: 2181 - env: - - name: ZOOKEEPER_ID - value: "1" - - name: ZOOKEEPER_SERVER_1 - value: zookeeper + - name: zookeeper + image: confluentinc/cp-zookeeper:7.2.1 + ports: + - containerPort: 2181 + env: + - name: ZOOKEEPER_ID + value: "1" + - name: ZOOKEEPER_SERVER_1 + value: zookeeper + - name: ZOOKEEPER_CLIENT_PORT + value: 2181