Skip to content
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

Implement matching of a machine to OpenShift container by pod annotations #8067

Closed
sleshchenko opened this issue Dec 27, 2017 · 0 comments
Closed
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current

Comments

@sleshchenko
Copy link
Member

Description

Now dashboard matches a machine to OpenShift container only by composite machine name podName/containerName.
But in the scope of the following issue there is implemented another way that can be used.
It is needed to implement supporting of matching a machine to OpenShift container by Pod annotations.

So since API allows using the described naming approach Dashboard display wrong machines names.

Workspace config with the described naming approach
{
  "environments": {
    "default": {
      "machines": {
        "typescript-ls": {
          "servers": {
            "ls": {
              "attributes": {
                "internal": "true",
                "type": "ls",
                "config": "{\"id\":\"org.eclipse.che.plugin.web.typescript\", \"documentFilters\":[  {  \"languageId\":\"typescript\",  \"pathRegex\":\".*\\\\.(ts|tsx)\"} ]}"
              },
              "port": "4417",
              "protocol": "tcp"
            }
          },
          "volumes": {
            "projects": {
              "path": "/projects"
            }
          },
          "installers": [],
          "env": {}
        },
        "dev": {
          "attributes": {},
          "servers": {
            "codeserver": {
              "attributes": {},
              "port": "9876",
              "protocol": "http"
            }
          },
          "volumes": {
            "projects": {
              "path": "/projects"
            }
          },
          "installers": [
            "org.eclipse.che.exec",
            "org.eclipse.che.terminal",
            "org.eclipse.che.ws-agent"
          ],
          "env": {}
        }
      },
      "recipe": {
        "type": "openshift",
        "content": "---\nkind: List\nitems:\n-\n  apiVersion: v1\n  kind: Pod\n  metadata:\n    name: ws\n    annotations:\n      org.eclipse.che.container.typescript-ls.machine_name: typescript-ls\n      org.eclipse.che.container.dev.machine_name: dev\n  spec:\n    containers:\n      -\n        image: eivantsov/tsls\n        name: typescript-ls\n      -\n        image: eclipse/ubuntu_jdk8\n        name: dev",
        "contentType": "application/x-yaml"
      }
    }
  },
  "defaultEnv": "default",
  "projects": [
    {
      "links": [],
      "name": "greeter",
      "attributes": {},
      "type": "typescript",
      "source": {
        "location": "https://github.com/Microsoft/TypeScriptSamples.git",
        "type": "git",
        "parameters": {
          "convertToTopLevelProject": "true",
          "keepVcs": "false",
          "keepDir": "greeter"
        }
      },
      "path": "/greeter",
      "problems": [],
      "mixins": []
    }
  ],
  "name": "TypeScript_LS_Demo",
  "commands": [],
  "links": []
}

typescript-ls and dev should be displayed as machines names but actually there are ws/typescript-ls and ws/dev.

screenshot_20171227_140021

@sleshchenko sleshchenko added kind/task Internal things, technical debt, and to-do tasks to be performed. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. team/plugin labels Dec 27, 2017
@olexii4 olexii4 added status/in-progress This issue has been taken by an engineer and is under active development. and removed status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Jan 26, 2018
@olexii4 olexii4 self-assigned this Feb 1, 2018
@olexii4 olexii4 added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Feb 1, 2018
@olexii4 olexii4 removed status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. status/in-progress This issue has been taken by an engineer and is under active development. labels Feb 23, 2018
@olexii4 olexii4 closed this as completed Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current
Projects
None yet
Development

No branches or pull requests

3 participants