Closed
Description
/kind bug
Which area this bug is related to?
/area library
What versions of software are you using?
Operating System:
Go Pkg Version:
devfile/library 1.2.0
Bug Summary
library validation fails with apply
command referencing kubernetes component.
note:
in CRW the devfile with apply
command with kubernetes
component passes the validation, but the command doesn't show up in the workspace explorer (probably apply
not yet implemented)
Expected behavior
apply
command to kubernetes
component is valid use case, in fact it is the only way how to run kubernetes components in other time than on startup
Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.
schemaVersion: 2.1.0
metadata:
name: nodejs
components:
- container:
endpoints:
- name: http-3000
targetPort: 3000
image: registry.access.redhat.com/ubi8/nodejs-14:latest
command:
- sleep
- infinity
name: runtime
- name: job
kubernetes:
inlined: |
apiVersion: batch/v1
kind: Job
metadata:
name: job2
spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
backoffLimit: 4
commands:
- id: install
exec:
commandLine: npm install
component: runtime
workingDir: /projects
group:
isDefault: true
kind: build
- id: start
exec:
workingDir: /projects
commandLine: npm start
component: runtime
group:
isDefault: true
kind: run
- id: run-job
apply:
component: job
* the command "run-job" is invalid - command does not map to a container component