diff --git a/website/content/en/docs/olm-integration/generation.md b/website/content/en/docs/olm-integration/generation.md index 7ca999df83e..2e69e8248ca 100644 --- a/website/content/en/docs/olm-integration/generation.md +++ b/website/content/en/docs/olm-integration/generation.md @@ -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/.clusterserviceversion.yaml` and a `config/manifests/bases/kustomization.yaml` +`config/manifests/bases/.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 @@ -47,7 +47,25 @@ These values will persist when generating a bundle, so make necessary metadata c **For Go Operators only:** the command parses [CSV markers][csv-markers] from Go API type definitions, located in `./api` for single group projects and `./apis` for multigroup projects, to populate certain CSV fields. 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. +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 @@ -57,7 +75,7 @@ themselves; this version is present in both their `metadata.name` and `spec.vers by `generate ` 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.