Skip to content

Commit 8865bb5

Browse files
Merge pull request #4415 from 600lyy/dualregion-bucket-relocation
Allows updating the location placement in a dual-region bucket.
2 parents 8ca4b77 + 51428be commit 8865bb5

File tree

8 files changed

+754
-7
lines changed

8 files changed

+754
-7
lines changed

config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_storagebuckets.storage.cnrm.cloud.google.com.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ spec:
112112
empty.
113113
properties:
114114
dataLocations:
115-
description: 'Immutable. The list of individual regions that comprise
116-
a dual-region bucket. See the docs for a list of acceptable
117-
regions. Note: If any of the data_locations changes, it will
118-
recreate the bucket.'
115+
description: The list of individual regions that comprise a dual-region
116+
bucket. See the docs for a list of acceptable regions.
119117
items:
120118
type: string
121119
type: array

scripts/generate-google3-docs/resource-reference/generated/resource-docs/storage/storagebucket.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Enables Bucket PolicyOnly access to a bucket.{% endverbatim %}</p>
309309
</td>
310310
<td>
311311
<p><code class="apitype">list (string)</code></p>
312-
<p>{% verbatim %}Immutable. The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.{% endverbatim %}</p>
312+
<p>{% verbatim %}The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions.{% endverbatim %}</p>
313313
</td>
314314
</tr>
315315
<tr>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,326 @@
1+
GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false
2+
User-Agent: google-api-go-client/0.5 kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
3+
4+
404 Not Found
5+
Content-Type: application/json; charset=UTF-8
6+
Expires: Mon, 01 Jan 1990 00:00:00 GMT
7+
Pragma: no-cache
8+
Server: UploadServer
9+
Vary: Origin
10+
Vary: X-Origin
11+
12+
{
13+
"error": {
14+
"code": 404,
15+
"errors": [
16+
{
17+
"domain": "global",
18+
"message": "The specified bucket does not exist.",
19+
"reason": "notFound"
20+
}
21+
],
22+
"message": "The specified bucket does not exist."
23+
}
24+
}
25+
26+
---
27+
28+
POST https://storage.googleapis.com/storage/v1/b?alt=json&prettyPrint=false&project=${projectId}
29+
Content-Type: application/json
30+
User-Agent: google-api-go-client/0.5 kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
31+
32+
{
33+
"customPlacementConfig": {
34+
"dataLocations": [
35+
"US-EAST1",
36+
"US-WEST1"
37+
]
38+
},
39+
"iamConfiguration": {
40+
"uniformBucketLevelAccess": {
41+
"enabled": false
42+
}
43+
},
44+
"labels": {
45+
"label-one": "value-one",
46+
"managed-by-cnrm": "true"
47+
},
48+
"lifecycle": {
49+
"rule": [
50+
{
51+
"action": {
52+
"type": "Delete"
53+
},
54+
"condition": {
55+
"age": 7
56+
}
57+
}
58+
]
59+
},
60+
"location": "US",
61+
"name": "storagebucket-sample-${uniqueId}",
62+
"storageClass": "STANDARD",
63+
"versioning": {
64+
"enabled": false
65+
}
66+
}
67+
68+
200 OK
69+
Content-Type: application/json; charset=UTF-8
70+
Expires: Mon, 01 Jan 1990 00:00:00 GMT
71+
Pragma: no-cache
72+
Server: UploadServer
73+
Vary: Origin
74+
Vary: X-Origin
75+
76+
{
77+
"customPlacementConfig": {
78+
"dataLocations": [
79+
"US-EAST1",
80+
"US-WEST1"
81+
]
82+
},
83+
"etag": "abcdef0123A=",
84+
"iamConfiguration": {
85+
"bucketPolicyOnly": {
86+
"enabled": false
87+
},
88+
"publicAccessPrevention": "inherited",
89+
"uniformBucketLevelAccess": {
90+
"enabled": false
91+
}
92+
},
93+
"id": "000000000000000000000",
94+
"kind": "storage#bucket",
95+
"labels": {
96+
"label-one": "value-one",
97+
"managed-by-cnrm": "true"
98+
},
99+
"lifecycle": {
100+
"rule": [
101+
{
102+
"action": {
103+
"type": "Delete"
104+
},
105+
"condition": {
106+
"age": 7
107+
}
108+
}
109+
]
110+
},
111+
"location": "US",
112+
"locationType": "multi-region",
113+
"metageneration": "1",
114+
"name": "storagebucket-sample-${uniqueId}",
115+
"projectNumber": "${projectNumber}",
116+
"rpo": "DEFAULT",
117+
"selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}",
118+
"softDeletePolicy": {
119+
"effectiveTime": "2024-04-01T12:34:56.123456Z",
120+
"retentionDurationSeconds": "604800"
121+
},
122+
"storageClass": "STANDARD",
123+
"timeCreated": "2024-04-01T12:34:56.123456Z",
124+
"updated": "2024-04-01T12:34:56.123456Z",
125+
"versioning": {
126+
"enabled": false
127+
}
128+
}
129+
130+
---
131+
132+
GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false
133+
User-Agent: google-api-go-client/0.5 kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
134+
135+
200 OK
136+
Content-Type: application/json; charset=UTF-8
137+
Expires: {now+0m}
138+
Server: UploadServer
139+
Vary: Origin
140+
Vary: X-Origin
141+
142+
{
143+
"customPlacementConfig": {
144+
"dataLocations": [
145+
"US-EAST1",
146+
"US-WEST1"
147+
]
148+
},
149+
"etag": "abcdef0123A=",
150+
"iamConfiguration": {
151+
"bucketPolicyOnly": {
152+
"enabled": false
153+
},
154+
"publicAccessPrevention": "inherited",
155+
"uniformBucketLevelAccess": {
156+
"enabled": false
157+
}
158+
},
159+
"id": "000000000000000000000",
160+
"kind": "storage#bucket",
161+
"labels": {
162+
"label-one": "value-one",
163+
"managed-by-cnrm": "true"
164+
},
165+
"lifecycle": {
166+
"rule": [
167+
{
168+
"action": {
169+
"type": "Delete"
170+
},
171+
"condition": {
172+
"age": 7
173+
}
174+
}
175+
]
176+
},
177+
"location": "US",
178+
"locationType": "multi-region",
179+
"metageneration": "1",
180+
"name": "storagebucket-sample-${uniqueId}",
181+
"projectNumber": "${projectNumber}",
182+
"rpo": "DEFAULT",
183+
"selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}",
184+
"softDeletePolicy": {
185+
"effectiveTime": "2024-04-01T12:34:56.123456Z",
186+
"retentionDurationSeconds": "604800"
187+
},
188+
"storageClass": "STANDARD",
189+
"timeCreated": "2024-04-01T12:34:56.123456Z",
190+
"updated": "2024-04-01T12:34:56.123456Z",
191+
"versioning": {
192+
"enabled": false
193+
}
194+
}
195+
196+
---
197+
198+
GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false
199+
User-Agent: google-api-go-client/0.5 kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
200+
201+
200 OK
202+
Content-Type: application/json; charset=UTF-8
203+
Expires: {now+0m}
204+
Server: UploadServer
205+
Vary: Origin
206+
Vary: X-Origin
207+
208+
{
209+
"customPlacementConfig": {
210+
"dataLocations": [
211+
"US-EAST1",
212+
"US-WEST1"
213+
]
214+
},
215+
"etag": "abcdef0123A=",
216+
"iamConfiguration": {
217+
"bucketPolicyOnly": {
218+
"enabled": false
219+
},
220+
"publicAccessPrevention": "inherited",
221+
"uniformBucketLevelAccess": {
222+
"enabled": false
223+
}
224+
},
225+
"id": "000000000000000000000",
226+
"kind": "storage#bucket",
227+
"labels": {
228+
"label-one": "value-one",
229+
"managed-by-cnrm": "true"
230+
},
231+
"lifecycle": {
232+
"rule": [
233+
{
234+
"action": {
235+
"type": "Delete"
236+
},
237+
"condition": {
238+
"age": 7
239+
}
240+
}
241+
]
242+
},
243+
"location": "US",
244+
"locationType": "multi-region",
245+
"metageneration": "1",
246+
"name": "storagebucket-sample-${uniqueId}",
247+
"projectNumber": "${projectNumber}",
248+
"rpo": "DEFAULT",
249+
"selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}",
250+
"softDeletePolicy": {
251+
"effectiveTime": "2024-04-01T12:34:56.123456Z",
252+
"retentionDurationSeconds": "604800"
253+
},
254+
"storageClass": "STANDARD",
255+
"timeCreated": "2024-04-01T12:34:56.123456Z",
256+
"updated": "2024-04-01T12:34:56.123456Z",
257+
"versioning": {
258+
"enabled": false
259+
}
260+
}
261+
262+
---
263+
264+
GET https://storage.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}?alt=json&prettyPrint=false
265+
User-Agent: google-api-go-client/0.5 kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
266+
267+
200 OK
268+
Content-Type: application/json; charset=UTF-8
269+
Expires: {now+0m}
270+
Server: UploadServer
271+
Vary: Origin
272+
Vary: X-Origin
273+
274+
{
275+
"customPlacementConfig": {
276+
"dataLocations": [
277+
"US-EAST1",
278+
"US-WEST1"
279+
]
280+
},
281+
"etag": "abcdef0123A=",
282+
"iamConfiguration": {
283+
"bucketPolicyOnly": {
284+
"enabled": false
285+
},
286+
"publicAccessPrevention": "inherited",
287+
"uniformBucketLevelAccess": {
288+
"enabled": false
289+
}
290+
},
291+
"id": "000000000000000000000",
292+
"kind": "storage#bucket",
293+
"labels": {
294+
"label-one": "value-one",
295+
"managed-by-cnrm": "true"
296+
},
297+
"lifecycle": {
298+
"rule": [
299+
{
300+
"action": {
301+
"type": "Delete"
302+
},
303+
"condition": {
304+
"age": 7
305+
}
306+
}
307+
]
308+
},
309+
"location": "US",
310+
"locationType": "multi-region",
311+
"metageneration": "1",
312+
"name": "storagebucket-sample-${uniqueId}",
313+
"projectNumber": "${projectNumber}",
314+
"rpo": "DEFAULT",
315+
"selfLink": "https://www.googleapis.com/storage/v1/b/storagebucket-sample-${uniqueId}",
316+
"softDeletePolicy": {
317+
"effectiveTime": "2024-04-01T12:34:56.123456Z",
318+
"retentionDurationSeconds": "604800"
319+
},
320+
"storageClass": "STANDARD",
321+
"timeCreated": "2024-04-01T12:34:56.123456Z",
322+
"updated": "2024-04-01T12:34:56.123456Z",
323+
"versioning": {
324+
"enabled": false
325+
}
326+
}

0 commit comments

Comments
 (0)