Class: Google::Cloud::GkeBackup::V1::RestoreConfig
- Inherits:
-
Object
- Object
- Google::Cloud::GkeBackup::V1::RestoreConfig
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/gkebackup/v1/restore.rb
Overview
Configuration of a restore.
Defined Under Namespace
Modules: ClusterResourceConflictPolicy, NamespacedResourceRestoreMode, VolumeDataRestorePolicy Classes: ClusterResourceRestoreScope, GroupKind, ResourceFilter, RestoreOrder, SubstitutionRule, TransformationRule, TransformationRuleAction, VolumeDataRestorePolicyBinding
Instance Attribute Summary collapse
-
#all_namespaces ⇒ ::Boolean
Restore all namespaced resources in the Backup if set to "True".
-
#cluster_resource_conflict_policy ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceConflictPolicy
Optional.
-
#cluster_resource_restore_scope ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceRestoreScope
Optional.
-
#excluded_namespaces ⇒ ::Google::Cloud::GkeBackup::V1::Namespaces
A list of selected namespaces excluded from restoration.
-
#namespaced_resource_restore_mode ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode
Optional.
-
#no_namespaces ⇒ ::Boolean
Do not restore any namespaced resources if set to "True".
-
#restore_order ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder
Optional.
-
#selected_applications ⇒ ::Google::Cloud::GkeBackup::V1::NamespacedNames
A list of selected ProtectedApplications to restore.
-
#selected_namespaces ⇒ ::Google::Cloud::GkeBackup::V1::Namespaces
A list of selected Namespaces to restore from the Backup.
-
#substitution_rules ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>
Optional.
-
#transformation_rules ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRule>
Optional.
-
#volume_data_restore_policy ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy
Optional.
-
#volume_data_restore_policy_bindings ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicyBinding>
Optional.
Instance Attribute Details
#all_namespaces ⇒ ::Boolean
Returns Restore all namespaced resources in the Backup if set to "True". Specifying this field to "False" is an error.
Note: The following fields are mutually exclusive: all_namespaces
, selected_namespaces
, selected_applications
, no_namespaces
, excluded_namespaces
. If a field in that set is populated, all other fields in the set will automatically be cleared.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#cluster_resource_conflict_policy ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceConflictPolicy
Returns 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.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#cluster_resource_restore_scope ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceRestoreScope
Returns Optional. Identifies the cluster-scoped resources to restore from the Backup. Not specifying it means NO cluster resource will be restored.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#excluded_namespaces ⇒ ::Google::Cloud::GkeBackup::V1::Namespaces
Returns A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored.
Note: The following fields are mutually exclusive: excluded_namespaces
, all_namespaces
, selected_namespaces
, selected_applications
, no_namespaces
. If a field in that set is populated, all other fields in the set will automatically be cleared.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#namespaced_resource_restore_mode ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode
Returns 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.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#no_namespaces ⇒ ::Boolean
Returns Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
Note: The following fields are mutually exclusive: no_namespaces
, all_namespaces
, selected_namespaces
, selected_applications
, excluded_namespaces
. If a field in that set is populated, all other fields in the set will automatically be cleared.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#restore_order ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder
Returns Optional. RestoreOrder contains custom ordering to use on a Restore.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#selected_applications ⇒ ::Google::Cloud::GkeBackup::V1::NamespacedNames
Returns A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored.
Note: The following fields are mutually exclusive: selected_applications
, all_namespaces
, selected_namespaces
, no_namespaces
, excluded_namespaces
. If a field in that set is populated, all other fields in the set will automatically be cleared.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#selected_namespaces ⇒ ::Google::Cloud::GkeBackup::V1::Namespaces
Returns A list of selected Namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored.
Note: The following fields are mutually exclusive: selected_namespaces
, all_namespaces
, selected_applications
, no_namespaces
, excluded_namespaces
. If a field in that set is populated, all other fields in the set will automatically be cleared.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#substitution_rules ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>
Returns 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.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#transformation_rules ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRule>
Returns 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.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#volume_data_restore_policy ⇒ ::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy
Returns 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).
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |
#volume_data_restore_policy_bindings ⇒ ::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicyBinding>
Returns 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.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'proto_docs/google/cloud/gkebackup/v1/restore.rb', line 259 class RestoreConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # 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. # @!attribute [rw] resource_group # @return [::String] # Optional. API group string of a Kubernetes resource, e.g. # "apiextensions.k8s.io", "storage.k8s.io", etc. # Note: use empty string for core API group. # @!attribute [rw] resource_kind # @return [::String] # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase # (PascalCase) and singular form. E.g. "CustomResourceDefinition", # "StorageClass", etc. class GroupKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # - Node # - ComponentStatus # - gkebackup.gke.io/BackupJob # - gkebackup.gke.io/RestoreJob # - metrics.k8s.io/NodeMetrics # - migration.k8s.io/StorageState # - migration.k8s.io/StorageVersionMigration # - snapshot.storage.k8s.io/VolumeSnapshotContent # - storage.k8s.io/CSINode # - storage.k8s.io/VolumeAttachment # # Some group kinds are driven by restore configuration elsewhere, # and will cause an error if selected here. # - Namespace # - PersistentVolume # @!attribute [rw] selected_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to restore from # the backup. If specified, only the selected resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] excluded_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. A list of cluster-scoped resource group kinds to NOT restore # from the backup. If specified, all valid cluster-scoped resources will be # restored except for those specified in the list. # Mutually exclusive to any other field in the message. # @!attribute [rw] all_group_kinds # @return [::Boolean] # Optional. If True, all valid cluster-scoped resources will be restored. # Mutually exclusive to any other field in the message. # @!attribute [rw] no_group_kinds # @return [::Boolean] # Optional. If True, no cluster-scoped resources will be restored. # This has the same restore scope as if the message is not defined. # Mutually exclusive to any other field in the message. class ClusterResourceRestoreScope include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] target_namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to substitution must # be contained within one of the listed Kubernetes Namespace in the Backup. # If this field is not provided, no namespace filtering will be performed # (all resources in all Namespaces, including all cluster-scoped resources, # will be candidates for substitution). # To mix cluster-scoped and namespaced resources in the same rule, use an # empty string ("") as one of the target namespaces. # @!attribute [rw] target_group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to substitution must # belong to one of the listed "types". If this field is not provided, no # type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for substitution). # @!attribute [rw] target_json_path # @return [::String] # Required. This is a [JSONPath] # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) # expression that matches specific fields of candidate # resources and it operates as both a filtering parameter (resources that # are not matched with this expression will not be candidates for # substitution) as well as a field identifier (identifies exactly which # fields out of the candidate resources will be modified). # @!attribute [rw] original_value_pattern # @return [::String] # Optional. (Filtering parameter) This is a [regular expression] # (https://en.wikipedia.org/wiki/Regular_expression) # that is compared against the fields matched by the target_json_path # expression (and must also have passed the previous filters). # Substitution will not be performed against fields whose # value does not match this expression. If this field is NOT specified, # then ALL fields matched by the target_json_path expression will undergo # substitution. Note that an empty (e.g., "", rather than unspecified) # value for this field will only match empty fields. # @!attribute [rw] new_value # @return [::String] # Optional. This is the new value to set for any fields that pass the # filtering and selection criteria. To remove a value from a Kubernetes # resource, either leave this field unspecified, or set it to the empty # string (""). class SubstitutionRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # TransformationRuleAction defines a TransformationRule action based on the # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) # @!attribute [rw] op # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] # Required. op specifies the operation to perform. # @!attribute [rw] from_path # @return [::String] # Optional. A string containing a JSON Pointer value that references the # location in the target document to move the value from. # @!attribute [rw] path # @return [::String] # Optional. A string containing a JSON-Pointer value that references a # location within the target document where the operation is performed. # @!attribute [rw] value # @return [::String] # Optional. A string that specifies the desired value in string format to # use for transformation. class TransformationRuleAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values for operations of a transformation rule action. module Op # Unspecified operation OP_UNSPECIFIED = 0 # The "remove" operation removes the value at the target location. REMOVE = 1 # The "move" operation removes the value at a specified location and # adds it to the target location. MOVE = 2 # The "copy" operation copies the value at a specified location to the # target location. COPY = 3 # The "add" operation performs one of the following functions, # depending upon what the target location references: # 1. If the target location specifies an array index, a new value is # inserted into the array at the specified index. # 2. If the target location specifies an object member that does not # already exist, a new member is added to the object. # 3. If the target location specifies an object member that does exist, # that member's value is replaced. ADD = 4 # The "test" operation tests that a value at the target location is # equal to a specified value. TEST = 5 # The "replace" operation replaces the value at the target location # with a new value. The operation object MUST contain a "value" member # whose content specifies the replacement value. REPLACE = 6 end end # 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. # @!attribute [rw] namespaces # @return [::Array<::String>] # Optional. (Filtering parameter) Any resource subject to transformation # must be contained within one of the listed Kubernetes Namespace in the # Backup. If this field is not provided, no namespace filtering will be # performed (all resources in all Namespaces, including all cluster-scoped # resources, will be candidates for transformation). # @!attribute [rw] group_kinds # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] # Optional. (Filtering parameter) Any resource subject to transformation # must belong to one of the listed "types". If this field is not provided, # no type filtering will be performed (all resources of all types matching # previous filtering parameters will be candidates for transformation). # @!attribute [rw] json_path # @return [::String] # Optional. This is a [JSONPath] # (https://github.com/json-path/JsonPath/blob/master/README.md) # expression that matches specific fields of candidate # resources and it operates as a filtering parameter (resources that # are not matched with this expression will not be candidates for # transformation). class ResourceFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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. # @!attribute [rw] field_actions # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] # Required. A list of transformation rule actions to take against candidate # resources. Actions are executed in order defined - this order matters, as # they could potentially interfere with each other and the first operation # could affect the outcome of the second operation. # @!attribute [rw] resource_filter # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] # Optional. This field is used to specify a set of fields that should be # used to determine which resources in backup should be acted upon by the # supplied transformation rule actions, and this will ensure that only # specific resources are affected by transformation rule actions. # @!attribute [rw] description # @return [::String] # Optional. The description is a user specified string description of the # transformation rule. class TransformationRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Binds resources in the scope to the given VolumeDataRestorePolicy. # @!attribute [rw] policy # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] # Required. The VolumeDataRestorePolicy to apply when restoring volumes in # scope. # @!attribute [rw] volume_type # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] # The volume type, as determined by the PVC's bound PV, # to apply the policy to. class VolumeDataRestorePolicyBinding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Allows customers to specify dependencies between resources # that Backup for GKE can use to compute a resasonable restore order. # @!attribute [rw] group_kind_dependencies # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] # Optional. Contains a list of group kind dependency pairs provided # by the customer, that is used by Backup for GKE to # generate a group kind restore order. class RestoreOrder include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a dependency between two group kinds. # @!attribute [rw] satisfying # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The satisfying group kind must be restored first # in order to satisfy the dependency. # @!attribute [rw] requiring # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] # Required. The requiring group kind requires that the other # group kind be restored first. class GroupKindDependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Defines how volume data should be restored. module VolumeDataRestorePolicy # Unspecified (illegal). VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 # For each PVC to be restored, create a new underlying volume and PV # from the corresponding VolumeBackup contained within the Backup. RESTORE_VOLUME_DATA_FROM_BACKUP = 1 # For each PVC to be restored, attempt to reuse the original PV contained # in the Backup (with its original underlying volume). This option # is likely only usable when restoring a workload to its original cluster. REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 # For each PVC to be restored, create PVC without any particular # action to restore data. In this case, the normal Kubernetes provisioning # logic would kick in, and this would likely result in either dynamically # provisioning blank PVs or binding to statically provisioned PVs. NO_VOLUME_DATA_RESTORATION = 3 end # Defines the behavior for handling the situation where cluster-scoped # resources being restored already exist in the target cluster. module ClusterResourceConflictPolicy # Unspecified. Only allowed if no cluster-scoped resources will be # restored. CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 # Do not attempt to restore the conflicting resource. USE_EXISTING_VERSION = 1 # Delete the existing version before re-creating it from the Backup. # This is a dangerous option which could cause unintentional # data loss if used inappropriately. For example, deleting a CRD will # cause Kubernetes to delete all CRs of that type. USE_BACKUP_VERSION = 2 end # Defines the behavior for handling the situation where sets of namespaced # resources being restored already exist in the target cluster. module NamespacedResourceRestoreMode # Unspecified (invalid). NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 # When conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered, this # will first trigger a delete of the conflicting resource AND ALL OF ITS # REFERENCED RESOURCES (e.g., all resources in the Namespace or all # resources referenced by the ProtectedApplication) before restoring the # resources from the Backup. This mode should only be used when you are # intending to revert some portion of a cluster to an earlier state. DELETE_AND_RESTORE = 1 # If conflicting top-level resources (either Namespaces or # ProtectedApplications, depending upon the scope) are encountered at the # beginning of a restore process, the Restore will fail. If a conflict # occurs during the restore process itself (e.g., because an out of band # process creates conflicting resources), a conflict will be reported. FAIL_ON_CONFLICT = 2 # This mode merges the backup and the target cluster and skips the # conflicting resources. If a single resource to restore exists in the # cluster before restoration, the resource will be skipped, otherwise it # will be restored. MERGE_SKIP_ON_CONFLICT = 3 # This mode merges the backup and the target cluster and skips the # conflicting resources except volume data. If a PVC to restore already # exists, this mode will restore/reconnect the volume without overwriting # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will # apply the volume data policy for the conflicting PVCs: # - 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_VOLUME_ON_CONFLICT = 4 # 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. MERGE_REPLACE_ON_CONFLICT = 5 end end |