Skip to content

Commit 2636427

Browse files
committed
adds only/exclude
1 parent bd817c8 commit 2636427

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ fn clean_last_applied_configuration(
247247

248248
#[derive(Parser, Default, Debug)]
249249
struct Args {
250+
#[arg(long)]
251+
only: Vec<String>,
252+
#[arg(long)]
253+
exclude: Vec<String>,
250254
output_dir: String,
251255
}
252256

@@ -276,6 +280,14 @@ async fn main() -> anyhow::Result<()> {
276280
continue;
277281
}
278282

283+
if args.exclude.contains(&ar.plural) {
284+
continue;
285+
}
286+
287+
if !args.only.is_empty() && !args.only.contains(&ar.plural) {
288+
continue;
289+
}
290+
279291
println!("Processing {}", ar.plural);
280292

281293
let apis: Vec<Api<DynamicObject>> = if caps.scope == Scope::Cluster {

0 commit comments

Comments
 (0)