Skip to content

[BUG] ConfigMap name clash if env_file name is equal #2000

@robertaistleitner

Description

@robertaistleitner

Expected Behavior

All the used env_file configs should result in a separate ConfigMap file, even though the file name is the same. For this to work, the path of the file needs to be included in the file name to be unique.

Actual Behavior

If you use two env_files in docker-compose which are located in different folders and have the same name (e.g. one/custom.env and two/custom.env) this results in only one ConfigMap file in the rendered result. One env file is lost in the rendering.

Steps To Reproduce

No response

Kompose Version

1.35.0 (9532ceef3)

Docker-Compose file

services:
    nginx:
        image: nginx
        env_file:
            - ./one/custom.env
            - ./two/custom.env

Anything else?

No response

Metadata

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