From 144c13345002dd817dd433aec8e10f142b2138ec Mon Sep 17 00:00:00 2001 From: David Morrison Date: Sat, 16 Nov 2024 22:23:12 -0800 Subject: [PATCH] fix: remove exclude_daemonsets --- sk-api/schema/v1/simkube.yml | 3 --- sk-api/src/v1/export_filters.rs | 14 ++------------ sk-cli/src/export.rs | 2 +- sk-cli/src/snapshot.rs | 2 +- sk-store/src/tests/import_export_test.rs | 1 - 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sk-api/schema/v1/simkube.yml b/sk-api/schema/v1/simkube.yml index 7ba7869d..6fe82e89 100644 --- a/sk-api/schema/v1/simkube.yml +++ b/sk-api/schema/v1/simkube.yml @@ -36,7 +36,6 @@ paths: required: - excluded_namespaces - excluded_labels - - exclude_daemonsets properties: excluded_namespaces: type: array @@ -46,8 +45,6 @@ paths: type: array items: $ref: 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/v3/api__v1_openapi.json#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector' # yamllint disable-line rule:line-length - exclude_daemonsets: - type: boolean responses: '200': description: OK diff --git a/sk-api/src/v1/export_filters.rs b/sk-api/src/v1/export_filters.rs index c1516a0f..dfd9a3c8 100644 --- a/sk-api/src/v1/export_filters.rs +++ b/sk-api/src/v1/export_filters.rs @@ -16,20 +16,10 @@ pub struct ExportFilters { pub excluded_namespaces: Vec, #[serde(rename = "excluded_labels")] pub excluded_labels: Vec, - #[serde(rename = "exclude_daemonsets")] - pub exclude_daemonsets: bool, } impl ExportFilters { - pub fn new( - excluded_namespaces: Vec, - excluded_labels: Vec, - exclude_daemonsets: bool, - ) -> ExportFilters { - ExportFilters { - excluded_namespaces, - excluded_labels, - exclude_daemonsets, - } + pub fn new(excluded_namespaces: Vec, excluded_labels: Vec) -> ExportFilters { + ExportFilters { excluded_namespaces, excluded_labels } } } diff --git a/sk-cli/src/export.rs b/sk-cli/src/export.rs index 4d1126f0..2c25216b 100644 --- a/sk-cli/src/export.rs +++ b/sk-cli/src/export.rs @@ -60,7 +60,7 @@ pub struct Args { } pub async fn cmd(args: &Args) -> EmptyResult { - let filters = ExportFilters::new(args.excluded_namespaces.clone(), vec![], true); + let filters = ExportFilters::new(args.excluded_namespaces.clone(), vec![]); let req = ExportRequest::new(args.start_time, args.end_time, args.output_path.clone(), filters); let endpoint = format!("{}/export", args.tracer_address); diff --git a/sk-cli/src/snapshot.rs b/sk-cli/src/snapshot.rs index e39c0820..55da9ea9 100644 --- a/sk-cli/src/snapshot.rs +++ b/sk-cli/src/snapshot.rs @@ -77,7 +77,7 @@ pub async fn cmd(args: &Args) -> EmptyResult { js.shutdown().await; println!("Exporting snapshot data from store..."); - let filters = ExportFilters::new(args.excluded_namespaces.clone(), vec![], true); + let filters = ExportFilters::new(args.excluded_namespaces.clone(), vec![]); let start_ts = UtcClock.now_ts(); let end_ts = start_ts + 1; let data = store.lock().unwrap().export(start_ts, end_ts, &filters)?; diff --git a/sk-store/src/tests/import_export_test.rs b/sk-store/src/tests/import_export_test.rs index f0536e91..ffea3294 100644 --- a/sk-store/src/tests/import_export_test.rs +++ b/sk-store/src/tests/import_export_test.rs @@ -122,7 +122,6 @@ async fn itest_export(#[case] duration: Option) { match_labels: klabel!("foo" => "bar"), ..Default::default() }], - exclude_daemonsets: true, }; let store = s.lock().unwrap();