SGDbOps


Kind: SGDbOps

listKind: SGDbOpsList

plural: sgdbops

singular: sgdbops

shortNames sgdo


The SGDbOps custom resource represents database operations that are performed on a Postgres cluster.

Example:

apiVersion: stackgres.io/v1
kind: SGDbOps
metadata:
  name: benchmark
spec:
 sgCluster: my-cluster
 op: benchmark
 maxRetries: 1
 benchmark:
   type: pgbench
   pgbench:
     databaseSize: 1Gi
     duration: P0DT0H10M0S
     concurrentClients: 10
     threads: 10
   connectionType: primary-service
Property
Description
apiVersion
string
stackgres.io/v1

Constraints: required, immutable
kind
string
SGDbOps

Constraints: required, immutable
metadata
object
Refer to the Kubernetes API documentation for the fields of the metadata field.

Constraints: required, updatable
spec
object
Constraints: required, updatable
status
object
Constraints: optional, updatable

SGDbOps.spec

↩ Parent

Property
Description
op
string

The kind of operation that will be performed on the SGCluster. Available operations are:

  • benchmark: run a benchmark on the specified SGCluster and report the results in the status.
  • vacuum: perform a vacuum operation on the specified SGCluster.
  • repack: run pg_repack command on the specified SGCluster.
  • majorVersionUpgrade: perform a major version upgrade of PostgreSQL using pg_upgrade command.
  • restart: perform a restart of the cluster.
  • minorVersionUpgrade: perform a minor version upgrade of PostgreSQL.
  • securityUpgrade: perform a security upgrade of the cluster.

Constraints: required, updatable
sgCluster
string
The name of SGCluster on which the operation will be performed.

Constraints: required, updatable
benchmark
object
Configuration of the benchmark

Constraints: optional, updatable
majorVersionUpgrade
object
Configuration of major version upgrade (see also pg_upgrade command)

Constraints: optional, updatable
maxRetries
integer

The maximum number of retries the operation is allowed to do after a failure.

A value of 0 (zero) means no retries are made. Defaults to: 0.


Constraints: optional, updatable
minorVersionUpgrade
object
Configuration of minor version upgrade

Constraints: optional, updatable
repack
object
Configuration of pg_repack command

Constraints: optional, updatable
restart
object
Configuration of restart

Constraints: optional, updatable
retryDelay
string

An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies the initial delay used by the exponential backoff applied when a command run by the operation script is retried and in general by unbounded retries and in some cases without exponential backoff.

Defaults to: PT1S.


Constraints: optional, updatable
retryLimit
integer

The maximum number of times a command run by the operation script is retried before failing.

Defaults to: 10.


Constraints: optional, updatable
retryMaxDelay
string

An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies the maximum delay the exponential backoff is allowed to reach when a command run by the operation script is retried.

Defaults to: PT1M.


Constraints: optional, updatable
runAt
string

An ISO 8601 date, that holds UTC scheduled date of the operation execution.

If not specified or if the date it’s in the past, it will be interpreted ASAP.


Constraints: optional, updatable
scheduling
object
Pod custom node scheduling and affinity configuration

Constraints: optional, updatable
securityUpgrade
object
Configuration of security upgrade

Constraints: optional, updatable
timeout
string

An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies a timeout after which the operation execution will be canceled.

If the operation can not be performed due to timeout expiration, the condition Failed will have a status of True and the reason will be OperationTimedOut.

If not specified the operation will never fail for timeout expiration.


Constraints: optional, updatable
vacuum
object
Configuration of vacuum operation

Constraints: optional, updatable

SGDbOps.spec.benchmark

↩ Parent

Configuration of the benchmark

Property
Description
type
string

The type of benchmark that will be performed on the SGCluster. Available benchmarks are:

  • pgbench: run pgbench on the specified SGCluster and report the results in the status.
  • sampling: samples real queries and store them in the SGDbOps status in order to be used by a pgbench benchmark using replay mode.

Constraints: required, updatable
connectionType
string

Specify the service where the benchmark will connect to:

  • primary-service: Connect to the primary service
  • replicas-service: Connect to the replicas service

Constraints: optional, updatable
credentials
object
The credentials of the user that will be used by the benchmark

Constraints: optional, updatable
database
string

When specified will indicate the database where the benchmark will run upon.

If not specified a target database with a random name will be created and removed after the benchmark completes.


Constraints: optional, updatable
pgbench
object
Configuration of pgbench benchmark

Constraints: optional, updatable
sampling
object
Configuration of sampling benchmark.

Constraints: optional, updatable

SGDbOps.spec.benchmark.credentials

↩ Parent

The credentials of the user that will be used by the benchmark

Property
Description
password
object

The password that will be used by the benchmark

If not specified the default superuser password will be used.


Constraints: required, updatable
username
object

The username that will be used by the benchmark.

If not specified the default superuser username (by default postgres) will be used.


Constraints: required, updatable
SGDbOps.spec.benchmark.credentials.password

↩ Parent

The password that will be used by the benchmark

If not specified the default superuser password will be used.

Property
Description
key
string
The Secret key where the password is stored.

Constraints: required, updatable
name
string
The Secret name where the password is stored.

Constraints: required, updatable
SGDbOps.spec.benchmark.credentials.username

↩ Parent

The username that will be used by the benchmark.

If not specified the default superuser username (by default postgres) will be used.

Property
Description
key
string
The Secret key where the username is stored.

Constraints: required, updatable
name
string
The Secret name where the username is stored.

Constraints: required, updatable

SGDbOps.spec.benchmark.pgbench

↩ Parent

Configuration of pgbench benchmark

Property
Description
databaseSize
string
Size of the database to generate. This size is specified either in Mebibytes, Gibibytes or Tebibytes (multiples of 2^20, 2^30 or 2^40, respectively).

Constraints: required, updatable
duration
string
An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies how long the benchmark will run.

Constraints: required, updatable
concurrentClients
integer
Number of clients simulated, that is, number of concurrent database sessions. Defaults to: 1.

Constraints: optional, updatable
custom
object
This section allow to configure custom SQL for initialization and scripts used by pgbench.

Constraints: optional, updatable
fillfactor
integer
Create the pgbench_accounts, pgbench_tellers and pgbench_branches tables with the given fillfactor. Default is 100.

Constraints: optional, updatable
foreignKeys
boolean
Create foreign key constraints between the standard tables. (This option only takes effect if custom.initialization is not specified).

Constraints: optional, updatable
initSteps
string

Perform just a selected set of the normal initialization steps. init_steps specifies the initialization steps to be performed, using one character per step. Each step is invoked in the specified order. The default is dtgvp. The available steps are:

  • d (Drop): Drop any existing pgbench tables.
  • t (create Tables): Create the tables used by the standard pgbench scenario, namely pgbench_accounts, pgbench_branches, pgbench_history, and pgbench_tellers.
  • g or G (Generate data, client-side or server-side): Generate data and load it into the standard tables, replacing any data already present. With g (client-side data generation), data is generated in pgbench client and then sent to the server. This uses the client/server bandwidth extensively through a COPY. pgbench uses the FREEZE option with version 14 or later of PostgreSQL to speed up subsequent VACUUM, unless partitions are enabled. Using g causes logging to print one message every 100,000 rows while generating data for the pgbench_accounts table. With G (server-side data generation), only small queries are sent from the pgbench client and then data is actually generated in the server. No significant bandwidth is required for this variant, but the server will do more work. Using G causes logging not to print any progress message while generating data. The default initialization behavior uses client-side data generation (equivalent to g).
  • v (Vacuum): Invoke VACUUM on the standard tables.
  • p (create Primary keys): Create primary key indexes on the standard tables.
  • f (create Foreign keys): Create foreign key constraints between the standard tables. (Note that this step is not performed by default.)

Constraints: optional, updatable
mode
string

The pgbench benchmark type:

  • tpcb-like: The benchmark is inspired by the TPC-B benchmark. It is the default mode when connectionType is set to primary-service.
  • select-only: The tpcb-like but only using SELECTs commands. It is the default mode when connectionType is set to replicas-service.
  • custom: will use the scripts in the custom section to initialize and run commands for the benchmark.
  • replay: will replay the sampled queries of a sampling benchmark SGDbOps. If the custom section is specified it will be used instead. Queries can be referenced setting custom.scripts.replay to the index of the query in the sampling benchmark SGDbOps’s status (index start from 0).

See also https://www.postgresql.org/docs/current/pgbench.html#TRANSACTIONS-AND-SCRIPTS


Constraints: optional, updatable
noVacuum
boolean
Perform no vacuuming during initialization. (This option suppresses the v initialization step, even if it was specified in initSteps.)

Constraints: optional, updatable
partitionMethod
string
Create a partitioned pgbench_accounts table with the specified method. Expected values are range or hash. This option requires that partitions is set to non-zero. If unspecified, default is range. (This option only takes effect if custom.initialization is not specified).

Constraints: optional, updatable
partitions
integer
Create a partitioned pgbench_accounts table with the specified number of partitions of nearly equal size for the scaled number of accounts. Default is 0, meaning no partitioning. (This option only takes effect if custom.initialization is not specified).

Constraints: optional, updatable
queryMode
string

Protocol to use for submitting queries to the server:

  • simple: use simple query protocol.
  • extended: use extended query protocol.
  • prepared: use extended query protocol with prepared statements.

In the prepared mode, pgbench reuses the parse analysis result starting from the second query iteration, so pgbench runs faster than in other modes.

The default is simple query protocol. See also https://www.postgresql.org/docs/current/protocol.html


Constraints: optional, updatable
samplingRate
number
Sampling rate, used when collecting data, to reduce the amount of collected data. If this option is given, only the specified fraction of transactions are collected. 1.0 means all transactions will be logged, 0.05 means only 5% of the transactions will be logged.

Constraints: optional, updatable
samplingSGDbOps
string
benchmark SGDbOps of type sampling that will be used to replay sampled queries.

Constraints: optional, updatable
threads
integer
Number of worker threads within pgbench. Using more than one thread can be helpful on multi-CPU machines. Clients are distributed as evenly as possible among available threads. Default is 1.

Constraints: optional, updatable
unloggedTables
boolean
Create all tables as unlogged tables, rather than permanent tables. (This option only takes effect if custom.initialization is not specified).

Constraints: optional, updatable
usePreparedStatements
boolean

Deprecated this field is ignored, use queryMode instead.

Use extended query protocol with prepared statements. Defaults to: false.


Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom

↩ Parent

This section allow to configure custom SQL for initialization and scripts used by pgbench.

Property
Description
initialization
object

The custom SQL for initialization that will be executed in place of pgbench default initialization.

If not specified the default pgbench initialization will be performed instead.


Constraints: optional, updatable
scripts
[]object
The custom SQL scripts that will be executed by pgbench during the benchmark instead of default pgbench scripts

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.initialization

↩ Parent

The custom SQL for initialization that will be executed in place of pgbench default initialization.

If not specified the default pgbench initialization will be performed instead.

Property
Description
script
string
Raw SQL script to execute. This field is mutually exclusive with scriptFrom field.

Constraints: optional, updatable
scriptFrom
object

Reference to either a Kubernetes Secret or a ConfigMap that contains the SQL script to execute. This field is mutually exclusive with script field.

Fields secretKeyRef and configMapKeyRef are mutually exclusive, and one of them is required.


Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.initialization.scriptFrom

↩ Parent

Reference to either a Kubernetes Secret or a ConfigMap that contains the SQL script to execute. This field is mutually exclusive with script field.

Fields secretKeyRef and configMapKeyRef are mutually exclusive, and one of them is required.

Property
Description
configMapKeyRef
object
A ConfigMap reference that contains the SQL script to execute. This field is mutually exclusive with secretKeyRef field.

Constraints: optional, updatable
secretKeyRef
object
A Kubernetes SecretKeySelector that contains the SQL script to execute. This field is mutually exclusive with configMapKeyRef field.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.initialization.scriptFrom.configMapKeyRef

↩ Parent

A ConfigMap reference that contains the SQL script to execute. This field is mutually exclusive with secretKeyRef field.

Property
Description
key
string
The key name within the ConfigMap that contains the SQL script to execute.

Constraints: optional, updatable
name
string
The name of the ConfigMap that contains the SQL script to execute.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.initialization.scriptFrom.secretKeyRef

↩ Parent

A Kubernetes SecretKeySelector that contains the SQL script to execute. This field is mutually exclusive with configMapKeyRef field.

Property
Description
key
string
The key of the secret to select from. Must be a valid secret key.

Constraints: optional, updatable
name
string
Name of the referent. More information.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.scripts[index]

↩ Parent

A custom SQL script that will be executed by pgbench during the benchmark instead of default pgbench scripts

Property
Description
builtin
string

The name of the builtin script to use. See https://www.postgresql.org/docs/current/pgbench.html#PGBENCH-OPTION-BUILTIN

When specified fields replay, script and scriptFrom must not be set.


Constraints: optional, updatable
replay
integer

The index of the query in the sampling benchmark SGDbOps’s status (index start from 0).

When specified fields builtin, script and scriptFrom must not be set.


Constraints: optional, updatable
script
string
Raw SQL script to execute. This field is mutually exclusive with scriptFrom field.

Constraints: optional, updatable
scriptFrom
object

Reference to either a Kubernetes Secret or a ConfigMap that contains the SQL script to execute. This field is mutually exclusive with script field.

Fields secretKeyRef and configMapKeyRef are mutually exclusive, and one of them is required.


Constraints: optional, updatable
weight
integer
The weight of this custom SQL script.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.scripts[index].scriptFrom

↩ Parent

Reference to either a Kubernetes Secret or a ConfigMap that contains the SQL script to execute. This field is mutually exclusive with script field.

Fields secretKeyRef and configMapKeyRef are mutually exclusive, and one of them is required.

Property
Description
configMapKeyRef
object
A ConfigMap reference that contains the SQL script to execute. This field is mutually exclusive with secretKeyRef field.

Constraints: optional, updatable
secretKeyRef
object
A Kubernetes SecretKeySelector that contains the SQL script to execute. This field is mutually exclusive with configMapKeyRef field.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.scripts[index].scriptFrom.configMapKeyRef

↩ Parent

A ConfigMap reference that contains the SQL script to execute. This field is mutually exclusive with secretKeyRef field.

Property
Description
key
string
The key name within the ConfigMap that contains the SQL script to execute.

Constraints: optional, updatable
name
string
The name of the ConfigMap that contains the SQL script to execute.

Constraints: optional, updatable
SGDbOps.spec.benchmark.pgbench.custom.scripts[index].scriptFrom.secretKeyRef

↩ Parent

A Kubernetes SecretKeySelector that contains the SQL script to execute. This field is mutually exclusive with configMapKeyRef field.

Property
Description
key
string
The key of the secret to select from. Must be a valid secret key.

Constraints: optional, updatable
name
string
Name of the referent. More information.

Constraints: optional, updatable

SGDbOps.spec.benchmark.sampling

↩ Parent

Configuration of sampling benchmark.

Property
Description
samplingDuration
string
An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies how long will last the sampling of real queries that will be replayed later.

Constraints: required, updatable
targetDatabase
string

The target database to be sampled. By default postgres.

The benchmark database will be used to store the sampled queries but user must specify a target database to be sampled in the sampling section.


Constraints: required, updatable
topQueriesCollectDuration
string
An ISO 8601 duration in the format PnDTnHnMn.nS, that specifies how long to wait before selecting top queries in order to collect enough stats.

Constraints: required, updatable
customTopQueriesQuery
string

The query used to select top queries. Will be ignored if mode is not set to custom.

The query must return at most 2 columns:

  • First column returned by the query must be a column holding the query identifier, also available in pg_stat_activity (column query_id) and pg_stat_statements (column queryid).
  • Second column is optional and, if returned, must hold a json object containing only text keys and values that will be used to generate the stats.

See also:


Constraints: optional, updatable
mode
string

The mode used to select the top queries used for sampling:

  • time: The top queries will be selected among the most slow queries.
  • calls: The top queries will be selected among the most called queries.
  • custom: The customTopQueriesQuery will be used to select top queries.

Constraints: optional, updatable
omitTopQueriesInStatus
boolean
When true omit to include the top queries stats in the SGDbOps status. By default false.

Constraints: optional, updatable
queries
integer
Number of sampled queries to include in the result. By default 10.

Constraints: optional, updatable
samplingMinInterval
integer
Minimum number of microseconds the sampler will wait between each sample is taken. By default 10000 (10 milliseconds).

Constraints: optional, updatable
topQueriesFilter
string
Regular expression for filtering representative statements when selecting top queries. Will be ignored if mode is set to custom. By default is ^ *(with|select) . See https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP

Constraints: optional, updatable
topQueriesMin
integer
Minimum number of queries to consider as part of the top queries. By default 5.

Constraints: optional, updatable
topQueriesPercentile
integer
Percentile of queries to consider as part of the top queries. Will be ignored if mode is set to custom. By default 95.

Constraints: optional, updatable

SGDbOps.spec.majorVersionUpgrade

↩ Parent

Configuration of major version upgrade (see also pg_upgrade command)

Property
Description
backupPath
string

The path where the backup is stored. If not set this field is filled up by the operator.

When provided will indicate where the backups and WAL files will be stored.

The path should be different from the current .spec.configurations.backups[].path value for the target SGCluster in order to avoid mixing WAL files of two distinct major versions of postgres.


Constraints: optional, updatable
check
boolean
If true does some checks to see if the cluster can perform a major version upgrade without changing any data. Defaults to: false.

Constraints: optional, updatable
clone
boolean

If true use efficient file cloning (also known as “reflinks” on some systems) instead of copying files to the new cluster. This can result in near-instantaneous copying of the data files, giving the speed advantages of link while leaving the old cluster untouched. This option is mutually exclusive with link. Defaults to: false.

File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_upgrade run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.


Constraints: optional, updatable
link
boolean
If true use hard links instead of copying files to the new cluster. This option is mutually exclusive with clone. Defaults to: false.

Constraints: optional, updatable
manualRollback
boolean

When set to true the major version upgrade does not automatically roll back or clean up on its own. Instead, when the upgrade fails (or, on success, before the cleanup that removes the source data directory) the operation pauses: it sets .status.majorVersionUpgrade.status to failed or succeeded, the operator raises the WaitingRollback condition, and the operation waits until .status.majorVersionUpgrade.rollback is set.

While paused, the major-version-upgrade init container of the primary instance stays alive (sleeping) so it can be inspected and the upgrade can be performed manually by exec-ing into it.

When .status.majorVersionUpgrade.rollback is set to false the init container exits successfully (assuming the user has already performed the upgrade manually) and the operation waits for the Pod to become ready tolerating up to maxErrorsAfterUpgrade plus maxErrorsAfterContinueOnFailure errors. When set to true the operation performs a rollback regardless of whether it had failed or succeeded.


Constraints: optional, updatable
Default: false
maxErrorsAfterContinueOnFailure
integer
Only used when manualRollback is true. After .status.majorVersionUpgrade.rollback is set to false to continue a paused operation, this number of errors is added to maxErrorsAfterUpgrade as the budget allowed while waiting for the Pod to become ready.

Constraints: optional, updatable
Default: 0
maxErrorsAfterUpgrade
integer
Indicates the number of errors that the operation can tolerate after the upgrade is performed in order to wait for the Pod to become ready and set the operation as completed.

Constraints: optional, updatable
Default: 6
postgresExtensions
[]object
A major version upgrade can not be performed if a required extension is not present for the target major version of the upgrade. In those cases you will have to provide the target extension version of the extension for the target major version of postgres. Beware that in some cases it is not possible to upgrade an extension alongside postgres. This is the case for PostGIS or timescaledb. In such cases you will have to upgrade the extension before or after the major version upgrade. Please make sure you read the documentation of each extension in order to understand if it is possible to upgrade it during a major version upgrade of postgres.

Constraints: optional, updatable
postgresVersion
string
The target postgres version that must have the same major version of the target SGCluster.

Constraints: optional, updatable
sgPostgresConfig
string
The postgres config that must have the same major version of the target postgres version.

Constraints: optional, updatable
toInstallPostgresExtensions
[]object

The list of Postgres extensions to install.

This section is filled by the operator.


Constraints: optional, updatable

SGDbOps.spec.majorVersionUpgrade.postgresExtensions[index]

↩ Parent

Property
Description
name
string
The name of the extension to deploy.

Constraints: required, updatable
publisher
string
The id of the publisher of the extension to deploy. If not specified com.ongres will be used by default.

Constraints: optional, updatable
Default: com.ongres
repository
string

The repository base URL from where to obtain the extension to deploy.

This section is filled by the operator.


Constraints: optional, updatable
version
string
The version of the extension to deploy. If not specified version of stable channel will be used by default and if only a version is available that one will be used.

Constraints: optional, updatable

SGDbOps.spec.majorVersionUpgrade.toInstallPostgresExtensions[index]

↩ Parent

Property
Description
name
string
The name of the extension to install.

Constraints: required, updatable
postgresVersion
string
The postgres major version of the extension to install.

Constraints: required, updatable
publisher
string
The id of the publisher of the extension to install.

Constraints: required, updatable
repository
string
The repository base URL from where the extension will be installed from.

Constraints: required, updatable
version
string
The version of the extension to install.

Constraints: required, updatable
build
string
The build version of the extension to install.

Constraints: optional, updatable
extraMounts
[]string
The extra mounts of the extension to install.

Constraints: optional, updatable

SGDbOps.spec.minorVersionUpgrade

↩ Parent

Configuration of minor version upgrade

Property
Description
method
string

The method used to perform the minor version upgrade operation. Available methods are:

  • InPlace: the in-place method does not require more resources than those that are available. In case only an instance of the StackGres cluster is present this mean the service disruption will last longer so we encourage use the reduced impact restart and especially for a production environment.
  • ReducedImpact: this procedure is the same as the in-place method but require additional resources in order to spawn a new updated replica that will be removed when the procedure completes.

Constraints: optional, updatable
postgresVersion
string
The target postgres version that must have the same major version of the target SGCluster.

Constraints: optional, updatable

SGDbOps.spec.repack

↩ Parent

Configuration of pg_repack command

Property
Description
databases
[]object
List of databases to vacuum or repack, don’t specify to select all databases

Constraints: optional, updatable
excludeExtension
boolean
If true don’t repack tables which belong to specific extension. Defaults to: false.

Constraints: optional, updatable
noAnalyze
boolean
If true don’t analyze at end. Defaults to: false.

Constraints: optional, updatable
noKillBackend
boolean
If true don’t kill other backends when timed out. Defaults to: false.

Constraints: optional, updatable
noOrder
boolean
If true do vacuum full instead of cluster. Defaults to: false.

Constraints: optional, updatable
waitTimeout
string
If specified, an ISO 8601 duration format PnDTnHnMn.nS to set a timeout to cancel other backends on conflict.

Constraints: optional, updatable

SGDbOps.spec.repack.databases[index]

↩ Parent

Property
Description
name
string
the name of the database

Constraints: required, updatable
excludeExtension
boolean
If true don’t repack tables which belong to specific extension. Defaults to: false.

Constraints: optional, updatable
noAnalyze
boolean
If true don’t analyze at end. Defaults to: false.

Constraints: optional, updatable
noKillBackend
boolean
If true don’t kill other backends when timed out. Defaults to: false.

Constraints: optional, updatable
noOrder
boolean
If true do vacuum full instead of cluster. Defaults to: false.

Constraints: optional, updatable
waitTimeout
string
If specified, an ISO 8601 duration format PnDTnHnMn.nS to set a timeout to cancel other backends on conflict.

Constraints: optional, updatable

SGDbOps.spec.restart

↩ Parent

Configuration of restart

Property
Description
method
string

The method used to perform the restart operation. Available methods are:

  • InPlace: the in-place method does not require more resources than those that are available. In case only an instance of the StackGres cluster is present this mean the service disruption will last longer so we encourage use the reduced impact restart and especially for a production environment.
  • ReducedImpact: this procedure is the same as the in-place method but require additional resources in order to spawn a new updated replica that will be removed when the procedure completes.

Constraints: optional, updatable
onlyPendingRestart
boolean
By default all Pods are restarted. Setting this option to true allow to restart only those Pods which are in pending restart state as detected by the operation. Defaults to: false.

Constraints: optional, updatable

SGDbOps.spec.scheduling

↩ Parent

Pod custom node scheduling and affinity configuration

Property
Description
nodeAffinity
object

Node affinity is a group of node affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#nodeaffinity-v1-core


Constraints: optional, updatable
nodeSelector
map[string]string
NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

Constraints: optional, updatable
podAffinity
object

Pod affinity is a group of inter pod affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#podaffinity-v1-core


Constraints: optional, updatable
podAntiAffinity
object

Pod anti affinity is a group of inter pod anti affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#podantiaffinity-v1-core


Constraints: optional, updatable
priorityClassName
string
If specified, indicates the pod’s priority. “system-node-critical” and “system-cluster-critical” are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.

Constraints: optional, updatable
tolerations
[]object

Constraints: optional, updatable

SGDbOps.spec.scheduling.nodeAffinity

↩ Parent

Node affinity is a group of node affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#nodeaffinity-v1-core

Property
Description
preferredDuringSchedulingIgnoredDuringExecution
[]object
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding “weight” to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.

Constraints: optional, updatable
requiredDuringSchedulingIgnoredDuringExecution
object
A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]

↩ Parent

An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it’s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).

Property
Description
preference
object
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

Constraints: required, updatable
weight
integer
Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.

Constraints: required, updatable
Format: int32
SGDbOps.spec.scheduling.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference

↩ Parent

A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

Property
Description
matchExpressions
[]object
A list of node selector requirements by node’s labels.

Constraints: optional, updatable
matchFields
[]object
A list of node selector requirements by node’s fields.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index]

↩ Parent

A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
The label key that the selector applies to.

Constraints: required, updatable
operator
string
Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.

Constraints: required, updatable
values
[]string
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index]

↩ Parent

A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
The label key that the selector applies to.

Constraints: required, updatable
operator
string
Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.

Constraints: required, updatable
values
[]string
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution

↩ Parent

A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.

Property
Description
nodeSelectorTerms
[]object
Required. A list of node selector terms. The terms are ORed.

Constraints: required, updatable
SGDbOps.spec.scheduling.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index]

↩ Parent

A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

Property
Description
matchExpressions
[]object
A list of node selector requirements by node’s labels.

Constraints: optional, updatable
matchFields
[]object
A list of node selector requirements by node’s fields.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index]

↩ Parent

A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
The label key that the selector applies to.

Constraints: required, updatable
operator
string
Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.

Constraints: required, updatable
values
[]string
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index]

↩ Parent

A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
The label key that the selector applies to.

Constraints: required, updatable
operator
string
Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.

Constraints: required, updatable
values
[]string
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

Constraints: optional, updatable

SGDbOps.spec.scheduling.podAffinity

↩ Parent

Pod affinity is a group of inter pod affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#podaffinity-v1-core

Property
Description
preferredDuringSchedulingIgnoredDuringExecution
[]object
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding “weight” to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.

Constraints: optional, updatable
requiredDuringSchedulingIgnoredDuringExecution
[]object
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]

↩ Parent

The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)

Property
Description
podAffinityTerm
object
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Constraints: required, updatable
weight
integer
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.

Constraints: required, updatable
Format: int32
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm

↩ Parent

Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Property
Description
topologyKey
string
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.

Constraints: required, updatable
labelSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
matchLabelKeys
[]string
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key in (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
mismatchLabelKeys
[]string
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key notin (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
namespaceSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
namespaces
[]string
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means “this pod’s namespace”.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index]

↩ Parent

Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Property
Description
topologyKey
string
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.

Constraints: required, updatable
labelSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
matchLabelKeys
[]string
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key in (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
mismatchLabelKeys
[]string
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key notin (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
namespaceSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
namespaces
[]string
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means “this pod’s namespace”.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable

SGDbOps.spec.scheduling.podAntiAffinity

↩ Parent

Pod anti affinity is a group of inter pod anti affinity scheduling rules.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#podantiaffinity-v1-core

Property
Description
preferredDuringSchedulingIgnoredDuringExecution
[]object
The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and subtracting “weight” from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.

Constraints: optional, updatable
requiredDuringSchedulingIgnoredDuringExecution
[]object
If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]

↩ Parent

The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)

Property
Description
podAffinityTerm
object
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Constraints: required, updatable
weight
integer
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.

Constraints: required, updatable
Format: int32
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm

↩ Parent

Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Property
Description
topologyKey
string
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.

Constraints: required, updatable
labelSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
matchLabelKeys
[]string
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key in (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
mismatchLabelKeys
[]string
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key notin (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
namespaceSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
namespaces
[]string
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means “this pod’s namespace”.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index]

↩ Parent

Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Property
Description
topologyKey
string
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.

Constraints: required, updatable
labelSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
matchLabelKeys
[]string
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key in (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
mismatchLabelKeys
[]string
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key notin (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn’t set.

Constraints: optional, updatable
namespaceSelector
object
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Constraints: optional, updatable
namespaces
[]string
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means “this pod’s namespace”.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector

↩ Parent

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Property
Description
matchExpressions
[]object
matchExpressions is a list of label selector requirements. The requirements are ANDed.

Constraints: optional, updatable
matchLabels
map[string]string
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

Constraints: optional, updatable
SGDbOps.spec.scheduling.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index]

↩ Parent

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Property
Description
key
string
key is the label key that the selector applies to.

Constraints: required, updatable
operator
string
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

Constraints: required, updatable
values
[]string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

Constraints: optional, updatable

SGDbOps.spec.scheduling.tolerations[index]

↩ Parent

The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator .

Property
Description
effect
string
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.

Constraints: optional, updatable
key
string
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.

Constraints: optional, updatable
operator
string
Operator represents a key’s relationship to the value. Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).

Constraints: optional, updatable
tolerationSeconds
integer
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.

Constraints: optional, updatable
Format: int64
value
string
Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.

Constraints: optional, updatable

SGDbOps.spec.securityUpgrade

↩ Parent

Configuration of security upgrade

Property
Description
method
string

The method used to perform the security upgrade operation. Available methods are:

  • InPlace: the in-place method does not require more resources than those that are available. In case only an instance of the StackGres cluster is present this mean the service disruption will last longer so we encourage use the reduced impact restart and especially for a production environment.
  • ReducedImpact: this procedure is the same as the in-place method but require additional resources in order to spawn a new updated replica that will be removed when the procedure completes.

Constraints: optional, updatable

SGDbOps.spec.vacuum

↩ Parent

Configuration of vacuum operation

Property
Description
analyze
boolean
If true, updates statistics used by the planner to determine the most efficient way to execute a query. Defaults to: true.

Constraints: optional, updatable
databases
[]object
List of databases to vacuum or repack, don’t specify to select all databases

Constraints: optional, updatable
disablePageSkipping
boolean
Normally, VACUUM will skip pages based on the visibility map. Pages where all tuples are known to be frozen can always be skipped, and those where all tuples are known to be visible to all transactions may be skipped except when performing an aggressive vacuum. Furthermore, except when performing an aggressive vacuum, some pages may be skipped in order to avoid waiting for other sessions to finish using them. This option disables all page-skipping behavior, and is intended to be used only when the contents of the visibility map are suspect, which should happen only if there is a hardware or software issue causing database corruption. Defaults to: false.

Constraints: optional, updatable
freeze
boolean
If true selects aggressive “freezing” of tuples. Specifying FREEZE is equivalent to performing VACUUM with the vacuum_freeze_min_age and vacuum_freeze_table_age parameters set to zero. Aggressive freezing is always performed when the table is rewritten, so this option is redundant when FULL is specified. Defaults to: false.

Constraints: optional, updatable
full
boolean
If true selects “full” vacuum, which can reclaim more space, but takes much longer and exclusively locks the table. This method also requires extra disk space, since it writes a new copy of the table and doesn’t release the old copy until the operation is complete. Usually this should only be used when a significant amount of space needs to be reclaimed from within the table. Defaults to: false.

Constraints: optional, updatable

SGDbOps.spec.vacuum.databases[index]

↩ Parent

Property
Description
name
string
the name of the database

Constraints: required, updatable
analyze
boolean
If true, updates statistics used by the planner to determine the most efficient way to execute a query. Defaults to: true.

Constraints: optional, updatable
disablePageSkipping
boolean
Normally, VACUUM will skip pages based on the visibility map. Pages where all tuples are known to be frozen can always be skipped, and those where all tuples are known to be visible to all transactions may be skipped except when performing an aggressive vacuum. Furthermore, except when performing an aggressive vacuum, some pages may be skipped in order to avoid waiting for other sessions to finish using them. This option disables all page-skipping behavior, and is intended to be used only when the contents of the visibility map are suspect, which should happen only if there is a hardware or software issue causing database corruption. Defaults to: false.

Constraints: optional, updatable
freeze
boolean
If true selects aggressive “freezing” of tuples. Specifying FREEZE is equivalent to performing VACUUM with the vacuum_freeze_min_age and vacuum_freeze_table_age parameters set to zero. Aggressive freezing is always performed when the table is rewritten, so this option is redundant when FULL is specified. Defaults to: false.

Constraints: optional, updatable
full
boolean
If true selects “full” vacuum, which can reclaim more space, but takes much longer and exclusively locks the table. This method also requires extra disk space, since it writes a new copy of the table and doesn’t release the old copy until the operation is complete. Usually this should only be used when a significant amount of space needs to be reclaimed from within the table. Defaults to: false.

Constraints: optional, updatable

SGDbOps.status

↩ Parent

Property
Description
benchmark
object
The results of the benchmark

Constraints: optional, updatable
conditions
[]object

Possible conditions are:

  • Running: to indicate when the operation is actually running
  • Completed: to indicate when the operation has completed successfully
  • Failed: to indicate when the operation has failed

Constraints: optional, updatable
majorVersionUpgrade
object
The results of a major version upgrade

Constraints: optional, updatable
minorVersionUpgrade
object
The results of a minor version upgrade

Constraints: optional, updatable
opRetries
integer
The number of retries performed by the operation

Constraints: optional, updatable
opStarted
string
The ISO 8601 timestamp of when the operation started running

Constraints: optional, updatable
restart
object
The results of a restart

Constraints: optional, updatable
securityUpgrade
object
The results of a security upgrade

Constraints: optional, updatable

SGDbOps.status.benchmark

↩ Parent

The results of the benchmark

Property
Description
pgbench
object
The results of the pgbench benchmark

Constraints: optional, updatable
sampling
object
The results of the sampling benchmark

Constraints: optional, updatable

SGDbOps.status.benchmark.pgbench

↩ Parent

The results of the pgbench benchmark

Property
Description
hdrHistogram
string
Compressed and base 64 encoded HdrHistogram

Constraints: optional, updatable
latency
object
The latency results of the pgbench benchmark

Constraints: optional, updatable
scaleFactor
number
The scale factor used to run pgbench (--scale).

Constraints: optional, updatable
statements
[]object
Average per-statement latency (execution time from the perspective of the client) of each command after the benchmark finishes

Constraints: optional, updatable
transactionsPerSecond
object
All the transactions per second results of the pgbench benchmark

Constraints: optional, updatable
transactionsProcessed
integer
The number of transactions processed.

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.latency

↩ Parent

The latency results of the pgbench benchmark

Property
Description
average
object
Average latency of transactions

Constraints: optional, updatable
standardDeviation
object
The latency standard deviation of transactions.

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.latency.average

↩ Parent

Average latency of transactions

Property
Description
unit
string
The latency measure unit

Constraints: optional, updatable
value
number
The latency average value

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.latency.standardDeviation

↩ Parent

The latency standard deviation of transactions.

Property
Description
unit
string
The latency measure unit

Constraints: optional, updatable
value
number
The latency standard deviation value

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.statements[index]

↩ Parent

Average per-statement latency (execution time from the perspective of the client) of a command after the benchmark finishes

Property
Description
command
string
The command

Constraints: optional, updatable
latency
number
Average latency of the command

Constraints: optional, updatable
script
integer
The script index (0 if no custom scripts have been defined)

Constraints: optional, updatable
unit
string
The average latency measure unit

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.transactionsPerSecond

↩ Parent

All the transactions per second results of the pgbench benchmark

Property
Description
excludingConnectionsEstablishing
object
Number of Transactions Per Second (tps) excluding connection establishing.

Constraints: optional, updatable
includingConnectionsEstablishing
object
Number of Transactions Per Second (tps) including connection establishing.

Constraints: optional, updatable
overTime
object
The Transactions Per Second (tps) values aggregated over unit of time

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.transactionsPerSecond.excludingConnectionsEstablishing

↩ Parent

Number of Transactions Per Second (tps) excluding connection establishing.

Property
Description
unit
string
Transactions Per Second (tps) measure unit

Constraints: optional, updatable
value
number
The Transactions Per Second (tps) excluding connections establishing value

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.transactionsPerSecond.includingConnectionsEstablishing

↩ Parent

Number of Transactions Per Second (tps) including connection establishing.

Property
Description
unit
string
Transactions Per Second (tps) measure unit

Constraints: optional, updatable
value
number
The Transactions Per Second (tps) including connections establishing value

Constraints: optional, updatable
SGDbOps.status.benchmark.pgbench.transactionsPerSecond.overTime

↩ Parent

The Transactions Per Second (tps) values aggregated over unit of time

Property
Description
intervalDuration
number
The interval duration used to aggregate the transactions per second.

Constraints: optional, updatable
intervalDurationUnit
string
The interval duration measure unit

Constraints: optional, updatable
values
[]number
The Transactions Per Second (tps) values aggregated over unit of time

Constraints: optional, updatable
valuesUnit
string
The Transactions Per Second (tps) measures unit

Constraints: optional, updatable

SGDbOps.status.benchmark.sampling

↩ Parent

The results of the sampling benchmark

Property
Description
queries
[]object
The queries sampled.

Constraints: optional, updatable
topQueries
[]object
The top queries sampled with the stats from pg_stat_statements. If is omitted if omitTopQueriesInStatus is set to true.

Constraints: optional, updatable
SGDbOps.status.benchmark.sampling.queries[index]

↩ Parent

Property
Description
id
string
The query id of the representative statement calculated by Postgres

Constraints: optional, updatable
query
string
A sampled SQL query

Constraints: optional, updatable
timestamp
string
The sampled query timestamp

Constraints: optional, updatable
SGDbOps.status.benchmark.sampling.topQueries[index]

↩ Parent

Property
Description
id
string
The query id of the representative statement calculated by Postgres

Constraints: optional, updatable
stats
map[string]string
stats collected by the top queries query

Constraints: optional, updatable

SGDbOps.status.conditions[index]

↩ Parent

Property
Description
lastTransitionTime
string
Last time the condition transitioned from one status to another.

Constraints: optional, updatable
message
string
A human-readable message indicating details about the transition.

Constraints: optional, updatable
observedGeneration
integer
The .metadata.generation the condition was computed against.

Constraints: optional, updatable
Format: int64
reason
string
The reason for the condition last transition.

Constraints: optional, updatable
status
string
Status of the condition, one of True, False or Unknown.

Constraints: optional, updatable
type
string
Type of deployment condition.

Constraints: optional, updatable

SGDbOps.status.majorVersionUpgrade

↩ Parent

The results of a major version upgrade

Property
Description
failure
string
A failure message (when available)

Constraints: optional, updatable
initialInstances
[]string
The instances present when the operation started

Constraints: optional, updatable
pendingToRestartInstances
[]string
The instances that are pending to be restarted

Constraints: optional, updatable
phase
string

The phase the operation is or was executing.

When manualRollback is true and the operation is paused waiting for a rollback decision the phase is set to wait-post-failed-upgrade-decision (the upgrade failed) or wait-post-upgrade-decision (the upgrade succeeded, before the cleanup that removes the source data).


Constraints: optional, updatable
primaryInstance
string
The primary instance when the operation started

Constraints: optional, updatable
restartedInstances
[]string
The instances that have been restarted

Constraints: optional, updatable
rollback
boolean
Set when manualRollback is true to resolve a paused operation (when the phase is wait-post-failed-upgrade-decision or wait-post-upgrade-decision). When false the operation continues (assuming the upgrade was performed manually) and waits for readiness; when true the operation performs a rollback.

Constraints: optional, updatable
sourcePostgresVersion
string
The postgres version currently used by the primary instance

Constraints: optional, updatable
targetPostgresVersion
string
The postgres version that the cluster will be upgraded to

Constraints: optional, updatable

SGDbOps.status.minorVersionUpgrade

↩ Parent

The results of a minor version upgrade

Property
Description
failure
string
A failure message (when available)

Constraints: optional, updatable
initialInstances
[]string
The instances present when the operation started

Constraints: optional, updatable
pendingToRestartInstances
[]string
The instances that are pending to be restarted

Constraints: optional, updatable
primaryInstance
string
The primary instance when the operation started

Constraints: optional, updatable
restartedInstances
[]string
The instances that have been restarted

Constraints: optional, updatable
sourcePostgresVersion
string
The postgres version currently used by the primary instance

Constraints: optional, updatable
switchoverFinalized
string
An ISO 8601 date indicating if and when the switchover finalized

Constraints: optional, updatable
switchoverInitiated
string
An ISO 8601 date indicating if and when the switchover initiated

Constraints: optional, updatable
targetPostgresVersion
string
The postgres version that the cluster will be upgraded (or downgraded) to

Constraints: optional, updatable

SGDbOps.status.restart

↩ Parent

The results of a restart

Property
Description
failure
string
A failure message (when available)

Constraints: optional, updatable
initialInstances
[]string
The instances present when the operation started

Constraints: optional, updatable
pendingToRestartInstances
[]string
The instances that are pending to be restarted

Constraints: optional, updatable
primaryInstance
string
The primary instance when the operation started

Constraints: optional, updatable
restartedInstances
[]string
The instances that have been restarted

Constraints: optional, updatable
switchoverFinalized
string
An ISO 8601 date indicating if and when the switchover finalized

Constraints: optional, updatable
switchoverInitiated
string
An ISO 8601 date indicating if and when the switchover initiated

Constraints: optional, updatable

SGDbOps.status.securityUpgrade

↩ Parent

The results of a security upgrade

Property
Description
failure
string
A failure message (when available)

Constraints: optional, updatable
initialInstances
[]string
The instances present when the operation started

Constraints: optional, updatable
pendingToRestartInstances
[]string
The instances that are pending to be restarted

Constraints: optional, updatable
primaryInstance
string
The primary instance when the operation started

Constraints: optional, updatable
restartedInstances
[]string
The instances that have been restarted

Constraints: optional, updatable
switchoverFinalized
string
An ISO 8601 date indicating if and when the switchover finalized

Constraints: optional, updatable
switchoverInitiated
string
An ISO 8601 date indicating if and when the switchover initiated

Constraints: optional, updatable