File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ func (o *apiOptions) RunAddAPI() {
77
77
if err != nil {
78
78
log .Fatal (err )
79
79
}
80
+ } else {
81
+ // disable generation of example reconcile body if not scaffolding resource
82
+ // because this could result in a fork-bomb of k8s resources where watching a
83
+ // deployment, replicaset etc. results in generating deployment which
84
+ // end up genrating replicaset, pod etc recursively.
85
+ r .CreateExampleReconcileBody = false
80
86
}
81
87
82
88
if o .doController {
@@ -172,6 +178,6 @@ func ResourceForFlags(f *flag.FlagSet) *resource.Resource {
172
178
f .StringVar (& r .Version , "version" , "" , "resource Version" )
173
179
f .BoolVar (& r .Namespaced , "namespaced" , true , "resource is namespaced" )
174
180
f .BoolVar (& r .CreateExampleReconcileBody , "example" , true ,
175
- "true if an example reconcile body should be written" )
181
+ "if true an example reconcile body should be written while scaffolding a resource. " )
176
182
return r
177
183
}
You can’t perform that action at this time.
0 commit comments