Skip to content

Commit f1d3b96

Browse files
committed
Support add the snapshot labels to images
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 8048b98 commit f1d3b96

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pkg/gce-cloud-provider/compute/fake-gce.go

+1
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ func (cloud *FakeCloudProvider) CreateImage(ctx context.Context, project string,
424424
SourceType: "RAW",
425425
Status: "PENDING",
426426
StorageLocations: snapshotParams.StorageLocations,
427+
Labels: snapshotParams.Labels,
427428
}
428429

429430
switch volKey.Type() {

pkg/gce-cloud-provider/compute/gce-compute.go

+1
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ func (cloud *CloudProvider) CreateImage(ctx context.Context, project string, vol
924924
Name: imageName,
925925
StorageLocations: snapshotParams.StorageLocations,
926926
Description: description,
927+
Labels: snapshotParams.Labels,
927928
}
928929

929930
_, err = cloud.service.Images.Insert(project, image).Context(ctx).ForceCreate(true).Do()

0 commit comments

Comments
 (0)