diff options
author | Zhenhui Xie <xiezh0831@yahoo.co.jp> | 2019-10-05 22:10:16 +0800 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-10-05 23:10:16 +0900 |
commit | bc9e44f45ca9bbdf681fcfe6e23cd0542a54ec60 (patch) | |
tree | 76661c7b28f4b0ee60fde1e924bcea5e2f334427 /src/modules | |
parent | e5d37e0a974c4a6ba1fefd07b510a61259e3ac09 (diff) |
fix: Add disable configuration option to kubernetes module (#491)
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/kubernetes.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/kubernetes.rs b/src/modules/kubernetes.rs index 40de44a98..c646455ea 100644 --- a/src/modules/kubernetes.rs +++ b/src/modules/kubernetes.rs @@ -53,6 +53,9 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { let mut module = context.new_module("kubernetes"); let config: KubernetesConfig = KubernetesConfig::try_load(module.config); + if config.disabled { + return None; + }; module.set_style(config.style); module.get_prefix().set_value(KUBERNETES_PREFIX); |