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] Generated ConfigMap name too long #1738

Closed
ThijsBroersen opened this issue Oct 16, 2023 · 4 comments · Fixed by #1743
Closed

[BUG] Generated ConfigMap name too long #1738

ThijsBroersen opened this issue Oct 16, 2023 · 4 comments · Fixed by #1743
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ThijsBroersen
Copy link
Contributor

Expected Behavior

A kubernetes resource name has a limit of 63 chars. When converting a docker-compose file with a env_file attribute it uses the full path of the resource as the name. This quickly exceeds the 63 char limit.

Actual Behavior

It should restrict the name to filename or relative path (relative to the compose file) and stay withing 63 chars.

Steps To Reproduce

have a docker-compose with a service.
Add to this service a env_file attribute.
convert with kompose
Result is a ConfigMap where the name is a reflection of the full file path.

If the configmap name exceeds 63 then the resources cannot be deployed.

Kompose Version

1.31.2

Docker-Compose file

No response

Anything else?

No response

@ThijsBroersen ThijsBroersen added the kind/bug Categorizes issue or PR as related to a bug. label Oct 16, 2023
@cdrage
Copy link
Member

cdrage commented Oct 18, 2023

@AhmedGrati I noticed this too and the naming is way too long, especially when you execute the file in a nested folder.

@ThijsBroersen
Copy link
Contributor Author

ThijsBroersen commented Oct 20, 2023

Attempt to make a fix: #1743

@StanleyP
Copy link

StanleyP commented Oct 24, 2023

This is really breaks many workflows, it was bad mistake to use absolute filename for configmap naming - not only that its potentially too long.
Can we hope for some fix? @AhmedGrati

@cdrage
Copy link
Member

cdrage commented Oct 24, 2023

This is really breaks many workflows, it was bad mistake to use absolute filename for configmap naming - not only that its potentially too long.

Can we hope for some fix? @AhmedGrati

Hi Stanley, we will get this in within a week :) there is a PR for this

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.

3 participants