pub enum CniDriver {
Calico,
Cilium,
Unknown,
}Expand description
Container Network Interface plugins fakecloud knows how to reason about for NetworkPolicy enforcement. The pluggable seam: add a variant + detection to support a new enforcing CNI.
Variants§
Calico
Calico — enforces NetworkPolicy.
Cilium
Cilium — enforces NetworkPolicy.
Unknown
A CNI we couldn’t identify, or one known not to enforce NetworkPolicy (e.g. kindnet). Policies are still created; enforcement isn’t assumed.
Implementations§
Source§impl CniDriver
impl CniDriver
Sourcepub fn from_components<I, S>(component_names: I) -> Self
pub fn from_components<I, S>(component_names: I) -> Self
Identify the CNI from the set of well-known component/daemonset names
present in the cluster (typically read from kube-system). Pure so the
detection logic is unit-testable without a cluster.
Trait Implementations§
impl Copy for CniDriver
impl Eq for CniDriver
impl StructuralPartialEq for CniDriver
Auto Trait Implementations§
impl Freeze for CniDriver
impl RefUnwindSafe for CniDriver
impl Send for CniDriver
impl Sync for CniDriver
impl Unpin for CniDriver
impl UnsafeUnpin for CniDriver
impl UnwindSafe for CniDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more