kcr_pgv2_percona_com 3.20260120.84010

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/percona/percona-postgresql-operator/pgv2.percona.com/v2/perconapgrestores.yaml
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
}
use self::prelude::*;

#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "pgv2.percona.com", version = "v2", kind = "PerconaPGRestore", plural = "perconapgrestores")]
#[kube(namespaced)]
#[kube(status = "PerconaPgRestoreStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct PerconaPgRestoreSpec {
    /// Command line options to include when running the pgBackRest restore command.
    /// <https://pgbackrest.org/command.html#command-restore>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub options: Option<Vec<String>>,
    /// The name of the PerconaPGCluster to perform restore.
    #[serde(rename = "pgCluster")]
    pub pg_cluster: String,
    /// The name of the pgBackRest repo within the source PostgresCluster that contains the backups
    /// that should be utilized to perform a pgBackRest restore when initializing the data source
    /// for the new PostgresCluster.
    #[serde(rename = "repoName")]
    pub repo_name: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct PerconaPgRestoreStatus {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub completed: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "jobName")]
    pub job_name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
}