google-cloud-gke_backup-v1 0.9.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +53 -25
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +13 -5
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +53 -25
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +11 -4
- data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/backup_pb.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/common_pb.rb +3 -1
- data/lib/google/cloud/gkebackup/v1/restore_pb.rb +7 -1
- data/proto_docs/google/api/client.rb +31 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/gkebackup/v1/backup.rb +9 -0
- data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +11 -2
- data/proto_docs/google/cloud/gkebackup/v1/common.rb +15 -0
- data/proto_docs/google/cloud/gkebackup/v1/restore.rb +173 -0
- metadata +2 -2
@@ -196,9 +196,26 @@ module Google
|
|
196
196
|
# @!attribute [rw] common
|
197
197
|
# @return [::Google::Api::CommonLanguageSettings]
|
198
198
|
# Some settings.
|
199
|
+
# @!attribute [rw] experimental_features
|
200
|
+
# @return [::Google::Api::PythonSettings::ExperimentalFeatures]
|
201
|
+
# Experimental features to be included during client library generation.
|
199
202
|
class PythonSettings
|
200
203
|
include ::Google::Protobuf::MessageExts
|
201
204
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
205
|
+
|
206
|
+
# Experimental features to be included during client library generation.
|
207
|
+
# These fields will be deprecated once the feature graduates and is enabled
|
208
|
+
# by default.
|
209
|
+
# @!attribute [rw] rest_async_io_enabled
|
210
|
+
# @return [::Boolean]
|
211
|
+
# Enables generation of asynchronous REST clients if `rest` transport is
|
212
|
+
# enabled. By default, asynchronous REST clients will not be generated.
|
213
|
+
# This feature will be enabled by default 1 month after launching the
|
214
|
+
# feature in preview packages.
|
215
|
+
class ExperimentalFeatures
|
216
|
+
include ::Google::Protobuf::MessageExts
|
217
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
end
|
202
219
|
end
|
203
220
|
|
204
221
|
# Settings for Node client libraries.
|
@@ -290,6 +307,13 @@ module Google
|
|
290
307
|
# @return [::String]
|
291
308
|
# The fully qualified name of the method, for which the options below apply.
|
292
309
|
# This is used to find the method to apply the options.
|
310
|
+
#
|
311
|
+
# Example:
|
312
|
+
#
|
313
|
+
# publishing:
|
314
|
+
# method_settings:
|
315
|
+
# - selector: google.storage.control.v2.StorageControl.CreateFolder
|
316
|
+
# # method settings for CreateFolder...
|
293
317
|
# @!attribute [rw] long_running
|
294
318
|
# @return [::Google::Api::MethodSettings::LongRunning]
|
295
319
|
# Describes settings to use for long-running operations when generating
|
@@ -298,17 +322,14 @@ module Google
|
|
298
322
|
#
|
299
323
|
# Example of a YAML configuration::
|
300
324
|
#
|
301
|
-
#
|
302
|
-
#
|
325
|
+
# publishing:
|
326
|
+
# method_settings:
|
303
327
|
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
304
328
|
# long_running:
|
305
|
-
# initial_poll_delay:
|
306
|
-
# seconds: 60 # 1 minute
|
329
|
+
# initial_poll_delay: 60s # 1 minute
|
307
330
|
# poll_delay_multiplier: 1.5
|
308
|
-
# max_poll_delay:
|
309
|
-
#
|
310
|
-
# total_poll_timeout:
|
311
|
-
# seconds: 54000 # 90 minutes
|
331
|
+
# max_poll_delay: 360s # 6 minutes
|
332
|
+
# total_poll_timeout: 54000s # 90 minutes
|
312
333
|
# @!attribute [rw] auto_populated_fields
|
313
334
|
# @return [::Array<::String>]
|
314
335
|
# List of top-level fields of the request message, that should be
|
@@ -317,8 +338,8 @@ module Google
|
|
317
338
|
#
|
318
339
|
# Example of a YAML configuration:
|
319
340
|
#
|
320
|
-
#
|
321
|
-
#
|
341
|
+
# publishing:
|
342
|
+
# method_settings:
|
322
343
|
# - selector: google.example.v1.ExampleService.CreateExample
|
323
344
|
# auto_populated_fields:
|
324
345
|
# - request_id
|
@@ -124,8 +124,13 @@ module Google
|
|
124
124
|
# @return [::String]
|
125
125
|
# The plural name used in the resource name and permission names, such as
|
126
126
|
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
127
|
-
# name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
128
|
-
#
|
127
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
|
128
|
+
# to this is for Nested Collections that have stuttering names, as defined
|
129
|
+
# in [AIP-122](https://google.aip.dev/122#nested-collections), where the
|
130
|
+
# collection ID in the resource name pattern does not necessarily directly
|
131
|
+
# match the `plural` value.
|
132
|
+
#
|
133
|
+
# It is the same concept of the `plural` field in k8s CRD spec
|
129
134
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
130
135
|
#
|
131
136
|
# Note: The plural form is required even for singleton resources. See
|
@@ -157,6 +157,15 @@ module Google
|
|
157
157
|
# @!attribute [r] config_backup_size_bytes
|
158
158
|
# @return [::Integer]
|
159
159
|
# Output only. The size of the config backup in bytes.
|
160
|
+
# @!attribute [r] permissive_mode
|
161
|
+
# @return [::Boolean]
|
162
|
+
# Output only. If false, Backup will fail when Backup for GKE detects
|
163
|
+
# Kubernetes configuration that is non-standard or
|
164
|
+
# requires additional setup to restore.
|
165
|
+
#
|
166
|
+
# Inherited from the parent BackupPlan's
|
167
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#permissive_mode permissive_mode}
|
168
|
+
# value.
|
160
169
|
class Backup
|
161
170
|
include ::Google::Protobuf::MessageExts
|
162
171
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -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.
|
299
|
-
#
|
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.
|
4
|
+
version: 0.10.1
|
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-
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|