Kubernetes Custom Resource Definition parameters
This directory contains all CRDs installed by the Delphix Operator Helm chart.
CRD Overview
| Kind | Group | CRD Name | Scope |
|---|---|---|---|
| PostgresVDB | core.delphix.com | postgresvdbs.core.delphix.com | Namespaced |
| PostgresRefresh | actions.delphix.com | postgresrefreshes.actions.delphix.com | Namespaced |
| PostgresSnapshot | actions.delphix.com | postgressnapshots.actions.delphix.com | Namespaced |
| PostgresTask | actions.delphix.com | postgrestasks.actions.delphix.com | Namespaced |
| VDBRefresh | actions.delphix.com | vdbrefreshes.actions.delphix.com | Namespaced |
| VDBRewind | actions.delphix.com | vdbrewinds.actions.delphix.com | Namespaced |
| VDBSnapshot | actions.delphix.com | vdbsnapshots.actions.delphix.com | Namespaced |
| Task | actions.delphix.com | tasks.actions.delphix.com | Namespaced |
PostgresVDB
Represents a PostgreSQL Virtual Database (VDB) — a thin-clone PostgreSQL instance backed by a Delphix data source or an existing PVC.
kubectl get postgresvdb
kubectl describe postgresvdb <name>
Columns: PVC · Port · Phase · Ready · DelphixVDB · DelphixID (wide) · Age
Spec
| Field | Type | Required | Description |
|---|---|---|---|
| source.type | string (enum) | Yes | Source type: dct-source, pvc-clone, k8s-snapshot, or pvc-adopt |
| source.reference | string | Yes | Name of the PVC, snapshot, or Delphix object to clone from |
| source.namespace | string | No | Namespace of the source object (defaults to same namespace) |
| database.name | string | Yes | PostgreSQL database name. Default: postgres |
| database.user | string | Yes | PostgreSQL user. Default: postgres |
| database.password | string | Yes | Database password (min 8 chars). Mutually exclusive with database.passwordSecretRef |
| database.passwordSecretRef | string | Yes | Name of a Kubernetes Opaque Secret containing key password. Mutually exclusive with database.password |
| enabled | boolean | No | Set to false to stop (scale to 0) the VDB. Default: true |
| mode | string (enum) | No | Primary (default) or Standby |
| port | integer | No | PostgreSQL port. Default: 5432. Range: 1024–49151 |
| image | string | No | PostgreSQL container image. Default: postgres:13 |
| initImage | string | No | Image for POSIX shell init containers. Defaults to spec.image if unset. |
| pvcStorageSize | string | No | PVC size request (resource quantity). Default: 1Gi |
| mountPath | string | No | Data volume mount path. Default: /mnt/postgres |
| vdbGroupName | string | No | Logical group name for the VDB. Default: Untitled |
| envName | string | No | Delphix environment name. Required for dct-source type. |
| targetEngineName | string | No | Target engine name. Required for pvc-clone and k8s-snapshot types. |
| snapshotID | string | No | Snapshot ID (DCT source only) |
| postgresConfig | object[] | No | Array of {name, value, comment} objects to inject into postgresql.conf |
| hooks | object | No | Lifecycle hook scripts. See Hooks below. |
| recovery | object | No | Standby recovery config: primaryHost, replicationUser, primaryPort, etc. |
| resources | object | No | Pod resource requests and limits |
| scheduling | object | No | nodeSelector, tolerations, and affinity for the VDB pod |
| OwnershipSpec | string | No | File ownership for data directory. Pattern: UID:GID. Default: 999:999 |
| errorBackoffPeriod | string | No | Backoff period on reconcile errors. Default: 5m |
Hooks
Each hook in spec.hooks[]:
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
name |
string |
yes |
Unique hook name |
|
script |
string |
yes |
Script content |
|
stage |
string (enum) |
yes |
When to run: post-create, pre-refresh, post-refresh, pre-rewind, post-rewind, pre-snapshot, post-snapshot |
|
type |
string (enum) |
yes |
sql (default) or command |
|
database |
string |
no |
Target database (defaults to spec.database.name) |
|
env |
object[] |
no |
Environment variables (Kubernetes EnvVar format) |
|
continueOnError |
boolean |
no |
Default: false |
|
retries |
integer |
no |
Number of retries on failure |
|
retryDelaySeconds |
integer |
no |
Delay between retries |
|
timeoutSeconds |
integer |
no |
Execution timeout in seconds |
Status
|
Field |
Description |
|---|---|
|
phase |
Pending, Provisioning, Configuring, Deploying, Ready, Stopped, Error, or Terminating |
|
state |
Running, Stopped, or Error |
|
ready |
true when the VDB is healthy and accepting connections |
|
pvcName |
Name of the PVC backing this VDB |
|
currentMode |
Current database mode (Primary or Standby) |
|
delphixVDBName |
VDB name in Delphix DCT (if DCT-managed) |
|
delphixVDBId |
VDB ID in Delphix DCT (if DCT-managed) |
|
connectionString |
Connection string for the VDB |
|
conditions |
Standard Kubernetes conditions array |
|
executedHooks |
List of hook names that have completed |
|
modeTransitionTask |
Name of an in-progress mode transition task |
Example
apiVersion: core.delphix.com/v1alpha1
kind: PostgresVDB
metadata:
name: my-vdb
namespace: default
spec:
source:
type: dct-source
reference: "engine:my-dsource"
envName: dev-environment
vdbGroupName: development
database:
name: myapp
user: postgres
passwordSecretRef: my-vdb-password
port: 5432
pvcStorageSize: 10Gi
PostgresRefresh
Refreshes a PostgresVDB from its source (latest snapshot or a specific snapshot/bookmark). The VDB is stopped, refreshed via DCT, then restarted.
kubectl get postgresrefresh
kubectl describe postgresrefresh <name>
Columns: Phase · VDB · Age
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
vdbRef.name |
string |
yes |
Name of the target PostgresVDB |
|
vdbRef.kind |
string |
yes |
Must be PostgresVDB |
|
vdbRef.namespace |
string |
no |
Namespace of the VDB (defaults to same namespace) |
|
snapshotRef.type |
string (enum) |
no |
dct-snapshot, dct-bookmark, or volume-snapshot. Omit snapshotRef entirely for LATEST. |
|
snapshotRef.name |
string |
no |
Snapshot/bookmark name (required when snapshotRef.type is set) |
|
mode |
string (enum) |
no |
Desired mode after refresh: Primary or Standby. Defaults to the VDB’s current spec mode. |
|
reenableOnFailure |
boolean |
no |
Re-enable the VDB if refresh fails before the DCT job starts. Default: true |
Status
|
Field |
Description |
|---|---|
|
workflowPhase |
Pending → PreRefresh → Stopping → Refreshing → Starting → PostRefresh → Finalizing → Completed / Error |
|
usedSnapshot |
Snapshot actually used (important when LATEST was resolved) |
|
dctJobId |
DCT job ID for the refresh operation |
|
currentLsn |
PostgreSQL LSN captured before refresh |
|
lastError |
Error message if phase is Error |
|
progress |
Percentage progress reported by DCT |
|
conditions |
Standard Kubernetes conditions |
Example
apiVersion: actions.delphix.com/v1alpha1
kind: PostgresRefresh
metadata:
name: refresh-my-vdb
namespace: default
spec:
vdbRef:
kind: PostgresVDB
name: my-vdb
# snapshotRef omitted → uses LATEST
PostgresSnapshot
Takes a Kubernetes VolumeSnapshot of a PostgresVDB’s PVC, with optional pre/post hook tasks and backup coordination (pg_start_backup / pg_stop_backup).
kubectl get postgressnapshot
kubectl describe postgressnapshot <name>
Columns: Phase · Source_VDB · Age · Snapshot · Ready · Size
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
vdbRef.name |
string |
yes |
Name of the target PostgresVDB |
|
vdbRef.kind |
string |
yes |
Must be PostgresVDB |
|
vdbRef.namespace |
string |
no |
Namespace of the VDB |
|
autoCheckpoint |
boolean |
no |
Run pg_start_backup / pg_stop_backup around the snapshot. Default: true |
|
captureLSN |
boolean |
no |
Capture the LSN at snapshot time. Default: true |
|
volumeSnapshotClassName |
string |
no |
VolumeSnapshotClass to use. Auto-discovered from the PVC’s StorageClass if unset. |
|
database |
string |
no |
Database name for backup control commands |
|
user |
string |
no |
Database user for backup control commands |
|
preSnapshot |
object |
no |
TaskSpec to run before the snapshot (see Task spec) |
|
postSnapshot |
object |
no |
TaskSpec to run after the snapshot (see Task spec) |
Status
|
Field |
Description |
|---|---|
|
phase |
Current phase of the snapshot workflow |
|
dctBookmarkName |
DCT bookmark name derived from the VolumeSnapshotContent name |
|
volumeSnapshot |
Name of the created VolumeSnapshot |
|
volumeSnapshotInfo |
Snapshot details: name, readyToUse, restoreSize, creationTime |
|
postgresLSN |
LSN at snapshot time |
|
databaseMode |
Database mode (Primary/Standby) at snapshot time |
|
lastError |
Error message on failure |
Example
apiVersion: actions.delphix.com/v1alpha1
kind: PostgresSnapshot
metadata:
name: my-snapshot
namespace: default
spec:
vdbRef:
kind: PostgresVDB
name: my-vdb
autoCheckpoint: true
captureLSN: true
VDBRefresh
Database-agnostic facade for refreshing a VDB. For PostgresVDB targets, the controller creates and delegates to a PostgresRefresh.
kubectl get vdbrefresh
kubectl describe vdbrefresh <name>
Columns: Phase · VDB · Age
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
vdbRef.kind |
string |
yes |
Kind of target VDB (e.g. PostgresVDB) |
|
vdbRef.name |
string |
yes |
Name of the target VDB |
|
vdbRef.namespace |
string |
no |
Namespace of the VDB |
|
snapshotRef.type |
string (enum) |
no |
dct-snapshot, dct-bookmark, or volume-snapshot. Omit snapshotRef entirely for LATEST. |
|
snapshotRef.name |
string |
no |
Snapshot/bookmark name |
Status
|
Field |
Description |
|---|---|
|
phase |
Pending, Running, Completed, or Failed |
|
usedSnapshot |
Snapshot reference that was used |
|
dctJobId |
Underlying DCT job ID |
|
lastError |
Error message on failure |
|
conditions |
Standard Kubernetes conditions |
VDBRewind
Database-agnostic facade for rewinding a VDB to a volume snapshot. Creates a VDBRefresh under the hood after validating that the snapshot belongs to the target VDB.
kubectl get vdbrewind
kubectl describe vdbrewind <name>
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
vdbRef.kind |
string |
yes |
Kind of target VDB (e.g. PostgresVDB) |
|
vdbRef.name |
string |
yes |
Name of the target VDB |
|
vdbRef.namespace |
string |
no |
Namespace of the VDB |
|
snapshotRef.type |
string (enum) |
no |
dct-snapshot, dct-bookmark, or volume-snapshot. |
|
snapshotRef.name |
string |
no |
Name of the VolumeSnapshot / PostgresSnapshot to rewind to |
Status
|
Field |
Description |
|---|---|
|
phase |
Pending, Running, Completed, or Failed |
|
usedSnapshot |
Snapshot reference that was used |
|
dctJobId |
Underlying DCT job ID |
|
lastError |
Error message on failure |
Example
apiVersion: actions.delphix.com/v1alpha1
kind: VDBRewind
metadata:
name: rewind-my-vdb
namespace: default
spec:
vdbRef:
kind: PostgresVDB
name: my-vdb
snapshotRef:
type: volume-snapshot
name: my-snapshot
VDBSnapshot
Database-agnostic facade for taking a VolumeSnapshot of a VDB. Delegates to a PostgresSnapshot for PostgresVDB targets.
kubectl get vdbsnapshot
kubectl describe vdbsnapshot <name>
Columns: Phase · VDB · Age · Snapshot · Ready · Size
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
vdbRef.kind |
string |
yes |
Kind of target VDB |
|
vdbRef.name |
string |
yes |
Name of the target VDB |
|
vdbRef.namespace |
string |
no |
Namespace of the VDB |
|
volumeSnapshotClassName |
string |
no |
VolumeSnapshotClass to use. Auto-discovered if unset. |
|
preSnapshot |
object |
no |
TaskSpec to run before the snapshot |
|
postSnapshot |
object |
no |
TaskSpec to run after the snapshot |
Status
|
Field |
Description |
|---|---|
|
phase |
Current snapshot phase |
|
ready |
true when the snapshot is ready to use |
|
volumeSnapshot |
Name of the created VolumeSnapshot |
|
volumeSnapshotInfo |
Snapshot details: name, readyToUse, restoreSize |
|
lastError |
Error message on failure |
PostgresTask
Executes a SQL statement, shell command, or script against a running PostgresVDB.
kubectl get postgrestask
kubectl describe postgrestask <name>
Columns: Type · Target · Phase · ExitCode · Age
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
targetRef.kind |
string |
yes |
Must be PostgresVDB |
|
targetRef.name |
string |
yes |
Name of the target VDB |
|
targetRef.namespace |
string |
no |
Namespace of the VDB |
|
type |
string (enum) |
yes |
Task type: sql, command, or script |
|
content |
string |
yes |
The SQL statement, shell command, or script body |
|
database |
string |
no |
Database to connect to. Defaults to the VDB’s spec.database.name |
|
user |
string |
no |
Database user. Defaults to the VDB’s spec.database.user |
|
parameters |
object[] |
no |
Array of {name, value} pairs for parameterized SQL |
|
outputMode |
string (enum) |
no |
Result format: table (default), csv, or json |
|
env |
object[] |
no |
Environment variables (Kubernetes EnvVar format) |
|
retryPolicy |
object |
no |
{maxRetries: integer, delay: integer} |
|
timeoutSeconds |
integer |
no |
Execution timeout in seconds |
Status
|
Field |
Description |
|---|---|
|
phase |
Pending, Running, Succeeded, Failed, or Retrying |
|
exitCode |
Exit code from the executed command |
|
output |
Stdout of the task execution |
|
rowCount |
Number of rows affected (SQL tasks) |
|
duration |
Execution duration |
|
lastError |
Error message on failure |
|
executionCount |
Total number of execution attempts |
Example
apiVersion: actions.delphix.com/v1alpha1
kind: PostgresTask
metadata:
name: run-migration
namespace: default
spec:
targetRef:
kind: PostgresVDB
name: my-vdb
type: sql
content: |
ALTER TABLE orders ADD COLUMN processed_at TIMESTAMPTZ;
database: myapp
Task
Generic task execution framework. Routes to the appropriate database-specific task controller based on targetRef.kind.
kubectl get task
kubectl describe task <name>
Columns: Type · Target · Phase · Age
Spec
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
targetRef.kind |
string |
yes |
Kind of target resource (e.g. PostgresVDB) |
|
targetRef.name |
string |
yes |
Name of the target resource |
|
targetRef.namespace |
string |
no |
Namespace of the target resource |
|
type |
string (enum) |
yes |
sql, command, or script |
|
content |
string |
yes |
Task payload |
|
retryPolicy |
object |
no |
{maxRetries: integer, delay: integer} |
|
timeoutSeconds |
integer |
no |
Execution timeout in seconds |
Status
|
Field |
Description |
|---|---|
|
phase |
Pending, Running, Succeeded, Failed, or Retrying |
|
output |
Task output |
|
lastError |
Error message on failure |
|
executionCount |
Total execution attempts |
Snapshot Reference Types
Several CRDs accept a snapshotRef field. The valid type values are:
|
Type |
Description |
name format |
|---|---|---|
|
dct-snapshot |
A snapshot in Delphix DCT |
<number>-(APPDATA\|ORACLE)_SNAPSHOT-<number> |
|
dct-bookmark |
A named bookmark in Delphix DCT |
Alphanumeric, hyphens, underscores |
|
volume-snapshot |
A Kubernetes VolumeSnapshot resource |
Name of the VolumeSnapshot object |
Omit snapshotRef entirely to use the latest available snapshot.