`Annotation key is too long` error when starting workspace, created from devfile
See original GitHub issueDescription
When try to start workspace form some devfiles it fails to start with error message:
Failure executing: POST at: https://172.30.0.1/apis/apps/v1/namespaces/eclipse-che/deployments. Message: Deployment.apps \"workspacet0so790bumywjht3.workspace\" is invalid: spec.template.annotations: Invalid value: \"org.eclipse.che.container.eclipse-che-theia-dev-nightly.machine_name\": name part must be no more than 63 characters. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.template.annotations, message=Invalid value: \"org.eclipse.che.container.eclipse-che-theia-dev-nightly.machine_name\": name part must be no more than 63 characters, reason=FieldValueInvalid, additionalProperties={})], group=apps, kind=Deployment, name=workspacet0so790bumywjht3.workspace, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Deployment.apps \"workspacet0so790bumywjht3.workspace\" is invalid: spec.template.annotations: Invalid value: \"org.eclipse.che.container.eclipse-che-theia-dev-nightly.machine_name\": name part must be no more than 63 characters, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
Reproduction Steps
- Create workspace from the following devfile using
POST /workspace/devfile
API method
{
"specVersion": "0.0.1",
"name": "multiple-dockerimages",
"projects": [
{
"name": "nodejs-mongo-app",
"source": {
"type": "git",
"location": "https://github.com/ijason/NodeJS-Sample-App.git"
}
}
],
"components": [
{
"name": "theia-editor",
"type": "cheEditor",
"id": "eclipse/che-theia/next"
},
{
"name": "exec-plugin",
"type": "chePlugin",
"id": "eclipse/che-machine-exec-plugin/0.0.1"
},
{
"name": "mongodb",
"type": "dockerimage",
"image": "eclipse/che-theia-dev:nightly",
"endpoints": [
{
"name": "mongo",
"port": 27017,
"attributes": {
"public": "false",
"discoverable": "true"
}
}
],
"mountSources": true,
"volumes": [
{
"name": "mongo-storage",
"containerPath": "/data/db"
}
],
"memoryLimit": "2500Mi"
},
{
"name": "nodejs-app",
"type": "openshift",
"reference": "node-js.yaml",
"referenceContent": "apiVersion: v1\nkind: List\nitems:\n-\n apiVersion: apps/v1\n kind: Deployment\n metadata:\n name: web\n labels:\n app: nodejs\n spec:\n replicas: 2\n selector:\n name: web\n template:\n metadata:\n labels:\n app: nodejs\n name: web-controller\n spec:\n containers:\n - image: node:0.10.40\n command: ['tail', '-f', '/dev/null']\n args: []\n name: web\n ports:\n - containerPort: 3000\n name: http-server\n volumeMounts:\n - mountPath: /projects\n name: projects\n volumes:\n - name: projects\n persistentVolumeClaim:\n claimName: projects\n- apiVersion: v1\n kind: PersistentVolumeClaim\n metadata:\n name: projects\n spec:\n accessModes:\n - ReadWriteOnce\n resources:\n requests:\n storage: 2Gi\n-\n apiVersion: v1\n kind: Service\n metadata:\n name: web\n labels:\n name: web\n spec:\n type: LoadBalancer\n ports:\n - name: web\n port: 80\n targetPort: 3000\n protocol: TCP\n selector:\n app: nodejs\n- apiVersion: v1\n kind: Route\n metadata:\n name: che\n spec:\n to:\n kind: Service\n name: web\n port:\n targetPort: web\n"
}
],
"commands": [
{
"name": "run",
"actions": [
{
"type": "exec",
"component": "nodejs-app",
"command": "cd ${CHE_PROJECTS_ROOT}/nodejs-mongo-app/EmployeeDB/ && npm install && node app.js"
}
]
}
]
}
Note, that this problem occurs when replace mongo
with something longer, say eclipse/che-theia-dev:nightly
.
- Try to start the workspace
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Chapter 4. Authoring devfiles - Red Hat Customer Portal
When launching a workspace within a Git repository using a factory, the project from the given repository and branch is be created by...
Read more >Using a customized devfile to create a workspace - IBM
Select the Custom Workspace tab. For a custom devfile enter a public URL, then click Load Devfile. Note: You can also copy and...
Read more >Re: [che-dev] How to collect and persist all workspace logs? - Eclipse
For me the debug mode is just a toggle that modifies how you start a workspace, but the workspace definition, i.e. the devfile,...
Read more >OpenShift Container Platform 4.8 release notes
Use workspaces when creating pipelines in the pipeline builder. ... HTTP/2 on a OpenShift Container Platform 4.7 cluster and checking for HTTP 400...
Read more >Gerald Nunn | GExperts Inc | Page 2
For those not familiar with using remote repositories, you can have a kustomization that imports bases and resources from a git repository ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finally closed 🎉
Ok, that’s a 7.0 for me then. What we ship should at least start up out of the box.