-
Notifications
You must be signed in to change notification settings - Fork 772
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
docker-compose service with no ports is mapped to k8s svc with no ports #58
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Comments
@surajssd Good catch. Thanks for that. I will add a validation. |
In Henge we have solved this by interactively asking user to provide missing information. |
Somehow, sometimes we might need interactive mode... but I am not sure at this moment we need it.. |
@surajssd can you take this one ? |
@ngtuna sorry for late comment I will take this one! |
surajssd
added a commit
to surajssd/kompose
that referenced
this issue
Jul 27, 2016
Now when user will not provide any port information a warning will be shown and also service will not be created. Fixes kubernetes#58
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a docker-compose service is given with no ports, a corresponding k8s service is created with no port info, and this is wrong config, because port is required value.
docker-compose.yml
file I used.convert
$ ./kompose convert -f docker-compose-no-ports.yml -o output -y file "output" created $ cat output apiVersion: v1 kind: Service metadata: creationTimestamp: null labels: service: mariadb name: mariadb spec: ports: [] selector: service: mariadb status: loadBalancer: {} --- [SNIP]
When this definition is fed to kubernetes it says:
$ kubectl create -f svc The Service "mariadb" is invalid. spec.ports: Required value
Where
svc
is:IMO this should error out or should not create service, give warning loud and clear that service is not created, but still we can have
deployment
orReplicationController
depending on the provider(k8s/openshift).The text was updated successfully, but these errors were encountered: