diff --git a/src/get/daemonset.rs b/src/get/daemonset.rs index ee9752e..134c9d7 100644 --- a/src/get/daemonset.rs +++ b/src/get/daemonset.rs @@ -61,14 +61,14 @@ impl Lister<(usize, String, PodmanPodInfo)> for DaemonsetLister { "NAMESPACE", "NAME", "DESIRED", "CURRENT", "READY", "UP-TO-DATE", "AVAILABLE", "NODE SELECTOR", "AGE" ); let num_nodes = items.first().unwrap().0; - let pods = items.into_iter().fold(HashMap::>::new(), |mut acc, (num_nodes, depl, pod)| { + let pods = items.into_iter().fold(HashMap::>::new(), |mut acc, (_num_nodes, depl, pod)| { acc.entry(depl).or_insert(vec![]).push(pod); acc }); for (name, pods) in pods { let health_pods = pods.iter().filter(|p| PodmanPodStatus::Running == p.status).collect_vec().len(); - let all_pods = pods.len(); + let _all_pods = pods.len(); let created = pods.iter().fold(Local::now(), |acc, item| { if item.created < acc { return item.created; @@ -76,7 +76,7 @@ impl Lister<(usize, String, PodmanPodInfo)> for DaemonsetLister { return acc; }); let namespace = pods.first().unwrap().labels.get("skate.io/namespace").unwrap_or(&"default".to_string()).clone(); - let node_selector = pods.first().unwrap().labels.iter().filter(|(k, _)| k.starts_with("nodeselector/")).map(|(k, v)| k.clone()).collect_vec().join(","); + let node_selector = pods.first().unwrap().labels.iter().filter(|(k, _)| k.starts_with("nodeselector/")).map(|(k, _v)| k.clone()).collect_vec().join(","); // assuming that we want same number as nodes, that's wrong but anyway println!( diff --git a/src/skatelet/system.rs b/src/skatelet/system.rs index 3a204ac..65e41a7 100644 --- a/src/skatelet/system.rs +++ b/src/skatelet/system.rs @@ -11,7 +11,7 @@ use clap::{Args, Subcommand}; use k8s_openapi::api::core::v1::Secret; use k8s_openapi::ByteString; use serde::{Deserialize, Serialize}; -use serde_yaml::Value; + use podman::PodmanPodInfo; use crate::filestore::{FileStore, ObjectListItem}; diff --git a/src/skatelet/system/podman.rs b/src/skatelet/system/podman.rs index e4f55a0..8db8ea5 100644 --- a/src/skatelet/system/podman.rs +++ b/src/skatelet/system/podman.rs @@ -1,7 +1,7 @@ use std::collections::{BTreeMap, HashMap}; use chrono::{DateTime, Local}; use serde::{Deserialize, Serialize}; -use k8s_openapi::api::core::v1::{Pod, PodSpec, PodStatus as K8sPodStatus, Secret}; +use k8s_openapi::api::core::v1::{Pod, PodSpec, PodStatus as K8sPodStatus}; use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta; use strum_macros::{Display, EnumString};