controller::cloudnativepg::clusters

Struct ClusterSpec

Source
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

Source§

fn clone(&self) -> ClusterSpec

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClusterSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ClusterSpec

Source§

fn default() -> ClusterSpec

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ClusterSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for ClusterSpec

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for ClusterSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,