Trait PodSpecExt

Source
pub trait PodSpecExt {
    // Required methods
    fn container(container: Container) -> Self;
    fn containers(containers: impl IntoIterator<Item = Container>) -> Self;
    fn service_account_name(self, name: impl ToString) -> Self;
    fn image_pull_secret(self, name: impl ToString) -> Self;
    fn volumes(self, volumes: impl IntoIterator<Item = Volume>) -> Self;
    fn node_selector(
        self,
        node_selector: impl IntoIterator<Item = (impl ToString, impl ToString)>,
    ) -> Self;
    fn affinity(self, affinity: impl Into<Option<Affinity>>) -> Self;
    fn tolerations(
        self,
        tolerations: impl IntoIterator<Item = Toleration>,
    ) -> Self;
}

Required Methods§

Source

fn container(container: Container) -> Self

Build corev1::PodSpec with this container

Source

fn containers(containers: impl IntoIterator<Item = Container>) -> Self

Build corev1::PodSpec with these containers

Source

fn service_account_name(self, name: impl ToString) -> Self

Set service account name

Source

fn image_pull_secret(self, name: impl ToString) -> Self

Add image pull secret

Source

fn volumes(self, volumes: impl IntoIterator<Item = Volume>) -> Self

Add volumes

Source

fn node_selector( self, node_selector: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> Self

Add node selector

Source

fn affinity(self, affinity: impl Into<Option<Affinity>>) -> Self

Set affinity

Source

fn tolerations(self, tolerations: impl IntoIterator<Item = Toleration>) -> Self

Add tolerations

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§