-
Notifications
You must be signed in to change notification settings - Fork 792
[Feature] customizing service name #1635
Copy link
Copy link
Closed as not planned
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Description
What would you like to be added?
Now when creating Service and Deployment out of docker-compose.yaml service name is used for Kubernetes resource naming which cannot be customized out-of-the-box (e.g. providing environment variables for docker-compose.yaml during docker compose config)
- Option would be to have kompose label (e.g. kompose.name-override) which would allow modifying Kubernetes resource name
- Option would be to provide flag during
kompose convertwhich would apply it as a prefix for all resources
Using container_name only changes container name within Pod.
Using kompose.service.group partially lets us achieve goal because Services are left with the same name as it is in docker-compose.yaml
Currently, we are solving that with string replace
docker-compose.yaml
services:
prefix-service-a:
image: xxx:latest
ports:
- "9999:9999"
prefix-service-b:
image: yyy:latest
ports:
- "8888:8888"
environment:
URL: http://prefix-xxx:9999
and then applying sed -i -e "s/prefix-/${random-uuid}/g" docker-compose.yaml before kompose convert
Why is this needed?
Kubernetes Service name cannot be customized when generating resources from docker-compose.yaml
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.