kubernetes / kompose

Convert Compose to Kubernetes

Home Page:http://kompose.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Creating ConfigMaps from volume mounts with CRLF characters should be converted as text and not binary.

realgam3 opened this issue · comments

Expected Behavior

utils.IsText is sensitive to windows line separator (CRLF - \r\n) so it is possible to convert CRLF to LF (like DOS2Unix) in order to make sure the ConfigMap will be tagged correctly as text

Actual Behavior

The ConfigMap tagged as Binary

Steps To Reproduce

  1. Create file in ./tls/a.key along to the docker-compose.yml file (use CRLF instead of LF as line separator)
  2. Run -f C:\another-path\docker-compose.yml convert --stdout --with-kompose-annotation=false command from another path
  3. Check if ConfigMap created as binary

Kompose Version

1.32.0

Docker-Compose file

version: "3"

services:
  web:
    image: nginx
    volumes:
      - ./tls/a.key:/etc/test-a-key.key
    labels:
      kompose.volume.type: configMap

Anything else?

No response