Skip to content

[BUG] pod env_file does not create configmaps #1683

@realgam3

Description

@realgam3

Expected Behavior

docker-compose:

version: "3"

services:
  pod:
    image: busybox
    env_file:
      - "envs/pod.env"
    restart: "no"

  deployment:
    image: busybox
    env_file:
      - "envs/deployment.env"
    restart: "always"
  • Should create 2 ConfigMaps: envs-deployment-env & envs-pod-env.

Actual Behavior

Creates only 1 ConfigMap: envs-deployment-env

  • in Windows it fails to create any ConfigMap.
    reason: service.EnvFile is not relative and it cause issues with some functions.

Steps To Reproduce

  1. Create envs directory
  2. Create 2 files envs/deployment.env and envs/pod.env with the contents of TEST=TEST
  3. Run command: kompose convert

Kompose Version

1.30.0 
Branch: main
Commit: 17fbe3b4632cca0f61a7fda5f3b91034cdf5c5e4

Docker-Compose file

version: "3"

services:
  pod:
    image: busybox
    env_file:
      - "envs/pod.env"
    restart: "no"

  deployment:
    image: busybox
    env_file:
      - "envs/deployment.env"
    restart: "always"

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