-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add an ability to expose K8s/OS tool container port in Workspace Runtime #12808
Comments
@vitaliy-guliy Actually, you already are able to expose containers ports with But if you need multiple containers, then (for time being) you have to use kubernetes/openshift tool where it is possible. And in this case, you are able to define Kubernetes Services/Ingresses, OpenShift Routes for exposing your containers ports BUT Workspace API server won't expose URLs for such objects. Here is an issue for exposing URLs of such objects #12268. Anyway, it would be useful to see an example of your use case in the issue description. |
Also I include a JSON template to create a Factory which covers my case {
"v": "4.0",
"name": "remote_plugin_developer",
"workspace": {
"defaultEnv": "default",
"environments": {
"default": {
"machines": {
"ws/dev-plugin": {
"attributes": {
"memoryLimitBytes": "2684354560"
},
"servers": {
"PluginDev": {
"attributes": {},
"port": "10000",
"protocol": "ws"
}
},
"volumes": {
"projects": {
"path": "/projects"
}
},
"installers": [],
"env": {}
},
"ws/dev": {
"attributes": {
"memoryLimitBytes": "2684354560"
},
"servers": {
"TheiaDev": {
"attributes": {},
"port": "3030",
"protocol": "http"
}
},
"volumes": {
"projects": {
"path": "/projects"
}
},
"installers": [],
"env": {}
}
},
"recipe": {
"type": "kubernetes",
"content": "kind: List\nitems:\n - \n apiVersion: v1\n kind: Pod\n metadata:\n name: ws\n spec:\n containers:\n - \n image: 'eclipse/che-theia-dev:nightly'\n name: dev\n resources:\n limits:\n memory: 3072Mi\n - \n image: 'eclipse/che-theia-dev:nightly'\n name: dev-plugin\n resources:\n limits:\n memory: 2560Mi\n",
"contentType": "application/x-yaml"
}
}
},
"projects": [
{
"links": [],
"name": "theia",
"attributes": {},
"type": "blank",
"source": {
"location": "https://github.com/theia-ide/theia.git",
"type": "git",
"parameters": {}
},
"path": "/theia",
"description": "",
"mixins": [],
"problems": []
}
],
"name": "remote_plugin_developer",
"attributes": {
"editor": "org.eclipse.che.editor.theia:1.0.0",
"plugins": "che-machine-exec-plugin:0.0.1"
},
"commands": [],
"links": []
}
} |
@vitaliy-guliy could we close it ? as we managed to do it with https://github.com/sunix/devfiles/blob/e4dc471ed71b2f488a98b304ff49117e4304c2ac/che-in-che/che-theia-remote.devfile.yaml ? |
@sunix Thanks for sharing a way how you solved this issue with dockerimage tool. |
OK so maybe rename this issue to be more precise of what is not working :) or create a new issue ? WDYT ? |
@sunix I'll modify the current issue. |
Issue description is updated. Hope everything is clear enough. Everybody - feel free to modify issue description or ask me missing details. |
Thanks @sleshchenko i am not sure to understand the |
@sunix Here I mean propagating server URL via Workspace API, like we do with Theia (or any other servers) URL |
@sleshchenko |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
Outdated |
Show motivation description
With Workspace Config, there is an ability to define that Container exposed some port (with server config entry in machine configuration) and then it is possible to get publicly available URL (powered by Ingress/Route) via Che Server API (it's
Workspace#Runtime#Machines[n]#Servers
).And there are two main reasons why users may want to expose their containers ports with Che Server API:
Detailed Theia Dev Use case description
In my use case I need a workspace with Theia editor and two custom containers which I use to launch another instance of Theia and remote plugin. This two containers must have exposed ports. One is for Theia http server, another one is for remote plugin which opens a websocket server.
Theia has to know URI to the plugin server which is taken from workspace runtime.
In the Dockerfile I use
kubernetes
tool to describe custom containers.For those containers I need to describe exposes ports 3030 and 10000.
Here are my files from which I create my workspace.
.devfile
dev.yaml
The text was updated successfully, but these errors were encountered: