@@ -230,17 +230,28 @@ pub enum Command<Run: Args = ProductOperatorRun> {
230230#[ derive( clap:: Parser , Debug , PartialEq , Eq ) ]
231231#[ command( long_about = "" ) ]
232232pub struct ProductOperatorRun {
233+ #[ command( flatten) ]
234+ pub common : CommonStackableCliArgs ,
235+
236+ #[ command( flatten) ]
237+ pub operator_environment : OperatorEnvironmentOptions ,
238+
233239 /// Provides the path to a product-config file
234240 #[ arg( long, short = 'p' , value_name = "FILE" , default_value = "" , env) ]
235241 pub product_config : ProductConfigPath ,
236242
237243 /// Provides a specific namespace to watch (instead of watching all namespaces)
238244 #[ arg( long, env, default_value = "" ) ]
239245 pub watch_namespace : WatchNamespace ,
246+ }
240247
241- #[ command( flatten) ]
242- pub operator_environment : OperatorEnvironmentOptions ,
243-
248+ /// All the CLI arguments that all (or at least most) Stackable applications use.
249+ ///
250+ /// [`ProductOperatorRun`] is intended for operators, but it has fields that are not needed for
251+ /// utilities such as `user-info-fetcher` or `opa-bundle-builder`. So this struct offers a limited
252+ /// set, that should be shared across all Stackable tools running in Kubernetes.
253+ #[ derive( clap:: Parser , Debug , PartialEq , Eq ) ]
254+ pub struct CommonStackableCliArgs {
244255 #[ command( flatten) ]
245256 pub telemetry : TelemetryOptions ,
246257
0 commit comments