@@ -23,11 +23,11 @@ See this [CLI overview][cli-overview] for details on each command.
23
23
### Kustomize files
24
24
25
25
` operator-sdk generate kustomize manifests ` generates a CSV kustomize base
26
- ` config/manifests/bases/<project-name>.clusterserviceversion.yaml ` and a ` config/manifests/bases/ kustomization.yaml `
26
+ ` config/manifests/bases/<project-name>.clusterserviceversion.yaml ` and a ` config/manifests/kustomization.yaml `
27
27
by default. These files are required as ` kustomize build ` input in downstream commands.
28
28
29
29
By default, the command starts an interactive prompt if a CSV base in ` config/manifests/bases ` is not present
30
- to collect [ UI metadata] ( #csv-fields ) . You can disable the interactive prompt by passing ` --kustomize =false ` .
30
+ to collect [ UI metadata] ( #csv-fields ) . You can disable the interactive prompt by passing ` --interactive =false ` .
31
31
32
32
``` console
33
33
$ operator-sdk generate kustomize manifests
@@ -47,7 +47,25 @@ These values will persist when generating a bundle, so make necessary metadata c
47
47
** For Go Operators only:** the command parses [ CSV markers] [ csv-markers ] from Go API type definitions, located
48
48
in ` ./api ` for single group projects and ` ./apis ` for multigroup projects, to populate certain CSV fields.
49
49
You can set an alternative path to the API types root directory with ` --apis-dir ` . These markers are not available
50
- to Ansible or Helm project types.
50
+ to Ansible or Helm project types.
51
+
52
+ The command attempts to process the local types defined in your API.
53
+ If you import a package that uses the same name as a local type, running the command causes an infinite loop. For example:
54
+ ``` go
55
+ type PodStatus struct {
56
+ SomeField string
57
+ // imported type with the same name will infinitely trigger
58
+ // the parser to process the local PodStatus type
59
+ Status v1.PodStatus
60
+ }
61
+ ```
62
+ To prevent an infinite loop, edit the local type definition to use a different name. For example:
63
+ ``` go
64
+ type PodStatusWrapper struct {
65
+ SomeField string
66
+ Status v1.PodStatus
67
+ }
68
+ ```
51
69
52
70
### ClusterServiceVersion manifests
53
71
@@ -57,7 +75,7 @@ themselves; this version is present in both their `metadata.name` and `spec.vers
57
75
by ` generate <bundle|packagemanifests> ` requires certain input manifests to construct a CSV manifest; all inputs
58
76
are read when either command is invoked, along with a CSV's [ base] ( #kustomize-files ) , to idempotently regenerate a CSV.
59
77
60
- The following resource kinds are typically included in a CSV, which are addressed by ` config/manifests/bases/ kustomization.yaml ` :
78
+ The following resource kinds are typically included in a CSV, which are addressed by ` config/manifests/kustomization.yaml ` :
61
79
- ` Role ` : define Operator permissions within a namespace.
62
80
- ` ClusterRole ` : define cluster-wide Operator permissions.
63
81
- ` Deployment ` : define how the Operator's operand is run in pods.
0 commit comments