pub struct PodApi {
pub api: Api<Pod>,
/* private fields */
}Expand description
Wrapper around the kube::Api type for the Vault pod
Fields§
§api: Api<Pod>Implementations§
Source§impl PodApi
impl PodApi
Sourcepub async fn portforward(
&self,
pod: &str,
port: u16,
) -> Result<impl AsyncRead + AsyncWrite + Unpin>
pub async fn portforward( &self, pod: &str, port: u16, ) -> Result<impl AsyncRead + AsyncWrite + Unpin>
Get a stream to a port on a pod The stream can be used to send HTTP requests
pub async fn http( &self, pod: &str, port: u16, ) -> Result<HttpForwarderService<BytesBody>>
Source§impl PodApi
impl PodApi
Sourcepub fn is_current(pod: &Pod, target: &VaultVersion) -> Result<bool>
pub fn is_current(pod: &Pod, target: &VaultVersion) -> Result<bool>
Check if the vault pod has the specified version
Sourcepub async fn upgrade(
&self,
pod: Pod,
target: &VaultVersion,
token: Secret<String>,
should_unseal: bool,
force_upgrade: bool,
keys: &[Secret<String>],
) -> Result<()>
pub async fn upgrade( &self, pod: Pod, target: &VaultVersion, token: Secret<String>, should_unseal: bool, force_upgrade: bool, keys: &[Secret<String>], ) -> Result<()>
Upgrade a vault pod
- a.1. if Pod version is outdated
- a.1.1. Delete pod
- a.1.2. Wait for pod to be deleted
- a.1.3. Wait for pod to be running
- a.2. if Pod version is current
- a.2.1. Pod is sealed
- a.2.1.1 Unseal pod
- a.2.2. Wait for pod to be unsealed
- a.2.3. Wait for pod to be ready
- a.2.1. Pod is sealed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PodApi
impl !RefUnwindSafe for PodApi
impl Send for PodApi
impl Sync for PodApi
impl Unpin for PodApi
impl !UnwindSafe for PodApi
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<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