Skip to content

The same env_file creates multiple ConfigMaps #1199

Closed
@johnathana

Description

Sample docker-compose.yml:

kafka-1:
image: confluentinc/cp-enterprise-kafka:5.3.1
depends_on:
- zookeeper
env_file:
- kafka-common.env
environment:
- KAFKA_BROKER_ID=1
kafka-2:
image: confluentinc/cp-enterprise-kafka:5.3.1
depends_on:
- zookeeper
env_file:
- kafka-common.env
environment:
- KAFKA_BROKER_ID=2
kafka-3:
image: confluentinc/cp-enterprise-kafka:5.3.1
depends_on:
- zookeeper
env_file:
- kafka-common.env
environment:
- KAFKA_BROKER_ID=3

I would expect the generation of one ConfigMap, but instead I get three of them:

INFO Kubernetes file "kafka-1-deployment.yaml" created
INFO Kubernetes file "kafka-1-kafka-common-env-configmap.yaml" created
INFO Kubernetes file "kafka-2-deployment.yaml" created
INFO Kubernetes file "kafka-2-kafka-common-env-configmap.yaml" created
INFO Kubernetes file "kafka-3-deployment.yaml" created
INFO Kubernetes file "kafka-3-kafka-common-env-configmap.yaml" created

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions