Skip to content

Commit 4c539e5

Browse files
committed
feat!: Add CommonStackableCliArgs struct
1 parent 20659fe commit 4c539e5

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

crates/stackable-operator/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- Add a `CommonStackableCliArgs` struct, which can be used for non-operator Stackable tools ([#10XX]).
10+
11+
### Changed
12+
13+
- BREAKING: The `telemetry` and `cluster_info` fields of `ProductOperatorRun` have moved below the `common` field ([#10XX]).
14+
15+
[#10XX]: https://github.com/stackabletech/operator-rs/pull/10XX
16+
717
## [0.95.0] - 2025-08-21
818

919
### Added

crates/stackable-operator/src/cli.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,28 @@ pub enum Command<Run: Args = ProductOperatorRun> {
230230
#[derive(clap::Parser, Debug, PartialEq, Eq)]
231231
#[command(long_about = "")]
232232
pub 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

Comments
 (0)