Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
realgam3 opened this issue Feb 18, 2024 · 0 comments · Fixed by #1831
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@realgam3
Copy link
Contributor

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

@realgam3 realgam3 added the kind/bug Categorizes issue or PR as related to a bug. label Feb 18, 2024
realgam3 added a commit to realgam3/kompose that referenced this issue Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant