pub enum LocalhostReachability {
Auto,
Always,
Never,
}Expand description
How a service’s exposed ports are made reachable on the node’s loopback
(127.0.0.1:<port>) for same-service / same-node consumers.
127.0.0.1 always means this container’s own loopback — isolated per
container on Linux (youki netns), macOS VZ, and Windows HCS; shared with the
host on the macOS seatbelt / libkrun runtimes. This setting never rewrites a
container’s own loopback. It controls only whether the daemon ALSO binds the
service’s exposed port on the node’s loopback and L4-forwards it to the
container, so a consumer that shares the node loopback can reach the service
at localhost:<port>.
Variants§
Auto
Publish to the node loopback only when the service is effectively
single-member (no replica groups, scaling disabled or capped at one
replica). A multi-member service is not a “pod”, so name-based overlay
DNS (<service>.service.local) stays the addressing path to avoid an
ambiguous single loopback port fronting many replicas. Default.
Always
Always publish each exposed port on the node loopback.
Never
Never publish to the node loopback (name / overlay addressing only).
Implementations§
Source§impl LocalhostReachability
impl LocalhostReachability
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
True for the serde default (LocalhostReachability::Auto); used to
skip serializing the field when it carries the default value.
Trait Implementations§
Source§impl Clone for LocalhostReachability
impl Clone for LocalhostReachability
Source§fn clone(&self) -> LocalhostReachability
fn clone(&self) -> LocalhostReachability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LocalhostReachability
Source§impl Debug for LocalhostReachability
impl Debug for LocalhostReachability
Source§impl Default for LocalhostReachability
impl Default for LocalhostReachability
Source§fn default() -> LocalhostReachability
fn default() -> LocalhostReachability
Source§impl<'de> Deserialize<'de> for LocalhostReachability
impl<'de> Deserialize<'de> for LocalhostReachability
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LocalhostReachability
Source§impl PartialEq for LocalhostReachability
impl PartialEq for LocalhostReachability
Source§fn eq(&self, other: &LocalhostReachability) -> bool
fn eq(&self, other: &LocalhostReachability) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LocalhostReachability
impl Serialize for LocalhostReachability
impl StructuralPartialEq for LocalhostReachability
Auto Trait Implementations§
impl Freeze for LocalhostReachability
impl RefUnwindSafe for LocalhostReachability
impl Send for LocalhostReachability
impl Sync for LocalhostReachability
impl Unpin for LocalhostReachability
impl UnsafeUnpin for LocalhostReachability
impl UnwindSafe for LocalhostReachability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.