RestoreConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Configuration of a restore.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
volume_data_restore_policy |
google.cloud.gke_backup_v1.types.RestoreConfig.VolumeDataRestorePolicy
Optional. Specifies the mechanism to be used to restore volume data. Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as NO_VOLUME_DATA_RESTORATION). |
cluster_resource_conflict_policy |
google.cloud.gke_backup_v1.types.RestoreConfig.ClusterResourceConflictPolicy
Optional. Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if cluster_resource_restore_scope is not empty. |
namespaced_resource_restore_mode |
google.cloud.gke_backup_v1.types.RestoreConfig.NamespacedResourceRestoreMode
Optional. Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. |
cluster_resource_restore_scope |
google.cloud.gke_backup_v1.types.RestoreConfig.ClusterResourceRestoreScope
Optional. Identifies the cluster-scoped resources to restore from the Backup. Not specifying it means NO cluster resource will be restored. |
all_namespaces |
bool
Restore all namespaced resources in the Backup if set to "True". Specifying this field to "False" is an error. This field is a member of oneof _ namespaced_resource_restore_scope .
|
selected_namespaces |
google.cloud.gke_backup_v1.types.Namespaces
A list of selected Namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. This field is a member of oneof _ namespaced_resource_restore_scope .
|
selected_applications |
google.cloud.gke_backup_v1.types.NamespacedNames
A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. This field is a member of oneof _ namespaced_resource_restore_scope .
|
no_namespaces |
bool
Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed. This field is a member of oneof _ namespaced_resource_restore_scope .
|
excluded_namespaces |
google.cloud.gke_backup_v1.types.Namespaces
A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. This field is a member of oneof _ namespaced_resource_restore_scope .
|
substitution_rules |
MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.SubstitutionRule]
Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no substitution will occur. |
transformation_rules |
MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.TransformationRule]
Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. |
volume_data_restore_policy_bindings |
MutableSequence[google.cloud.gke_backup_v1.types.RestoreConfig.VolumeDataRestorePolicyBinding]
Optional. A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. |
restore_order |
google.cloud.gke_backup_v1.types.RestoreConfig.RestoreOrder
Optional. RestoreOrder contains custom ordering to use on a Restore. |
Classes
ClusterResourceConflictPolicy
ClusterResourceConflictPolicy(value)
Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster.
ClusterResourceRestoreScope
ClusterResourceRestoreScope(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Defines the scope of cluster-scoped resources to restore.
Some group kinds are not reasonable choices for a restore, and will cause an error if selected here. Any scope selection that would restore "all valid" resources automatically excludes these group kinds.
- gkebackup.gke.io/BackupJob
- gkebackup.gke.io/RestoreJob
- metrics.k8s.io/NodeMetrics
- migration.k8s.io/StorageState
- migration.k8s.io/StorageVersionMigration
- Node
- snapshot.storage.k8s.io/VolumeSnapshotContent
- storage.k8s.io/CSINode
Some group kinds are driven by restore configuration elsewhere, and will cause an error if selected here.
- Namespace
- PersistentVolume
GroupKind
GroupKind(mapping=None, *, ignore_unknown_fields=False, **kwargs)
This is a direct map to the Kubernetes GroupKind type
GroupKind <https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind>
__
and is used for identifying specific "types" of resources to
restore.
NamespacedResourceRestoreMode
NamespacedResourceRestoreMode(value)
Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster.
- RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and
respect the reclaim policy of the original PV;
- REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect
the reclaim policy of the original PV;
- NO_VOLUME_DATA_RESTORATION: new provision and respect the
reclaim policy of the original PV. Note that this mode
could cause data loss as the original PV can be retained
or deleted depending on its reclaim policy.
MERGE_REPLACE_ON_CONFLICT (5):
This mode merges the backup and the target
cluster and replaces the conflicting resources
with the ones in the backup. If a single
resource to restore exists in the cluster before
restoration, the resource will be replaced with
the one from the backup. To replace an existing
resource, the first attempt is to update the
resource to match the one from the backup; if
the update fails, the second attempt is to
delete the resource and restore it from the
backup.
Note that this mode could cause data loss as it
replaces the existing resources in the target
cluster, and the original PV can be retained or
deleted depending on its reclaim policy.
ResourceFilter
ResourceFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)
ResourceFilter specifies matching criteria to limit the scope of a change to a specific set of kubernetes resources that are selected for restoration from a backup.
RestoreOrder
RestoreOrder(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Allows customers to specify dependencies between resources that Backup for GKE can use to compute a resasonable restore order.
SubstitutionRule
SubstitutionRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A transformation rule to be applied against Kubernetes resources as they are selected for restoration from a Backup. A rule contains both filtering logic (which resources are subject to substitution) and substitution logic.
TransformationRule
TransformationRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A transformation rule to be applied against Kubernetes resources as they are selected for restoration from a Backup. A rule contains both filtering logic (which resources are subject to transform) and transformation logic.
TransformationRuleAction
TransformationRuleAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)
TransformationRuleAction defines a TransformationRule action based on the JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902)
VolumeDataRestorePolicy
VolumeDataRestorePolicy(value)
Defines how volume data should be restored.
VolumeDataRestorePolicyBinding
VolumeDataRestorePolicyBinding(
mapping=None, *, ignore_unknown_fields=False, **kwargs
)
Binds resources in the scope to the given VolumeDataRestorePolicy.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields