Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

How to avoid issues with k8s service number limit in WS.NEXT #934

Closed
garagatyi opened this issue Sep 27, 2018 · 12 comments
Closed

How to avoid issues with k8s service number limit in WS.NEXT #934

garagatyi opened this issue Sep 27, 2018 · 12 comments

Comments

@garagatyi
Copy link

garagatyi commented Sep 27, 2018

Issue problem:
In WS.NEXT we use k8s services for sidecars service discovery. This means that Theia (2 endpoints) + 3 plugin sidecars might generate 5 services. Apart from that, Che generates a service for each container in a workspace to expose public ports of servers (including sidecar's public endpoints).
Right now we have a limit of 5 services in OSIO namespace and this leads us to a situation when WS.NEXT workspace hits quota issue.
We can optimize the usage of services by public servers/endpoints to 1 per pod.
But we still have issues in a case when even 3 plugins with sidecars are used. An example is a WS with

  • terminal/exec sidecar
  • JDT.LS sidecar
  • Bayesian sidecar

Such a workspace would not be able to start because of quotas. We need to find a solution for that.

@garagatyi
Copy link
Author

@sleshchenko @l0rd @ibuziuk FYI

ibuziuk added a commit to fabric8-services/fabric8-tenant-che that referenced this issue Sep 27, 2018
@ibuziuk
Copy link
Member

ibuziuk commented Sep 27, 2018

@garagatyi what do you think would be the appropriate number of services ? We might be able to simply update the limits after discussing with SD ?

[1] https://github.com/fabric8-services/fabric8-tenant-che/blob/master/packages/fabric8-tenant-che-quotas-oso/src/main/fabric8/object-counts-rq.yml#L10

GitHub
Generates Che tenant namespace YAML. Contribute to fabric8-services/fabric8-tenant-che development by creating an account on GitHub.

@amisevsk
Copy link
Collaborator

@ibuziuk I feel like this could be a problem in general, if plugins are allowed to require a service. It would mean the service number quota would govern how many plugins can be added to a workspace.

@garagatyi
Copy link
Author

We can tune it but @amisevsk is right - we need to think what solution would be the best in a long term

@l0rd
Copy link
Contributor

l0rd commented Sep 27, 2018

Good catch @garagatyi. Anyway not all plugins will run in a separate container. I think that 10 services should be enough for 90% of the cases. 15 services would be even better. Let's ask SD team if we can increase it to 15.

@ibuziuk
Copy link
Member

ibuziuk commented Sep 27, 2018

PR where we could start discussion with SD regarding service quota increase - fabric8-services/fabric8-tenant-che#113

@amisevsk
Copy link
Collaborator

@garagatyi Wouldn't it be possible to have a single "plugins" service that maps all of the appropriate ports? This could avoid the issue entirely. On the provisioning end, this could be done by simply modifying SidecarServicesProvisioner#provision().

@garagatyi
Copy link
Author

We use endpoints names for service discovery. As far as I know it is only possible to do that with setting a service name equal to an endpoint name.

@ibuziuk
Copy link
Member

ibuziuk commented Oct 2, 2018

PR have been merged fabric8-services/fabric8-tenant-che#113 now there are new 15 quota for number of services. @garagatyi if it is the last change that is planned regarding fabric8-tenant-che we could request cluster wide tenant update.

@garagatyi
Copy link
Author

I created an issue to optimize usage of l8s services eclipse-che/che#11452

@ibuziuk
Copy link
Member

ibuziuk commented Oct 3, 2018

can we simply close this issue since 15 services should be enough for osio until eclipse-che/che#11452 is fixed ?

@garagatyi
Copy link
Author

yes, I agree

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants