Skip to content

Commit 0a9c86e

Browse files
committed
feat: Add warning on empty filters
1 parent 756f790 commit 0a9c86e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ async fn main() -> std::io::Result<()> {
3535
}
3636
};
3737

38+
if config.container_labels.is_empty() && config.container_names.is_empty() {
39+
warn!("You have not defined any filters! All containers will be exposed. If you are using docker-proxy-filter only for SCRUB_ENVS then this is expected behavior, otherwise check your environmental variables.");
40+
}
41+
3842
let cm = AppStateWithContainerMap {
3943
container_map: Arc::new(Mutex::new(HashMap::<String, Option<bool>>::new()))
4044
};

src/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::config::ContainerLabels;
2-
use core::num;
32
use std::collections::HashMap;
43
use tracing::*;
54

0 commit comments

Comments
 (0)