1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/osdk-cli-ref-init.adoc
2022-02-16 13:36:46 +00:00

36 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * cli_reference/osdk/cli-osdk-ref.adoc
// * operators/operator_sdk/osdk-cli-ref.adoc
[id="osdk-cli-ref-init_{context}"]
= init
The `operator-sdk init` command initializes an Operator project and generates, or _scaffolds_, a default project directory layout for the given plug-in.
This command writes the following files:
* Boilerplate license file
* `PROJECT` file with the domain and repository
* `Makefile` to build the project
* `go.mod` file with project dependencies
* `kustomization.yaml` file for customizing manifests
* Patch file for customizing images for manager manifests
* Patch file for enabling Prometheus metrics
* `main.go` file to run
.`init` flags
[options="header",cols="1,3"]
|===
|Flag |Description
|`--help, -h`
|Help output for the `init` command.
|`--plugins` (string)
|Name and optionally version of the plug-in to initialize the project with. Available plug-ins are `ansible.sdk.operatorframework.io/v1`, `go.kubebuilder.io/v2`, `go.kubebuilder.io/v3`, and `helm.sdk.operatorframework.io/v1`.
|`--project-version`
|Project version. Available values are `2` and `3-alpha`, which is the default.
|===