KRM API gkebackup.gke.io/v1 API

gkebackup.gke.io/v1

Package v1 contains API Schema definitions for the gkebackup.gke.io v1 API group

BackupAllRestoreAll

BackupAllRestoreAll defines strategy that back up everything selected in this component, and restore all of them during restoration.

Appears in: - Strategy

Field Description
backupPreHooks HookSpec array BackupPreHooks defines a list of hooks that should be executed before backing up all selected volumes of this component. They are usually all the quiesce steps. The execution target Pods are all Pods within this component.
backupPostHooks HookSpec array BackupPostHooks defines a list of hooks that should be executed after all volumes of this component are backed up. They are usually un-quiesce steps. The execution target Pods are all Pods within this component.
volumeSelector LabelSelector VolumeSelector defines a label selector that is used to select persistent volumes that should be backed up and restored within this component. All persistent volumes will be selected if this is not provided.

BackupJobList

BackupJobList contains a list of BackupJob

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

BackupJobSpec defines the desired state of BackupJob.

Appears in: - BackupJob

Field Description
backupName string BackupName is the control plane Backup name that the BackupJob is executing against. The name is immutable.

BackupJobStatus

BackupJobStatus defines the observed state of BackupJob.

Appears in: - BackupJob

Field Description
phase BackupJobPhase Phase is the current phase of backup.
message string A human-readable message indicating details about why backup is in this state.
reason string Reason is a brief CamelCase string that describes any update and is meant for machine parsing and tidy display.

BackupOneRestoreAll

BackupOneRestoreAll defines strategy that only back up volumes from one Pod within this component, and they will be restored to all other Pods during restoration. This strategy should be used for application that are deployed in HA config of one primary and one or more secondaries. This strategy is exclusively applicable to StatefulSet components that use "volumeClaimTemplate" defined to provision volumes. If a component consists of multiple Deployments: - All the deployments must have exactly one replica. - All replicas must have the same number of persistent volumes. - All persistent volume must be defined in the same order. Those volumes are defined in .spec.template.spec.volumes, non-persistent volumes will be skipped. If a component consists of multiple StatefulSets: - All the StatefulSets must have the same number of volume claim templates. - All volume claim templates must follow the same order. They are defined in .spec.volumeClaimTemplates field.

Appears in: - Strategy

Field Description
backupTargetName string BackupTargetName specifies the name of preferred Deployment or StatefulSet that will be used for backup. We will select target Pod based on how this component is composed: - Multi-Deployment: pick the only Pod created by this Deployment. - Multi-StatefulSet: pick the 1st Pod created by the target StatefulSet. - Single-StatefulSet: pick the 2nd Pod created by the target StatefulSet.
backupPreHooks HookSpec array BackupPreHooks defines a list of hooks that should be executed before backing up all selected volumes of this component. They are usually all the quiesce steps. Hooks will be only executed on selected backup Pod.
backupPostHooks HookSpec array BackupPostHooks defines a list of hooks that should be executed after all volumes of this component are backed up. They are usually un-quiesce steps. Hooks will be only executed on selected backup Pod.
volumeSelector LabelSelector VolumeSelector defines a label selector that is used to select all persistent volumes that should be backed up within the target Pod. It is possible that selector will select volumes outside of the target Pod, but only volumes belonging to the target Pod will be backed up. And those volume backups will be restored to all other volumes selected by the selector during restoration. All persistent volumes will be selected if this is not provided.

Component

Component defines a subset of application resources and their backup and restore strategies. An individual component can be represented either by a list of StatefulSets or Deployments.

Appears in: - ProtectedApplicationSpec

Field Description
name string Name is the unique name of this component.
resourceKind ResourceKind ResourceKind specifies the kind of resources included in this component. The resource kind can only be "Deployment" or "StatefulSet" or "Pod". The "Pod" ResourceKind only supports the "BackupAllRestoreAll" strategy at this time.
resourceNames string array ResourceNames specifies names of resources which belong to this component. It should be a list of names of either Deployments, StatefulSets, or Pods based on what is defined in ResourceKind.
strategy Strategy Strategy specifies details of how to back up and restore this component.

DumpAndLoad

DumpAndLoad defines strategy where backup and restore of a component is achieved via application specific tools for dumping and loading data, like mysqldump for MySQL or pg_dump for PostgreSQL. Dump files should be stored into a dedicated volume. And only the dedicated volume should be selected to be backed up for this strategy. Dump target and load target could be different. This strategy is exclusively applicable to StatefulSet components that use "volumeClaimTemplate" defined to provision volumes.

Appears in: - Strategy

Field Description
dumpTarget string DumpTarget specifies the name of preferred Deployment or StatefulSet that will be used to dump the component data. We will select target Pod based on how this component is composed: - Deployment(s): pick the only Pod created by target Deployment. - Single-StatefulSet: pick the 2nd Pod created by target StatefulSet if replica number is greater than 2. Otherwise, pick the only Pod. - Multi-StatefulSet: pick the 1st Pod created by the target StatefulSet.
loadTarget string LoadTarget specifies the name of preferred Deployment or StatefulSet that will be used to load the component data. We will select target Pod based on how this component is composed: - Deployment(s): pick the only Pod created by target Deployment. - StatefulSet(s): always pick the 1st Pod created by target StatefulSet.
dumpHooks HookSpec array DumpHooks defines a list of hooks that are used to dump the data of this component into dedicated volume. The execution target Pod will be one of the Pods selected from DumpTarget.
backupPostHooks HookSpec array BackupPostHooks defines a list of hooks that should be executed after dedicate dump volume is backed up. These are usually cleanup steps.
loadHooks HookSpec array LoadHooks defines a list of hooks that are used to load the data of this component from dedicated volume. It may also include cleanup steps after load is completed. The execution target Pod will be one of the Pod selected from LoadTarget.
volumeSelector LabelSelector VolumeSelector defines a label selector that should select dedicated volumes that are used to dump and load the application data. Only one volume should be selected in both DumpTarget and LoadTarget.

HookFailurePolicy

Underlying type: string HookFailurePolicy defines the behavior if hook execution runs into error.

Appears in: - HookSpec

HookSpec

HookSpec defines how a hook should be executed in which container, assuming target Pod has been selected.

Appears in: - BackupAllRestoreAll - BackupOneRestoreAll - DumpAndLoad

Field Description
name string Name of this hook to identify the status/error of hook execution.
container string Container that this hook executes on. If unspecified, it will execute on the first container of the pod.
command string array Command to execute. The hook command to run. E.g., ["/sbin/fsfreeze", "--freeze"].
timeoutSeconds integer TimeoutSeconds defines the timeout of the hook in seconds. If unspecified, the default value is 30.
onError HookFailurePolicy OnError indicates the behavior when the hook execution runs into an error. Valid values are [Ignore, Fail] and if unspecified, the value will be Fail.

ProtectedApplication

ProtectedApplication is the Schema for the protectedapplications 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

ProtectedApplicationError contains detailed error information for this ProtectedApplication.

Appears in: - ProtectedApplicationStatus

Field Description
reason string Reason is a brief CamelCase string that describes any error and is meant for machine parsing and tidy display.
message string Message is a human-readable message indicating details about the error.

ProtectedApplicationList

ProtectedApplicationList contains a list of ProtectedApplication.

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

ProtectedApplicationSpec defines relevant resources belong to a ProtectedApplication, and guidance of how the given application should be backed up or restored.

Appears in: - ProtectedApplication

Field Description
resourceSelection ResourceSelection ResourceSelection specifies the resources belonging to this ProtectedApplication.
components Component array Components defines all components of this protected application.

ProtectedApplicationStatus

ProtectedApplicationStatus defines the status of this ProtectedApplication.

Appears in: - ProtectedApplication

Field Description
readyToBackup boolean ReadyToBackup indicates whether this ProtectedApplication is ready to backup. A ProtectedApplication is not ready if it contains any errors.
error ProtectedApplicationError array Errors contains all errors of this protected application, for example, one component config is invalid.

ResourceKind

Underlying type: string ResourceKind defines kind of the resource.

Appears in: - Component

ResourceSelection

ResourceSelection defines how to identify the resources belong to this application.

Appears in: - ProtectedApplicationSpec

Field Description
type ResourceSelectionType Type of application source. Type can only be ApplicationName or Selector. This is the union discriminator.
applicationName string ApplicationName specifies the name of a sig-apps Application within the same namespace. This is the application the data protection spec applies to.
selector LabelSelector Selector selects all the resources in the same namespace as the ProtectedApplication, and apply data protection spec to them.

ResourceSelectionType

Underlying type: string ResourceSelectionType defines types of selection.

Appears in: - ResourceSelection

RestoreJob

RestoreJob is the Schema for the restorejobs 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

RestoreJobList contains a list of RestoreJob

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

RestoreJobSpec defines the desired state of 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

RestoreJobStatus defines the observed state of a RestoreJob.

Appears in: - RestoreJob

Field Description
phase RestoreJobPhase Phase represents the current status of a backup.
message string Message is a human-readable message indicating details about why backup restoration is in this state.
reason string Reason is a brief CamelCase string that describes any update and is meant for machine parsing and tidy display.

Strategy

Strategy defines how to back up and restore for a particular component. It can only be either BackupAllRestoreAll, BackupOneRestoreAll or, DumpAndLoad.

Appears in: - Component

Field Description
type StrategyType Type of backup and restore strategy. The value can only be either BackupAllRestoreAll, BackupOneRestoreAll, or DumpAndLoad. Note: The "Pod" ResourceKind only supports BackupAllRestoreAll strategy. This is the union discriminator.
backupAllRestoreAll BackupAllRestoreAll BackupAllRestoreAll defines strategy that back up everything selected in this component, and restore all of them during restoration.
backupOneRestoreAll BackupOneRestoreAll BackupOneRestoreAll defines strategy that only back up volumes from one Pod within this component, and they will be restored to all other Pods during restoration. This strategy should be used for application that are deployed in HA config of one primary and one or more secondaries. This strategy is exclusively applicable to StatefulSet components that use "volumeClaimTemplate" defined to provision volumes.
dumpAndLoad DumpAndLoad DumpAndLoad defines strategy where backup and restore of a component is achieved via application specific tools for dumping and loading data, like mysqldump for MySQL or pg_dump for PostgreSQL. Dump files should be stored into a dedicated volume. And only the dedicated volume should be selected to be backed up for this strategy. Dump target and load target could be different. This strategy is exclusively applicable to StatefulSet components that use "volumeClaimTemplate" defined to provision volumes.

StrategyType

Underlying type: string StrategyType defines the types of backup and restore strategy of a component.

Appears in: - Strategy