Trait PodTemplateSpecExt

Source
pub trait PodTemplateSpecExt: Sized {
    // Required methods
    fn new() -> Self;
    fn labels(
        self,
        labels: impl IntoIterator<Item = (impl ToString, impl ToString)>,
    ) -> Self;
    fn annotations(
        self,
        annotations: impl IntoIterator<Item = (impl ToString, impl ToString)>,
    ) -> Self;
    fn pod_spec(self, spec: PodSpec) -> Self;

    // Provided methods
    fn label(self, key: impl ToString, value: impl ToString) -> Self { ... }
    fn annotation(self, key: impl ToString, value: impl ToString) -> Self { ... }
    fn app_name(self, name: impl ToString) -> Self { ... }
    fn app_instance(self, instance: impl ToString) -> Self { ... }
    fn app_version(self, version: impl ToString) -> Self { ... }
    fn app_component(self, component: impl ToString) -> Self { ... }
    fn app_part_of(self, part_of: impl ToString) -> Self { ... }
    fn app_managed_by(self, managed_by: impl ToString) -> Self { ... }
}

Required Methods§

Source

fn new() -> Self

Source

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

Source

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

Source

fn pod_spec(self, spec: PodSpec) -> Self

Provided Methods§

Source

fn label(self, key: impl ToString, value: impl ToString) -> Self

Source

fn annotation(self, key: impl ToString, value: impl ToString) -> Self

Source

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

Set recommended label ‘app.kubernetes.io/name’

Source

fn app_instance(self, instance: impl ToString) -> Self

Set recommended label ‘app.kubernetes.io/instance’

Source

fn app_version(self, version: impl ToString) -> Self

Set recommended label ‘app.kubernetes.io/version’

Source

fn app_component(self, component: impl ToString) -> Self

Set recommended label ‘app.kubernetes.io/component’

Source

fn app_part_of(self, part_of: impl ToString) -> Self

Set recommended label ‘app.kubernetes.io/part-of’

Source

fn app_managed_by(self, managed_by: impl ToString) -> Self

Set recommended label ‘app.kubernetes.io/managed-by’

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§