operator-sdk: Error: error reading configuration: open PROJECT: no such file or directory

Bug Report

What did you do?

I’m trying to follow the Generating Manifests and Metadata tutorial, and I’ve executed the kustomize generator cmd in an empty directory:

operator-sdk generate kustomize manifests

What did you expect to see?

I expected the cmd to ask for the missing information and generate the kustomization.yaml and the .clusterserviceversion.yaml files

What did you see instead? Under which circumstances?

The cmd returned this error:

Error: error reading configuration: open PROJECT: no such file or directory

Environment

Operator type:

/language helm

Kubernetes cluster type:

$ operator-sdk version

operator-sdk version: "v1.0.1", commit: "4169b318b578156ed56530f373d328276d040a1b", kubernetes version: "v1.18.2", go version: "go1.13.15 linux/amd64", GOOS: "linux", GOARCH: "amd64"

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.0+b3b92b2", GitCommit:"b3b92b2", GitTreeState:"clean", BuildDate:"2020-07-15T09:27:21Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"linux/amd64"}

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 23 (20 by maintainers)

Most upvoted comments

@jmrodri can you file a kubebuilder issue for skipping PROJECT reads for extra commands, and link it here?

The kubebuilder CLI library needs to read the project file to load the plugin which defines the command. So it makes sense for that file to be read for init and create api, for example.

I agree that we should look to see if we can skip that part for ExtraCommands.