add warning that tells why the service is not created #1326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
First off, thanks for providing this great tool!
But, I've found a point I want to improve, so let me report it with a patch.
Assuming well-known ports and most middlewares whose ports are EXPOSEed in docker image, we often omits the ports directive in docker-compose.yml.
And when converting such docker-compose.yml to k8s manifests by kompose, the creation of service is implicitly skipped.
I know that mentioning about ports exists in the Label section: https://kompose.io/user-guide/#labels
I don't think this behavior is irrational, but on the other hand, I'm thinking it useful to be more explicit about this behavior for k8s beginners.
This patch makes kompose print a warning if no ports are specified and it is not Headless.
I don't stick to this way, but hope that the behavior about this issue will be improved.
Thanks,