Skip to content

Commit

Permalink
fix: remove exclude_daemonsets
Browse files Browse the repository at this point in the history
  • Loading branch information
drmorr0 committed Nov 17, 2024
1 parent c2f14c8 commit 144c133
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 18 deletions.
3 changes: 0 additions & 3 deletions sk-api/schema/v1/simkube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ paths:
required:
- excluded_namespaces
- excluded_labels
- exclude_daemonsets
properties:
excluded_namespaces:
type: array
Expand All @@ -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
Expand Down
14 changes: 2 additions & 12 deletions sk-api/src/v1/export_filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,10 @@ pub struct ExportFilters {
pub excluded_namespaces: Vec<String>,
#[serde(rename = "excluded_labels")]
pub excluded_labels: Vec<metav1::LabelSelector>,
#[serde(rename = "exclude_daemonsets")]
pub exclude_daemonsets: bool,
}

impl ExportFilters {
pub fn new(
excluded_namespaces: Vec<String>,
excluded_labels: Vec<metav1::LabelSelector>,
exclude_daemonsets: bool,
) -> ExportFilters {
ExportFilters {
excluded_namespaces,
excluded_labels,
exclude_daemonsets,
}
pub fn new(excluded_namespaces: Vec<String>, excluded_labels: Vec<metav1::LabelSelector>) -> ExportFilters {
ExportFilters { excluded_namespaces, excluded_labels }
}
}
2 changes: 1 addition & 1 deletion sk-cli/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion sk-cli/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
1 change: 0 additions & 1 deletion sk-store/src/tests/import_export_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ async fn itest_export(#[case] duration: Option<String>) {
match_labels: klabel!("foo" => "bar"),
..Default::default()
}],
exclude_daemonsets: true,
};

let store = s.lock().unwrap();
Expand Down

0 comments on commit 144c133

Please sign in to comment.