odo: odo create should not require cluster access to function

/kind bug

What versions of software are you using?

Operating System: macOS 10.15.6

Output of odo version: odo v1.2.5 (927826e8d)

How did you run odo exactly?

odo create java-quarkus without being connected to a cluster

Actual behavior

✗  You don't have permission to create or set project 'default' or the project doesn't exist. Please create or set a different project
        odo project create|set <project_name>

Expected behavior

odo should create my component without issue. I should be able to work with odo without a cluster up to the moment I actually want to push to the cluster.

Any logs, error output, etc?

See above.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Currently odo create saves project/namespace name into env.yaml. We need to defer this to a later stage (odo push).

Acceptance criteria:

  • odo create is not doing anything with the cluster it should not even read anything from KUBECONFIG. It needs to work even without Kubernetes client configuration.
  • If the user runs just odo create without --project the project name should not be added to env.yaml
 # env.yaml
 ComponentSettings:
   Name: java
   AppName: app
  • If the user runs odo create with --project. The Project will be recorded in env.yaml. There should be no check to verify if project/namespace exists or not.
    # env.yaml
    ComponentSettings:
      Name: java
      Project: myproject
      AppName: app
    
  • odo push can already handle a situation where there is no env.yaml. It will also need to handle a situation where env.yaml doesn’t have specify Project. So for example with
    # env.yaml
    ComponentSettings:
      Name: java
      AppName: app
    
    odo push command will first have to populate Project field with the default value (current project/namespace name) and then perform push action.

Still an issue. Could.someone add frozen ?

Same for odo catalog list components https://github.com/openshift/odo/issues/3779