Skip to content

Instantly share code, notes, and snippets.

@jmrodri
Created January 22, 2021 18:30
Show Gist options
  • Save jmrodri/0fb011e5cf04ae4196b92a8e65aa23d5 to your computer and use it in GitHub Desktop.
Save jmrodri/0fb011e5cf04ae4196b92a8e65aa23d5 to your computer and use it in GitHub Desktop.
Can't create a new project if there's already a .git directory.
```
[jesusr@transam demo-zeus-operator]$ operator-sdk init --domain=zeusville.com --repo=github.com/jmrodri/demo-zeus-operator
Error: failed to initialize project with "go.kubebuilder.io/v3": only the go.mod and files with the prefix "(.)" are allowed before the init
Usage:
operator-sdk init [flags]
Examples:
# Scaffold a project using the apache2 license with "The Kubernetes authors" as owners
operator-sdk 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
--plugins strings Name and optionally version of the plugin to initialize the project with. Available plugins: ("ansible.sdk.operatorframework.io/v1", "go.kubebuilder.io/v2", "go.kubebuilder.io/v3", "helm.sdk.operatorframework.io/v1")
--project-name string name of this project
--project-version string project version, possible values: ("2", "3-alpha") (default "3-alpha")
--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:
--verbose Enable verbose logging
FATA[0000] failed to initialize project with "go.kubebuilder.io/v3": only the go.mod and files with the prefix "(.)" are allowed before the init
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment