StatefulSetExt

Trait StatefulSetExt 

Source
pub trait StatefulSetExt {
    // Required methods
    fn new(name: impl ToString) -> Self;
    fn spec(self, spec: StatefulSetSpec) -> Self;
    fn replicas(self, replicas: i32) -> Self;
    fn selector(self, selector: LabelSelector) -> Self;
    fn match_labels(
        self,
        match_labels: impl IntoIterator<Item = (impl ToString, impl ToString)>,
    ) -> Self;
    fn service_name(self, service_name: impl ToString) -> Self;
    fn template(self, template: PodTemplateSpec) -> Self;
    fn ordinals(self, ordinals: i32) -> Self;
}

Required Methods§

Source

fn new(name: impl ToString) -> Self

Create a new StatefulSet with the given name.

Source

fn spec(self, spec: StatefulSetSpec) -> Self

Set the spec for the StatefulSet.

Source

fn replicas(self, replicas: i32) -> Self

Set the number of replicas for the StatefulSet.

Source

fn selector(self, selector: LabelSelector) -> Self

Set the selector for the StatefulSet.

Source

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

Set the matchLabels for the StatefulSet’s selector.

Source

fn service_name(self, service_name: impl ToString) -> Self

Set the service name for the StatefulSet.

Source

fn template(self, template: PodTemplateSpec) -> Self

Set the pod template spec for the StatefulSet.

Source

fn ordinals(self, ordinals: i32) -> Self

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§