API: PostgresqlStandalone

Example 1. PostgresqlStandalone Kubernetes API spec
apiVersion: postgresql.appcat.vshn.io/v1alpha1
kind: PostgresqlStandalone
metadata:
  name: my-instance
  namespace: default
spec:
  backup:
    enabled: true
  forInstance:
    enableSuperUser: true
    majorVersion: v14
    resources:
      memoryLimit: 256Mi
      storageCapacity: 1Gi
  writeConnectionSecretToRef: {}

forInstance

enableSuperUser

Exposes the credentials for the postgres super user into the connection secret. This allows complete control over the database server.

For example, users can create multiple databases and users on the same instance.

majorVersion

The major version for PostgreSQL to install.

Once the instance resource is created using a specific major version, it cannot be changed afterwards.

resources

memoryLimit

Maximum memory the instance can use (shared over all databases). If the usage exceeds this limit, an OOM (Out-of-Memory) exception causes the instance to crash. In such cases the instance automatically restarted by Kubernetes.

storageCapacity

Maximum storage capacity allocated for the instance (shared over all databases). If the disk usage exceeds this limit, PostgreSQL will encounter Out-of-Space errors and crash. In such cases the user must manually increase the storage limit.

Storage capacity can only be increased (grow).