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

library validation fails with apply command referencing kubernetes component #647

Closed
kadel opened this issue Oct 15, 2021 · 0 comments · Fixed by devfile/library#120
Closed
Assignees
Labels
area/api Enhancement or issue related to the api/devfile specification area/library Common devfile library for interacting with devfiles kind/bug Something isn't working

Comments

@kadel
Copy link
Member

kadel commented Oct 15, 2021

/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
@openshift-ci openshift-ci bot added kind/bug Something isn't working area/library Common devfile library for interacting with devfiles labels Oct 15, 2021
@yangcao77 yangcao77 self-assigned this Oct 15, 2021
@yangcao77 yangcao77 added the area/api Enhancement or issue related to the api/devfile specification label Oct 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification area/library Common devfile library for interacting with devfiles kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants