google-cloud-gke_backup-v1 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -223,6 +223,13 @@ module Google
223
223
  # Backups created via this plan.
224
224
  #
225
225
  # Default (empty): Config backup artifacts will not be encrypted.
226
+ # @!attribute [rw] permissive_mode
227
+ # @return [::Boolean]
228
+ # Optional. If false, Backups will fail when Backup for GKE detects
229
+ # Kubernetes configuration that is non-standard or
230
+ # requires additional setup to restore.
231
+ #
232
+ # Default: False
226
233
  class BackupConfig
227
234
  include ::Google::Protobuf::MessageExts
228
235
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -295,8 +302,10 @@ module Google
295
302
  # UTC.
296
303
  # @!attribute [rw] duration
297
304
  # @return [::Google::Protobuf::Duration]
298
- # Required. Specifies duration of the window. Restrictions for duration based
299
- # on the recurrence type to allow some time for backup to happen:
305
+ # Required. Specifies duration of the window.
306
+ # Duration must be >= 5 minutes and < (target RPO - 20 minutes).
307
+ # Additional restrictions based on the recurrence type to allow some time for
308
+ # backup to happen:
300
309
  # - single_occurrence_date: no restriction, but UI may warn about this when
301
310
  # duration >= target RPO
302
311
  # - daily window: duration < 24 hours
@@ -61,6 +61,21 @@ module Google
61
61
  include ::Google::Protobuf::MessageExts
62
62
  extend ::Google::Protobuf::MessageExts::ClassMethods
63
63
  end
64
+
65
+ # Message to encapsulate VolumeType enum.
66
+ class VolumeTypeEnum
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+
70
+ # Supported volume types.
71
+ module VolumeType
72
+ # Default
73
+ VOLUME_TYPE_UNSPECIFIED = 0
74
+
75
+ # Compute Engine Persistent Disk volume
76
+ GCE_PERSISTENT_DISK = 1
77
+ end
78
+ end
64
79
  end
65
80
  end
66
81
  end
@@ -100,10 +100,45 @@ module Google
100
100
  # and systems are expected to put that etag in the request to
101
101
  # `UpdateRestore` or `DeleteRestore` to ensure that their change will be
102
102
  # applied to the same version of the resource.
103
+ # @!attribute [rw] filter
104
+ # @return [::Google::Cloud::GkeBackup::V1::Restore::Filter]
105
+ # Optional. Immutable. Filters resources for `Restore`. If not specified, the
106
+ # scope of the restore will remain the same as defined in the `RestorePlan`.
107
+ # If this is specified, and no resources are matched by the
108
+ # `inclusion_filters` or everyting is excluded by the `exclusion_filters`,
109
+ # nothing will be restored. This filter can only be specified if the value of
110
+ # {::Google::Cloud::GkeBackup::V1::RestoreConfig#namespaced_resource_restore_mode namespaced_resource_restore_mode}
111
+ # is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or
112
+ # `MERGE_REPLACE_ON_CONFLICT`.
113
+ # @!attribute [rw] volume_data_restore_policy_overrides
114
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeDataRestorePolicyOverride>]
115
+ # Optional. Immutable. Overrides the volume data restore policies selected in
116
+ # the Restore Config for override-scoped resources.
103
117
  class Restore
104
118
  include ::Google::Protobuf::MessageExts
105
119
  extend ::Google::Protobuf::MessageExts::ClassMethods
106
120
 
121
+ # Defines the filter for `Restore`. This filter can be used to further
122
+ # refine the resource selection of the `Restore` beyond the coarse-grained
123
+ # scope defined in the `RestorePlan`. `exclusion_filters` take precedence
124
+ # over `inclusion_filters`. If a resource matches both `inclusion_filters`
125
+ # and `exclusion_filters`, it will not be restored.
126
+ # @!attribute [rw] inclusion_filters
127
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>]
128
+ # Optional. Selects resources for restoration. If specified, only resources
129
+ # which match `inclusion_filters` will be selected for restoration. A
130
+ # resource will be selected if it matches any `ResourceSelector` of the
131
+ # `inclusion_filters`.
132
+ # @!attribute [rw] exclusion_filters
133
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>]
134
+ # Optional. Excludes resources from restoration. If specified,
135
+ # a resource will not be restored if it matches
136
+ # any `ResourceSelector` of the `exclusion_filters`.
137
+ class Filter
138
+ include ::Google::Protobuf::MessageExts
139
+ extend ::Google::Protobuf::MessageExts::ClassMethods
140
+ end
141
+
107
142
  # @!attribute [rw] key
108
143
  # @return [::String]
109
144
  # @!attribute [rw] value
@@ -197,6 +232,14 @@ module Google
197
232
  # executed in order defined - this order matters, as changes made by a rule
198
233
  # may impact the filtering logic of subsequent rules. An empty list means no
199
234
  # transformation will occur.
235
+ # @!attribute [rw] volume_data_restore_policy_bindings
236
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicyBinding>]
237
+ # Optional. A table that binds volumes by their scope to a restore policy.
238
+ # Bindings must have a unique scope. Any volumes not scoped in the bindings
239
+ # are subject to the policy defined in volume_data_restore_policy.
240
+ # @!attribute [rw] restore_order
241
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder]
242
+ # Optional. RestoreOrder contains custom ordering to use on a Restore.
200
243
  class RestoreConfig
201
244
  include ::Google::Protobuf::MessageExts
202
245
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -422,6 +465,46 @@ module Google
422
465
  extend ::Google::Protobuf::MessageExts::ClassMethods
423
466
  end
424
467
 
468
+ # Binds resources in the scope to the given VolumeDataRestorePolicy.
469
+ # @!attribute [rw] policy
470
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy]
471
+ # Required. The VolumeDataRestorePolicy to apply when restoring volumes in
472
+ # scope.
473
+ # @!attribute [rw] volume_type
474
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType]
475
+ # The volume type, as determined by the PVC's bound PV,
476
+ # to apply the policy to.
477
+ class VolumeDataRestorePolicyBinding
478
+ include ::Google::Protobuf::MessageExts
479
+ extend ::Google::Protobuf::MessageExts::ClassMethods
480
+ end
481
+
482
+ # Allows customers to specify dependencies between resources
483
+ # that Backup for GKE can use to compute a resasonable restore order.
484
+ # @!attribute [rw] group_kind_dependencies
485
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>]
486
+ # Optional. Contains a list of group kind dependency pairs provided
487
+ # by the customer, that is used by Backup for GKE to
488
+ # generate a group kind restore order.
489
+ class RestoreOrder
490
+ include ::Google::Protobuf::MessageExts
491
+ extend ::Google::Protobuf::MessageExts::ClassMethods
492
+
493
+ # Defines a dependency between two group kinds.
494
+ # @!attribute [rw] satisfying
495
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind]
496
+ # Required. The satisfying group kind must be restored first
497
+ # in order to satisfy the dependency.
498
+ # @!attribute [rw] requiring
499
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind]
500
+ # Required. The requiring group kind requires that the other
501
+ # group kind be restored first.
502
+ class GroupKindDependency
503
+ include ::Google::Protobuf::MessageExts
504
+ extend ::Google::Protobuf::MessageExts::ClassMethods
505
+ end
506
+ end
507
+
425
508
  # Defines how volume data should be restored.
426
509
  module VolumeDataRestorePolicy
427
510
  # Unspecified (illegal).
@@ -481,8 +564,98 @@ module Google
481
564
  # occurs during the restore process itself (e.g., because an out of band
482
565
  # process creates conflicting resources), a conflict will be reported.
483
566
  FAIL_ON_CONFLICT = 2
567
+
568
+ # This mode merges the backup and the target cluster and skips the
569
+ # conflicting resources. If a single resource to restore exists in the
570
+ # cluster before restoration, the resource will be skipped, otherwise it
571
+ # will be restored.
572
+ MERGE_SKIP_ON_CONFLICT = 3
573
+
574
+ # This mode merges the backup and the target cluster and skips the
575
+ # conflicting resources except volume data. If a PVC to restore already
576
+ # exists, this mode will restore/reconnect the volume without overwriting
577
+ # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will
578
+ # apply the volume data policy for the conflicting PVCs:
579
+ # - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the
580
+ # reclaim policy of the original PV;
581
+ # - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim
582
+ # policy of the original PV;
583
+ # - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim
584
+ # policy of the original PV.
585
+ # Note that this mode could cause data loss as the original PV can be
586
+ # retained or deleted depending on its reclaim policy.
587
+ MERGE_REPLACE_VOLUME_ON_CONFLICT = 4
588
+
589
+ # This mode merges the backup and the target cluster and replaces the
590
+ # conflicting resources with the ones in the backup. If a single resource
591
+ # to restore exists in the cluster before restoration, the resource will be
592
+ # replaced with the one from the backup. To replace an existing resource,
593
+ # the first attempt is to update the resource to match the one from the
594
+ # backup; if the update fails, the second attempt is to delete the resource
595
+ # and restore it from the backup.
596
+ # Note that this mode could cause data loss as it replaces the existing
597
+ # resources in the target cluster, and the original PV can be retained or
598
+ # deleted depending on its reclaim policy.
599
+ MERGE_REPLACE_ON_CONFLICT = 5
600
+ end
601
+ end
602
+
603
+ # Defines a selector to identify a single or a group of resources.
604
+ # Conditions in the selector are optional, but at least one field
605
+ # should be set to a non-empty value. If a condition is not specified,
606
+ # no restrictions will be applied on that dimension.
607
+ # If more than one condition is specified, a resource will be selected
608
+ # if and only if all conditions are met.
609
+ # @!attribute [rw] group_kind
610
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind]
611
+ # Optional. Selects resources using their Kubernetes GroupKinds. If
612
+ # specified, only resources of provided GroupKind will be selected.
613
+ # @!attribute [rw] name
614
+ # @return [::String]
615
+ # Optional. Selects resources using their resource names. If specified,
616
+ # only resources with the provided name will be selected.
617
+ # @!attribute [rw] namespace
618
+ # @return [::String]
619
+ # Optional. Selects resources using their namespaces. This only applies to
620
+ # namespace scoped resources and cannot be used for selecting
621
+ # cluster scoped resources. If specified, only resources in the provided
622
+ # namespace will be selected. If not specified, the filter will apply to
623
+ # both cluster scoped and namespace scoped resources (e.g. name or label).
624
+ # The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
625
+ # itself will be restored if and only if any resources within the namespace
626
+ # are restored.
627
+ # @!attribute [rw] labels
628
+ # @return [::Google::Protobuf::Map{::String => ::String}]
629
+ # Optional. Selects resources using Kubernetes
630
+ # [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
631
+ # If specified, a resource will be selected if and only if the resource
632
+ # has all of the provided labels and all the label values match.
633
+ class ResourceSelector
634
+ include ::Google::Protobuf::MessageExts
635
+ extend ::Google::Protobuf::MessageExts::ClassMethods
636
+
637
+ # @!attribute [rw] key
638
+ # @return [::String]
639
+ # @!attribute [rw] value
640
+ # @return [::String]
641
+ class LabelsEntry
642
+ include ::Google::Protobuf::MessageExts
643
+ extend ::Google::Protobuf::MessageExts::ClassMethods
484
644
  end
485
645
  end
646
+
647
+ # Defines an override to apply a VolumeDataRestorePolicy for scoped resources.
648
+ # @!attribute [rw] policy
649
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy]
650
+ # Required. The VolumeDataRestorePolicy to apply when restoring volumes in
651
+ # scope.
652
+ # @!attribute [rw] selected_pvcs
653
+ # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames]
654
+ # A list of PVCs to apply the policy override to.
655
+ class VolumeDataRestorePolicyOverride
656
+ include ::Google::Protobuf::MessageExts
657
+ extend ::Google::Protobuf::MessageExts::ClassMethods
658
+ end
486
659
  end
487
660
  end
488
661
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-gke_backup-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-19 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common