Skip to content

API Reference for v1alpha1

Managed Postgres Operator's API documentation for version v1alpha1

The package managed-postgres-operator.hoppscale.com/v1alpha1 contains the following custom resources:

Packages

PostgresDatabase

PostgresDatabase represents a database in a PostgreSQL server.

Field Required Description
apiVersion
string
managed-postgres-operator.hoppscale.com/v1alpha1
kind
string
PostgresDatabase
metadata
ObjectMeta
Refer to Kubernetes API documentation for fields of metadata.
spec
PostgresDatabaseSpec
status
PostgresDatabaseStatus

PostgresDatabaseSpec

PostgresDatabaseSpec holds the specification of a PostgreSQL database.

Field Required Description
name
string
The database's name.
owner
string
Database's owner role. If omitted, the owner will be the operator's role.
Default: ""
extensions
[]string
List of the extensions to install in the database.
Default: []
keepOnDelete
bool
On true, the Kubernetes resource deletion will not delete the associated PostgreSQL database.
Default: false
preserveConnectionsOnDelete
bool
On true, the operator will drop all connections before deleting the PostgreSQL database.
Default: false
privilegesByRole
map[string]DatabasePrivilegesSpec
For a given role, grant privileges on the database.
Default: {}

PostgresDatabasePrivilegesSpec

Field Required Description
create
bool
On true, grant CREATE privilege on the database to the role.
Default: false
connect
bool
On true, grant CONNECT privilege on the database to the role.
Default: false
temporary
bool
On true, grant TEMPORARY privilege on the database to the role.
Default: false

PostgresDatabaseStatus

Field Description
succeeded
bool
Whether the database is has been successfully reconciled or not.

PostgresRole

PostgresRole represents a role in a PostgreSQL server.

This resource aims to implement most of the PostgreSQL role's parameters: https://www.postgresql.org/docs/current/sql-createrole.html.

Field Required Description
apiVersion
string
managed-postgres-operator.hoppscale.com/v1alpha1
kind
string
PostgresRole
metadata
ObjectMeta
Refer to Kubernetes API documentation for fields of metadata.
role spec
PostgresRoleSpec
status
PostgresRoleStatus

PostgresRoleSpec

PostgresRoleSpec holds the specification of a PostgreSQL role.

Field Required Description
name
string
The role's name.
superUser
bool
On true, the role is a "superuser" who can override all access restrictions within the database.
Default: false
createDB
bool
On true, the role is allowed to create new databases.
Default: false
createRole
bool
On true, the role is allowed to create, alter, drop, comment on, and change the security label for other roles.
Default: false
inherit
bool
On true, the role inherit the permissions of the role of which it is member.
Default: false
login
bool
On true, the role is allowed to log in.
Default: false
replication
bool
On true, the role is a replication role.
Default: false
bypassRLS
bool
On true, the role bypasses every row-level security (RLS) policy.
Default: false
keepOnDelete
bool
On true, the Kubernetes resource deletion will not delete the associated PostgreSQL role.
Default: false
passwordFromSecret
PostgresRolePasswordFromSecret
Reference to a Secret containing the role's password.
Default: null
secretName
string
Name of the Secret the operator should create, containing the role's log in information.
Default: ""
secretTemplate
map[string]string
Dictionnary containing the key/value to configure in the Secret created by the operator (cf. secretName).
Default: {}
memberOfRoles
[]string
List of role's names of which the role should be member of.
Default: []

PostgresRoleStatus

Field Description
succeeded
bool
Whether the role is has been successfully reconciled or not.

PostgresSchema

PostgresSchema represents a schema in a PostgreSQL server.

Field Required Description
apiVersion
string
managed-postgres-operator.hoppscale.com/v1alpha1
kind
string
PostgresSchema
metadata
ObjectMeta
Refer to Kubernetes API documentation for fields of metadata.
spec
PostgresSchemaSpec
status
PostgresRoleStatus

PostgresSchemaSpec

PostgresSchemaSpec holds the specification of a PostgreSQL schema.

Field Required Description
database
string
The database's name containing the schema.
name
bool
The schema's name.
owner
bool
Schema's owner role. If omitted, the owner will be the database's owner.
Default: ""
keepOnDelete
bool
On true, the Kubernetes resource deletion will not delete the associated PostgreSQL schema.
Default: false
privilegesByRole
map[string]PostgresSchemaPrivilegesSpec
For a given role, grant privileges on the schema.
Default: {}

PostgresSchemaPrivilegesSpec

Field Required Description
create
bool
On true, grant CREATE privilege on the schema to the role.
Default: false
usage
bool
On true, grant USAGE privilege on the schema to the role.
Default: false

PostgresSchemaStatus

Field Description
succeeded
bool
Whether the schema has been successfully reconciled or not.