fn try_from(d: StatefulSet) -> Result<StatefulSummary> {
        if let Some(status) = d.status {
            let ready = status.ready_replicas.unwrap_or(0);
            let replicas = status.replicas;
            let current_revision = status.current_revision;
            let current_replicas = status.current_replicas.unwrap_or(0);
            let update_revision = status.update_revision;
            let updated_replicas = status.updated_replicas.unwrap_or(0);

            // NB: No good message in statefulset conditions at 1.13
            Ok(StatefulSummary {
                replicas,
                ready,
                current_revision,
                current_replicas,
                update_revision,
                updated_replicas,
            })
        } else {
            bail!("Missing statefulset status object")
        }
    }
/// Helper to convert the openapi Statefulset to the useful info
Helper to convert the openapi Statefulset to the useful info
Helper to convert the openapi Statefulset to the useful info
fn try_from(d: StatefulSet) -> Result<StatefulSummary> {
        if let Some(status) = d.status {
            let ready = status.ready_replicas.unwrap_or(0);
            let replicas = status.replicas;
            let current_revision = status.current_revision;
            let current_replicas = status.current_replicas.unwrap_or(0);
            let update_revision = status.update_revision;
            let updated_replicas = status.updated_replicas.unwrap_or(0);
            // NB: No good message in statefulset conditions at 1.13
            Ok(StatefulSummary {
                replicas,
                ready,
                current_revision,
                current_replicas,
                update_revision,
                updated_replicas,
            })
        } else {
            bail!("Missing statefulset status object")
        }
    }
fn try_from ( d : StatefulSet ) -> Result < StatefulSummary > { if let Some ( status ) = d . status { let ready = status . ready_replicas . unwrap_or ( 0 ) ; let replicas = status . replicas ; let current_revision = status . current_revision ; let current_replicas = status . current_replicas . unwrap_or ( 0 ) ; let update_revision = status . update_revision ; let updated_replicas = status . updated_replicas . unwrap_or ( 0 ) ; // NB: No good message in statefulset conditions at 1.13 Ok ( StatefulSummary { replicas , ready , current_revision , current_replicas , update_revision , updated_replicas , } ) } else { bail ! ( " " ) } }
Helper to convert the openapi Statefulset to the useful info
Helper to convert the openapi Statefulset to the useful info
d
StatefulSet
d
StatefulSet