You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can not initialize a project if LICENSE and README exist. Relates to Issue #1971
...
2021/02/10 10:34:18 failed to initialize project with "go.kubebuilder.io/v3": target directory is not empty (only go.mod, go.sum, and files and directories with the prefix "." are allowed); found existing file "LICENSE"
I expected it to create the project since it's basically an empty repo. If I create a git repo in github using their UI and choose to add a license, readme and .gitignore, so I can seed a new operator project, I can't do this.
Go to github, create a new repository
In the *Create a new repository" screen choose the following options:
[jesusr@camaro dev]$ git clone git@github.com:jmrodri/fakerepo.git
Cloning into 'fakerepo'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), 4.72 KiB | 2.36 MiB/s, done.
[jesusr@camaro dev]$ cd fakerepo/
[jesusr@camaro fakerepo{main}]$ ls
LICENSE README.md
[jesusr@camaro fakerepo{main}]$ kubebuilder init --domain zeusville.com --repo github.com/jmrodri/fakerepo
Error: failed to initialize project with "go.kubebuilder.io/v3": target directory is not empty (only go.mod, go.sum, and files and directories with the prefix "." are allowed); found existing file "LICENSE"
Usage:
kubebuilder init [flags]
Examples:
# Scaffold a project using the apache2 license with "The Kubernetes authors" as owners
kubebuilder init --project-version=2 --domain example.org --license apache2 --owner "The Kubernetes authors"
Flags:
--component-config create a versioned ComponentConfig file, may be 'true' or 'false'
--domain string domain for groups (default "my.domain")
--fetch-deps ensure dependencies are downloaded (default true)
-h, --help help for init
--license string license to use to boilerplate, may be one of 'apache2', 'none' (default "apache2")
--owner string owner to add to the copyright
--project-name string name of this project
--repo string name to use for go module (e.g., github.com/user/repo), defaults to the go package of the current working directory.
--skip-go-version-check if specified, skip checking the Go version
Global Flags:
--plugins strings plugin keys of the plugin to initialize the project with
--project-version string project version
2021/02/10 10:34:18 failed to initialize project with "go.kubebuilder.io/v3": target directory is not empty (only go.mod, go.sum, and files and directories with the prefix "." are allowed); found existing file "LICENSE"
Using kubebuilder from master branch.
$ kubebuilder version
Version: main.version{KubeBuilderVersion:"v3.0.0-alpha.0-78-g72f01e58", KubernetesVendor:"unknown", GitCommit:"72f01e58c677219d7af38385a1b249b496391167", BuildDate:"2021-02-10T14:10:30Z", GoOs:"linux", GoArch:"amd64"}
$ go version
go version go1.15.6 linux/amd64
/kind bug
The text was updated successfully, but these errors were encountered:
Can not initialize a project if
LICENSE
andREADME
exist. Relates to Issue #1971I expected it to create the project since it's basically an empty repo. If I create a git repo in github using their UI and choose to add a license, readme and .gitignore, so I can seed a new operator project, I can't do this.
Using kubebuilder from master branch.
/kind bug
The text was updated successfully, but these errors were encountered: