-
Notifications
You must be signed in to change notification settings - Fork 770
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
RFE: choosing Service type #154
Comments
+1. I wonder if we should make the labels kompose specific though. This would probably be a good thing for @pradeepto to weigh in on. |
Otherwise, we can add |
I was also thinking about about doing this via cmd flag. Benefit of doing it via label is that you do it only once. You edit file, commit it and than you can forget about it, and you have everything in one file. Now when I'm thinking about it, this could be also in preference file. it can be just list of public service names expose:
- foo.bar.example.com=frontend # this will create Ingress/Route
- frontend # this will create just LoadBalancer service |
Or how about the user mentions in preference file something like this: profiles:
default:
provider: kubernetes
objects:
- deployment
- replicaset
- ingress
current-context: default And we can have rules defined internally like if ingress is given what will be the service type? |
Ingress can be used with both ClusterIP or LoadBalancer. |
I hit the same issue today. Labels would work for my usecase. Namespacing them to kompose makes sense. Note that labels should ideally be reverse DNS namespaced (see https://docs.docker.com/engine/userguide/labels-custom-metadata/), so (unless you also own a specific kompose domain) something like:
|
while loadbalancer services are needed in prod, let's not forget about the dev use case who may want to create a nodeport. |
Agreed, once we do this we should support all three Service types. |
I like the use of labels for this. |
@kadel Can I work on this issue if no one else is working on it. |
Can someone assign this issue to @procrypt ? |
@procrypt I just sent you an invite, you need to accept so that we can assign you tickets. |
@sebgoa I have accepted the invite. |
Is not clear for me, can I create an Ingress yet? using |
@juanpastas what do you mean by Ingress ? If you mean an ingress rule (assuming you have an ingress controller running), the answer is no. Every Docker service in the compose file gets exposed via a Kubernetes service. By default this service is of cluster IP type. If you want to automatically generate a nodeport or load balancer type service you can specify that using a label in your compose file. |
@juanpastas you can have ingress created automatically for you once we have PR #285 merged |
Hi @juanpastas, currently none of those are possible to change with kompose. In future we might add something to allow specifying size of volumes. |
When I'm using
kompose up
sometimes I need to change Service type.Right now we generate services that are
ClusterIP
, but sometimes I want to have service exposed to outside of the cluster, than I have to manually change type and set it toLoadBalancer
.It would be nice to have a way to specify type of services.
Proposal:
Use image label in docker-compose.yml to set type of services.
By default we would still create
ClusterIP
services, but when there is a specific label we would createLoadBalancer
example:
we could use labels to specify Ingress/Route #140
The text was updated successfully, but these errors were encountered: