Skip to content

Commit

Permalink
continue on malformed IP, remove Default impl for TrafficPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Zahari Dichev <[email protected]>
  • Loading branch information
zaharidichev committed Oct 9, 2024
1 parent fa5007c commit 67ae5c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions policy-controller/k8s/api/src/policy/unmeshed_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "camelCase")]
pub struct UnmeshedNetworkSpec {
pub networks: Vec<Cidr>,
pub traffic_policy: DefaultPolicy,
pub traffic_policy: TrafficPolicy,
}

#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)]
pub enum DefaultPolicy {
pub enum TrafficPolicy {
AllowUnknown,
DenyUnknown,
}

impl Default for DefaultPolicy {
fn default() -> Self {
Self::AllowUnknown
}
}
2 changes: 1 addition & 1 deletion policy-controller/k8s/index/src/outbound/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl kubert::index::IndexNamespacedResource<Pod> for Index {
Ok(addr) => addr,
Err(error) => {
tracing::error!(%error, "malformed pod IP: {ip}");
return;
continue;
}
};

Expand Down

0 comments on commit 67ae5c8

Please sign in to comment.