Skip to content

[BUG] Generated ConfigMap name too long #1738

@ThijsBroersen

Description

@ThijsBroersen

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

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