gkebackup.gke.io/v1
Contains the API schema definitions for the gkebackup.gke.io v1 API group.
BackupAllRestoreAll
Defines a strategy that backs up everything selected in this component, and restores everything during restoration.
Appears in: - Strategy
Field | Description |
---|---|
backupPreHooks HookSpec array |
A list of hooks that are executed before backing up all selected volumes of this component. These are usually the quiesce steps. The execution target Pods are all Pods within this component. |
backupPostHooks HookSpec array |
A list of hooks that are executed after all volumes of this component are backed up. These are usually the un-quiesce steps. The execution target Pods are all Pods within this component. |
volumeSelector LabelSelector |
A label selector that is used to select persistent volumes that are backed up and restored within this component. All persistent volumes are selected if this is not provided. |
BackupJobList
Contains a list of backup jobs.
Field | Description |
---|---|
apiVersion string |
gkebackup.gke.io/v1 |
kind string |
BackupJobList |
metadata ListMeta |
Refer to Kubernetes API documentation for fields of metadata . |
items BackupJob array |
BackupJobSpec
Defines the desired state of the backup job.
Appears in: - BackupJob
Field | Description |
---|---|
backupName string |
The control plane backup name that the backup job is executing against. The name is immutable. |
BackupJobStatus
Defines the observed state of the backup job.
Appears in: - BackupJob
Field | Description |
---|---|
phase BackupJobPhase |
The current phase of the backup. |
message string |
A human-readable message indicating details about why the backup is in this state. |
reason string |
A brief camel case string that describes any update and is used for machine parsing and tidy display. |
BackupOneRestoreAll
Defines a strategy that only backs up volumes from one Pod within this component, and these volumes are restored to all other Pods during restoration. This strategy is used for applications that are deployed in a high-availability configuration of one primary and one or more secondaries. This strategy is exclusively applicable to StatefulSet
components that use a defined volumeClaimTemplate
resource to provision volumes.
If a component consists of multiple Deployment
resources, all deployments must have exactly one replica, all replicas must have the same number of persistent volumes, and all persistent volumes must be defined in the same order. These volumes are defined in the .spec.template.spec.volumes
field, and non-persistent volumes will be skipped.
If a component consists of multiple StatefulSet
resources, all StatefulSet
resources must have the same number of volume claim templates, and all volume claim templates must follow the same order. They are defined in the .spec.volumeClaimTemplates
field.
Appears in: - Strategy
Field | Description |
---|---|
backupTargetName string |
The name of the preferred Deployment or StatefulSet resource that is used for backup. We selectthe target Pod based on how this component is composed. For multi-Deployment , pick the only Pod created by this Deployment resource. For multi-StatefulSet , pick the first Pod created by the target StatefulSet resource. For single-StatefulSet , pick the second Pod created by the target StatefulSet resource. |
backupPreHooks HookSpec array |
A list of hooks that are executed before backing up all selected volumes of this component. These are usually the quiesce steps. Hooks are only executed on the selected backup Pod. |
backupPostHooks HookSpec array |
A list of hooks that are executed after all volumes of this component are backed up. These are usually the un-quiesce steps. Hooks are only executed on selected backup Pod. |
volumeSelector LabelSelector |
A label selector that is used to select all persistent volumes that are backed up within the target Pod. It is possible that the selector will select volumes outside of the target Pod, but only volumes belonging to the target Pod are backed up. Those volume backups are restored to all other volumes selected by the selector during restoration. All persistent volumes are selected if this is not provided. |
Component
Defines a subset of application resources and their backup and restore strategies. An individual component is represented either by a list of StatefulSet
or Deployment
resources.
Appears in: - ProtectedApplicationSpec
Field | Description |
---|---|
name string |
The unique name of this component. |
resourceKind ResourceKind |
The kind of resources included in this component. The resource kind can only be Deployment or StatefulSet or Pod . The Pod resource kind only supports the BackupAllRestoreAll strategy at this time. |
resourceNames string array |
The names of resources which belong to this component. It must be a list of names of Deployment , StatefulSet , or Pod resources based on what is defined in the resourceKind field. |
strategy Strategy |
The details of how to back up and restore this component. |
DumpAndLoad
Defines a strategy where backup and restore of a component is achieved using application specific tools for dumping and loading data, like mysqldump
for MySQL or pg_dump
for PostgreSQL. Dump files are stored in a dedicated volume. Only the dedicated volumes are selected to be backed up for this strategy. The dump target and load target could be different. This strategy is exclusively applicable to StatefulSet
components that use a defined volumeClaimTemplate
resource to provision volumes.
Appears in: - Strategy
Field | Description |
---|---|
dumpTarget string |
The name of a preferred Deployment or StatefulSet resource that is used to dump the component data. We select the target Pod based on how this component is composed. For Deployment , pick the only Pod created by the target Deployment resource. For single-StatefulSet , pick the second Pod created by the target StatefulSet resource if the replica number is greater than two. Otherwise, pick the only Pod. For multi-StatefulSet , pick the first Pod created by the target StatefulSet resource. |
loadTarget string |
The name of the preferred Deployment or StatefulSet resource that is used to load the component data. We select the target Pod based on how this component is composed. For Deployment , pick the only Pod created by target Deployment resource. For StatefulSet , always pick the first Pod created by target StatefulSet resource. |
dumpHooks HookSpec array |
A list of hooks that are used to dump the data of this component into a dedicated volume. The execution target Pod is one of the Pods selected from the DumpTarget field. |
backupPostHooks HookSpec array |
A list of hooks that are executed after a dedicated dump volume is backed up. These are usually clean up steps. |
loadHooks HookSpec array |
A list of hooks that are used to load the data of this component from a dedicated volume. It might include clean up steps after the load is completed. The execution target Pod is one of the Pods selected from the LoadTarget field. |
volumeSelector LabelSelector |
A label selector that must select dedicated volumes that are used to dump and load the application data. Only one volume must be selected in both the DumpTarget and LoadTarget fields. |
HookFailurePolicy
Underlying type: string
The desired behavior to take if hook execution runs into error.
Appears in: - HookSpec
HookSpec
Defines how a hook is executed in a selected container, assuming the target Pod has been selected.
Appears in: - BackupAllRestoreAll - BackupOneRestoreAll - DumpAndLoad
Field | Description |
---|---|
name string |
The name of this hook. This field is used to identify the status of hook execution, and any errors that are encountered. |
container string |
The container that this hook executes on. If unspecified, it executes on the first container of the Pod. |
command string array |
The command to execute. The hook command to run. For example, ["/sbin/fsfreeze", "--freeze"] . |
timeoutSeconds integer |
The timeout of the hook in seconds. If unspecified, the default value is 30 . |
onError HookFailurePolicy |
The desired behavior to follow when the hook execution runs into an error. Valid values are Ignore or Fail . If unspecified, the value will be Fail . |
ProtectedApplication
Defines the schema for the Protectedapplication
API.
Appears in: - ProtectedApplicationList
Field | Description |
---|---|
apiVersion string |
gkebackup.gke.io/v1 |
kind string |
ProtectedApplication |
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata . |
spec ProtectedApplicationSpec |
|
status ProtectedApplicationStatus |
ProtectedApplicationError
Contains detailed error information for this ProtectedApplication
resource.
Appears in: - ProtectedApplicationStatus
Field | Description |
---|---|
reason string |
A camel case string that describes any error and is used for machine parsing and tidy display. |
message string |
A human-readable message indicating details about the error. |
ProtectedApplicationList
Contains a list of ProtectedApplication
resources.
Field | Description |
---|---|
apiVersion string |
gkebackup.gke.io/v1 |
kind string |
ProtectedApplicationList |
metadata ListMeta |
Refer to Kubernetes API documentation for fields of metadata . |
items ProtectedApplication array |
ProtectedApplicationSpec
Defines relevant resources that belong to a ProtectedApplication
, and how the given application must be backed up or restored.
Appears in: - ProtectedApplication
Field | Description |
---|---|
resourceSelection ResourceSelection |
The resources that belong to this ProtectedApplication . |
components Component array |
The components of this protected application. |
ProtectedApplicationStatus
Defines the status of this ProtectedApplication
resource.
Appears in: - ProtectedApplication
Field | Description |
---|---|
readyToBackup boolean |
Specifies whether this ProtectedApplication resource is ready to backup. A ProtectedApplication resource is not ready if it contains any errors. |
error ProtectedApplicationError array |
The errors relating to this protected application. For example, one component configuration is invalid. |
ResourceKind
Underlying type: string
Defines the kind of the resource.
Appears in: - Component
ResourceSelection
Defines how to identify the resources belonging to this application.
Appears in: - ProtectedApplicationSpec
Field | Description |
---|---|
type ResourceSelectionType |
The type of application source. The Type field must be ApplicationName or Selector . This is the union discriminator. |
applicationName string |
The name of a sig-apps application within the same namespace. This is the application the data protection specification applies to. |
selector LabelSelector |
The resources in the same namespace as the ProtectedApplication resource that are selected. The data protection specification is applied to these resources. |
ResourceSelectionType
Underlying type: string
The types of selection.
Appears in: - ResourceSelection
RestoreJob
Defines the schema for the RestoreJob
API
Appears in: - RestoreJobList
Field | Description |
---|---|
apiVersion string |
gkebackup.gke.io/v1 |
kind string |
RestoreJob |
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata . |
spec RestoreJobSpec |
|
status RestoreJobStatus |
RestoreJobList
Contains a list of RestoreJob
resources.
Field | Description |
---|---|
apiVersion string |
gkebackup.gke.io/v1 |
kind string |
RestoreJobList |
metadata ListMeta |
Refer to Kubernetes API documentation for fields of metadata . |
items RestoreJob array |
RestoreJobSpec
Defines the desired state of a restoration.
Appears in: - RestoreJob
Field | Description |
---|---|
restoreName string |
RestoreName is the control plane Restore name that the RestoreJob is executing against. The name is immutable. |
RestoreJobStatus
Defines the observed state of a restore job.
Appears in: - RestoreJob
Field | Description |
---|---|
phase RestoreJobPhase |
The current status of a restore. |
message string |
A human-readable message indicating details about why the backup restoration is in this state. |
reason string |
A camel case string that describes any update and is used for machine parsing and tidy display. |
Strategy
Defines how to back up and restore for a particular component. It must be one of BackupAllRestoreAll
, BackupOneRestoreAll
, or DumpAndLoad
.
Appears in: - Component
Field | Description |
---|---|
type StrategyType |
The type of backup and restore strategy. The value can only be either BackupAllRestoreAll , BackupOneRestoreAll , or DumpAndLoad . Note, the Pod resource kind only supports the BackupAllRestoreAll strategy. This is the union discriminator. |
backupAllRestoreAll BackupAllRestoreAll |
A strategy that backs up everything selected in this component, and restores everything during restoration. |
backupOneRestoreAll BackupOneRestoreAll |
A strategy that only backs up volumes from one Pod within this component, and are restored to all other Pods during restoration. This strategy is used for applications that are deployed in a high availability configuration of one primary and one or more secondaries. This strategy is exclusively applicable to StatefulSet components that use a defined volumeClaimTemplate resource to provision volumes. |
dumpAndLoad DumpAndLoad |
A strategy where the backup and restore of a component is achieved using application specific tools for dumping and loading data, like mysqldump for MySQL or pg_dump for PostgreSQL. Dump files are stored in a dedicated volume. Only the dedicated volume must be selected to be backed up for this strategy. The dump target and load target could be different. This strategy is exclusively applicable to StatefulSet components that use a defined volumeClaimTemplate resource to provision volumes. |
StrategyType
Underlying type: string
Defines the backup and restore strategies of a component.
Appears in: - Strategy