Update documentation for generating manifests
@@ -23,11 +23,11 @@ See this [CLI overview][cli-overview] for details on each command.
### Kustomize files
`operator-sdk generate kustomize manifests` generates a CSV kustomize base
-`config/manifests/bases/<project-name>.clusterserviceversion.yaml` and a `config/manifests/bases/kustomization.yaml`
+`config/manifests/bases/<project-name>.clusterserviceversion.yaml` and a `config/manifests/kustomization.yaml`
by default. These files are required as `kustomize build` input in downstream commands.
By default, the command starts an interactive prompt if a CSV base in `config/manifests/bases` is not present
-to collect [UI metadata](#csv-fields). You can disable the interactive prompt by passing `--kustomize=false`.
+to collect [UI metadata](#csv-fields). You can disable the interactive prompt by passing `--interactive=false`.
```console
$ operator-sdk generate kustomize manifests
@@ -49,6 +49,24 @@ in `./api` for single group projects and `./apis` for multigroup projects, to po
You can set an alternative path to the API types root directory with `--apis-dir`. These markers are not available
to Ansible or Helm project types.
+The command attempts to process the local types defined in your API.
+If you import a package that uses the same name as a local type, running the command causes an infinite loop. For example:
+```go
+type PodStatus struct {
+ SomeField string
+ // imported type with the same name will infinitely trigger
+ // the parser to process the local PodStatus type
+ Status v1.PodStatus
+}
+```
+To prevent an infinite loop, edit the local type definition to use a different name. For example:
+```go
+type PodStatusWrapper struct {
+ SomeField string
+ Status v1.PodStatus
+}
+```
+
### ClusterServiceVersion manifests
CSV's are manifests that define all aspects of an Operator, from what CustomResourceDefinitions (CRDs) it uses to
@@ -57,7 +75,7 @@ themselves; this version is present in both their `metadata.name` and `spec.vers
by `generate <bundle|packagemanifests>` requires certain input manifests to construct a CSV manifest; all inputs
are read when either command is invoked, along with a CSV's [base](#kustomize-files), to idempotently regenerate a CSV.
-The following resource kinds are typically included in a CSV, which are addressed by `config/manifests/bases/kustomization.yaml`:
+The following resource kinds are typically included in a CSV, which are addressed by `config/manifests/kustomization.yaml`:
- `Role`: define Operator permissions within a namespace.
- `ClusterRole`: define cluster-wide Operator permissions.
- `Deployment`: define how the Operator's operand is run in pods.
