pub struct ClusterSpec {Show 45 fields
pub affinity: Option<ClusterAffinity>,
pub backup: Option<ClusterBackup>,
pub bootstrap: Option<ClusterBootstrap>,
pub certificates: Option<ClusterCertificates>,
pub description: Option<String>,
pub enable_superuser_access: Option<bool>,
pub env: Option<Vec<ClusterEnv>>,
pub env_from: Option<Vec<ClusterEnvFrom>>,
pub ephemeral_volume_source: Option<ClusterEphemeralVolumeSource>,
pub ephemeral_volumes_size_limit: Option<ClusterEphemeralVolumesSizeLimit>,
pub external_clusters: Option<Vec<ClusterExternalClusters>>,
pub failover_delay: Option<i32>,
pub image_name: Option<String>,
pub image_pull_policy: Option<String>,
pub image_pull_secrets: Option<Vec<ClusterImagePullSecrets>>,
pub inherited_metadata: Option<ClusterInheritedMetadata>,
pub instances: i64,
pub log_level: Option<ClusterLogLevel>,
pub managed: Option<ClusterManaged>,
pub max_sync_replicas: Option<i64>,
pub min_sync_replicas: Option<i64>,
pub monitoring: Option<ClusterMonitoring>,
pub node_maintenance_window: Option<ClusterNodeMaintenanceWindow>,
pub postgres_gid: Option<i64>,
pub postgres_uid: Option<i64>,
pub postgresql: Option<ClusterPostgresql>,
pub primary_update_method: Option<ClusterPrimaryUpdateMethod>,
pub primary_update_strategy: Option<ClusterPrimaryUpdateStrategy>,
pub priority_class_name: Option<String>,
pub projected_volume_template: Option<ClusterProjectedVolumeTemplate>,
pub replica: Option<ClusterReplica>,
pub replication_slots: Option<ClusterReplicationSlots>,
pub resources: Option<ClusterResources>,
pub scheduler_name: Option<String>,
pub seccomp_profile: Option<ClusterSeccompProfile>,
pub service_account_template: Option<ClusterServiceAccountTemplate>,
pub smart_shutdown_timeout: Option<i32>,
pub start_delay: Option<i32>,
pub stop_delay: Option<i32>,
pub storage: Option<ClusterStorage>,
pub superuser_secret: Option<ClusterSuperuserSecret>,
pub switchover_delay: Option<i32>,
pub tablespaces: Option<Vec<ClusterTablespaces>>,
pub topology_spread_constraints: Option<Vec<ClusterTopologySpreadConstraints>>,
pub wal_storage: Option<ClusterWalStorage>,
}
Expand description
Specification of the desired behavior of the cluster. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Fields§
§affinity: Option<ClusterAffinity>
Affinity/Anti-affinity rules for Pods
backup: Option<ClusterBackup>
The configuration to be used for backups
bootstrap: Option<ClusterBootstrap>
Instructions to bootstrap this cluster
certificates: Option<ClusterCertificates>
The configuration for the CA and related certificates
description: Option<String>
Description of this PostgreSQL cluster
enable_superuser_access: Option<bool>
When this option is enabled, the operator will use the SuperuserSecret
to update the postgres
user password (if the secret is not present, the operator will automatically create one). When this option is disabled, the operator will ignore the SuperuserSecret
content, delete it when automatically created, and then blank the password of the postgres
user by setting it to NULL
. Disabled by default.
env: Option<Vec<ClusterEnv>>
Env follows the Env format to pass environment variables to the pods created in the cluster
env_from: Option<Vec<ClusterEnvFrom>>
EnvFrom follows the EnvFrom format to pass environment variables sources to the pods to be used by Env
ephemeral_volume_source: Option<ClusterEphemeralVolumeSource>
EphemeralVolumeSource allows the user to configure the source of ephemeral volumes.
ephemeral_volumes_size_limit: Option<ClusterEphemeralVolumesSizeLimit>
EphemeralVolumesSizeLimit allows the user to set the limits for the ephemeral volumes
external_clusters: Option<Vec<ClusterExternalClusters>>
The list of external clusters which are used in the configuration
failover_delay: Option<i32>
The amount of time (in seconds) to wait before triggering a failover after the primary PostgreSQL instance in the cluster was detected to be unhealthy
image_name: Option<String>
Name of the container image, supporting both tags (<image>:<tag>
) and digests for deterministic and repeatable deployments (<image>:<tag>@sha256:<digestValue>
)
image_pull_policy: Option<String>
Image pull policy. One of Always
, Never
or IfNotPresent
. If not defined, it defaults to IfNotPresent
. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
image_pull_secrets: Option<Vec<ClusterImagePullSecrets>>
The list of pull secrets to be used to pull the images
inherited_metadata: Option<ClusterInheritedMetadata>
Metadata that will be inherited by all objects related to the Cluster
instances: i64
Number of instances required in the cluster
log_level: Option<ClusterLogLevel>
The instances’ log level, one of the following values: error, warning, info (default), debug, trace
managed: Option<ClusterManaged>
The configuration that is used by the portions of PostgreSQL that are managed by the instance manager
max_sync_replicas: Option<i64>
The target value for the synchronous replication quorum, that can be decreased if the number of ready standbys is lower than this. Undefined or 0 disable synchronous replication.
min_sync_replicas: Option<i64>
Minimum number of instances required in synchronous replication with the primary. Undefined or 0 allow writes to complete when no standby is available.
monitoring: Option<ClusterMonitoring>
The configuration of the monitoring infrastructure of this cluster
node_maintenance_window: Option<ClusterNodeMaintenanceWindow>
Define a maintenance window for the Kubernetes nodes
postgres_gid: Option<i64>
The GID of the postgres
user inside the image, defaults to 26
postgres_uid: Option<i64>
The UID of the postgres
user inside the image, defaults to 26
postgresql: Option<ClusterPostgresql>
Configuration of the PostgreSQL server
primary_update_method: Option<ClusterPrimaryUpdateMethod>
Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be with a switchover (switchover
) or in-place (restart
- default)
primary_update_strategy: Option<ClusterPrimaryUpdateStrategy>
Deployment strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (unsupervised
- default) or manual (supervised
)
priority_class_name: Option<String>
Name of the priority class which will be used in every generated Pod, if the PriorityClass specified does not exist, the pod will not be able to schedule. Please refer to https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more information
projected_volume_template: Option<ClusterProjectedVolumeTemplate>
Template to be used to define projected volumes, projected volumes will be mounted under /projected
base folder
replica: Option<ClusterReplica>
Replica cluster configuration
replication_slots: Option<ClusterReplicationSlots>
Replication slots management configuration
resources: Option<ClusterResources>
Resources requirements of every generated Pod. Please refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more information.
scheduler_name: Option<String>
If specified, the pod will be dispatched by specified Kubernetes scheduler. If not specified, the pod will be dispatched by the default scheduler. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/
seccomp_profile: Option<ClusterSeccompProfile>
The SeccompProfile applied to every Pod and Container. Defaults to: RuntimeDefault
service_account_template: Option<ClusterServiceAccountTemplate>
Configure the generation of the service account
smart_shutdown_timeout: Option<i32>
The time in seconds that controls the window of time reserved for the smart shutdown of Postgres to complete. Make sure you reserve enough time for the operator to request a fast shutdown of Postgres (that is: stopDelay
- smartShutdownTimeout
).
start_delay: Option<i32>
The time in seconds that is allowed for a PostgreSQL instance to successfully start up (default 3600). The startup probe failure threshold is derived from this value using the formula: ceiling(startDelay / 10).
stop_delay: Option<i32>
The time in seconds that is allowed for a PostgreSQL instance to gracefully shutdown (default 1800)
storage: Option<ClusterStorage>
Configuration of the storage of the instances
superuser_secret: Option<ClusterSuperuserSecret>
The secret containing the superuser password. If not defined a new secret will be created with a randomly generated password
switchover_delay: Option<i32>
The time in seconds that is allowed for a primary PostgreSQL instance to gracefully shutdown during a switchover. Default value is 3600 seconds (1 hour).
tablespaces: Option<Vec<ClusterTablespaces>>
The tablespaces configuration
topology_spread_constraints: Option<Vec<ClusterTopologySpreadConstraints>>
TopologySpreadConstraints specifies how to spread matching pods among the given topology. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
wal_storage: Option<ClusterWalStorage>
Configuration of the storage for PostgreSQL WAL (Write-Ahead Log)
Trait Implementations§
Source§impl Clone for ClusterSpec
impl Clone for ClusterSpec
Source§fn clone(&self) -> ClusterSpec
fn clone(&self) -> ClusterSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClusterSpec
impl Debug for ClusterSpec
Source§impl Default for ClusterSpec
impl Default for ClusterSpec
Source§fn default() -> ClusterSpec
fn default() -> ClusterSpec
Source§impl<'de> Deserialize<'de> for ClusterSpec
impl<'de> Deserialize<'de> for ClusterSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ClusterSpec
impl JsonSchema for ClusterSpec
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreAuto Trait Implementations§
impl Freeze for ClusterSpec
impl RefUnwindSafe for ClusterSpec
impl Send for ClusterSpec
impl Sync for ClusterSpec
impl Unpin for ClusterSpec
impl UnwindSafe for ClusterSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more