Skip to content

Commit 5965974

Browse files
Update module github.com/stackitcloud/stackit-sdk-go/services/iaas to v1.10.1 (main) (#858) (#984)
* Update module github.com/stackitcloud/stackit-sdk-go/services/iaas to v1.10.1 * use new api version * simplify instance metadata * extract backup payload into its own function --------- Signed-off-by: Felix Breuer <f.breuer94@gmail.com> Co-authored-by: ske-renovate-ce[bot] <163154779+ske-renovate-ce[bot]@users.noreply.github.com>
1 parent 6b3a082 commit 5965974

24 files changed

Lines changed: 1509 additions & 7756 deletions

Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,16 @@ verify-image-stackit-csi-plugin: image-stackit-csi-plugin
124124
@docker run -v ./tools/csi-deps-check.sh:/tools/csi-deps-check.sh --entrypoint=/tools/csi-deps-check.sh $(REGISTRY)/$(REPO)/stackit-csi-plugin-dev:$(VERSION)
125125

126126
# generate mock types for the following services (space-separated list)
127-
MOCK_SERVICES := iaas
128-
129127
.PHONY: mocks
130128
mocks: $(MOCKGEN)
131129
# clean mocks
132130
@find . -name '*_mock.go' -delete || true
133-
# generate mocks
134-
@go mod download
135-
@for service in $(MOCK_SERVICES); do \
136-
INTERFACES=`go doc -all github.com/stackitcloud/stackit-sdk-go/services/$$service | grep '^type Api.* interface' | sed -n 's/^type \(.*\) interface.*/\1/p' | paste -sd,`,DefaultApi; \
137-
$(MOCKGEN) -destination ./pkg/mock/$$service/$$service.go -package $$service github.com/stackitcloud/stackit-sdk-go/services/$$service $$INTERFACES; \
138-
done
139131

132+
# API mocks
140133
@$(MOCKGEN) -destination ./pkg/mock/loadbalancer/loadbalancer.go -package loadbalancer github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api DefaultAPI
134+
@$(MOCKGEN) -destination ./pkg/mock/iaas/iaas.go -package iaas github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api DefaultAPI
141135

136+
# client mocks
142137
@$(MOCKGEN) -destination ./pkg/stackit/iaas_mock.go -package stackit ./pkg/stackit IaasClient
143138
@$(MOCKGEN) -destination ./pkg/stackit/loadbalancer_mock.go -package stackit ./pkg/stackit LoadbalancerClient
144139
@$(MOCKGEN) -destination ./pkg/stackit/server_mock.go -package stackit ./pkg/stackit NodeClient

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ require (
1313
github.com/prometheus/client_golang v1.23.2
1414
github.com/spf13/cobra v1.10.2
1515
github.com/spf13/pflag v1.0.10
16-
github.com/stackitcloud/stackit-sdk-go/core v0.24.0
17-
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5
16+
github.com/stackitcloud/stackit-sdk-go/core v0.25.0
17+
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.10.1
1818
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.11.1
1919
go.uber.org/mock v0.6.0
2020
golang.org/x/sync v0.20.0
@@ -91,7 +91,7 @@ require (
9191
github.com/prometheus/client_model v0.6.2 // indirect
9292
github.com/prometheus/common v0.66.1 // indirect
9393
github.com/prometheus/procfs v0.16.1 // indirect
94-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.18.5 // indirect
94+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.22.1 // indirect
9595
github.com/stoewer/go-strcase v1.3.1 // indirect
9696
github.com/stretchr/objx v0.5.3 // indirect
9797
github.com/x448/float16 v0.8.4 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
190190
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
191191
github.com/stackitcloud/cloud-provider v0.33.2-ske-1 h1:5ul5l6h474fxSQm55OSHZoTtrwhO9mNjA1rEAik7Ugs=
192192
github.com/stackitcloud/cloud-provider v0.33.2-ske-1/go.mod h1:yS8ArLLLZV1+Tv6hkSYrZuYEVz+wQgiekUtaqe9Wxao=
193-
github.com/stackitcloud/stackit-sdk-go/core v0.24.0 h1:kHCcezCJ5OGSP7RRuGOxD5rF2wejpkEiRr/OdvNcuPQ=
194-
github.com/stackitcloud/stackit-sdk-go/core v0.24.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
195-
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5 h1:W57+XRa8wTLsi5CV9Tqa7mGgt/PvlRM//RurXSmvII8=
196-
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5/go.mod h1:lTWjW57eAq1bwfM6nsNinhoBr3MHFW/GaFasdAsYfDM=
193+
github.com/stackitcloud/stackit-sdk-go/core v0.25.0 h1:ra3VEk684MNoq741g+xbZrKjZzhyztq5liUAwwew4DY=
194+
github.com/stackitcloud/stackit-sdk-go/core v0.25.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA=
195+
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.10.1 h1:cnuhSWcd2MxG/LWkJgxTZCbtLCBLNSB31/iGfCj7rUw=
196+
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.10.1/go.mod h1:Qa7486Y17g07N/9HbAVEVPcPZ+e1l3y7F9I7j5nKewY=
197197
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.11.1 h1:8hLLCP4n9w3K3dqJaKF1PnMpX4qjR8UQL3gDr80hgDI=
198198
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.11.1/go.mod h1:vqTjmecQ4+oVWzeo9tCOUZ3TrpIIzM+C0apC7cdAD0Y=
199-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.18.5 h1:MZ5aTO2NQ1Jecmi67ByGskve5nKXHl91fE+z+vFjxt4=
200-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.18.5/go.mod h1:CJLmdqWvJm5/3+lXPDKu8k4WXs2UG8euGoqQX5xE79k=
199+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.22.1 h1:J7EqPLrdfEWhEw5bH3StHbKtrSwJ6Gdjw5RwzsHXGf0=
200+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.22.1/go.mod h1:hczoIYoLKu7vL+iunL1AlhQ2MqQXckPlqiozrqdZrWQ=
201201
github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs=
202202
github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
203203
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

pkg/ccm/instances.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"github.com/stackitcloud/cloud-provider-stackit/pkg/labels"
2727
"github.com/stackitcloud/cloud-provider-stackit/pkg/stackit"
28-
"github.com/stackitcloud/stackit-sdk-go/services/iaas"
28+
iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api"
2929

3030
corev1 "k8s.io/api/core/v1"
3131
cloudprovider "k8s.io/cloud-provider"
@@ -105,27 +105,30 @@ func (i *Instances) InstanceMetadata(ctx context.Context, node *corev1.Node) (*c
105105
if len(server.GetNics()) == 0 {
106106
return nil, fmt.Errorf("server has no network interfaces")
107107
}
108-
for _, nic := range server.GetNics() {
109-
if ipv4, ok := nic.GetIpv4Ok(); ok {
108+
109+
nics := server.GetNics()
110+
for i := range nics {
111+
nic := &nics[i]
112+
if nic.HasIpv4() {
110113
addToNodeAddresses(&addresses,
111114
corev1.NodeAddress{
112-
Address: ipv4,
115+
Address: nic.GetIpv4(),
113116
Type: corev1.NodeInternalIP,
114117
})
115118
}
116119

117-
if ipv6, ok := nic.GetIpv6Ok(); ok {
120+
if nic.HasIpv6() {
118121
addToNodeAddresses(&addresses,
119122
corev1.NodeAddress{
120-
Address: ipv6,
123+
Address: nic.GetIpv6(),
121124
Type: corev1.NodeInternalIP,
122125
})
123126
}
124127

125-
if publicIP, ok := nic.GetPublicIpOk(); ok {
128+
if nic.HasPublicIp() {
126129
addToNodeAddresses(&addresses,
127130
corev1.NodeAddress{
128-
Address: publicIP,
131+
Address: nic.GetPublicIp(),
129132
Type: corev1.NodeExternalIP,
130133
})
131134
}
@@ -214,7 +217,7 @@ func getServerByName(ctx context.Context, client stackit.NodeClient, name, proje
214217
// TODO: Implement field selector for ListServers so we don't have to do the following
215218
for i := range serverList {
216219
server := serverList[i]
217-
if serverName, ok := server.GetNameOk(); ok && serverName == name {
220+
if server.GetName() == name {
218221
return &server, nil
219222
}
220223
}

pkg/ccm/instances_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
. "github.com/onsi/gomega"
2525

2626
"github.com/stackitcloud/cloud-provider-stackit/pkg/stackit"
27-
"github.com/stackitcloud/stackit-sdk-go/services/iaas"
27+
iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api"
2828

2929
"go.uber.org/mock/gomock"
3030
corev1 "k8s.io/api/core/v1"
@@ -82,7 +82,7 @@ var _ = Describe("Node Controller", func() {
8282
It("successfully get the instance when provider ID not there", func() {
8383
nodeMockClient.EXPECT().ListServers(gomock.Any(), projectID, region).Return(&[]iaas.Server{
8484
{
85-
Name: new("foo"),
85+
Name: "foo",
8686
},
8787
}, nil)
8888

@@ -97,7 +97,7 @@ var _ = Describe("Node Controller", func() {
9797

9898
It("successfully get the instance when provider ID is there", func() {
9999
nodeMockClient.EXPECT().GetServer(gomock.Any(), projectID, region, serverID).Return(&iaas.Server{
100-
Name: new("foo"),
100+
Name: "foo",
101101
}, nil)
102102

103103
node := &corev1.Node{
@@ -114,7 +114,7 @@ var _ = Describe("Node Controller", func() {
114114

115115
It("successfully get the instance when old provider ID is there", func() {
116116
nodeMockClient.EXPECT().GetServer(gomock.Any(), projectID, region, serverID).Return(&iaas.Server{
117-
Name: new("foo"),
117+
Name: "foo",
118118
}, nil)
119119

120120
node := &corev1.Node{
@@ -131,7 +131,7 @@ var _ = Describe("Node Controller", func() {
131131

132132
It("successfully get the instance when old regional provider ID is there", func() {
133133
nodeMockClient.EXPECT().GetServer(gomock.Any(), projectID, region, serverID).Return(&iaas.Server{
134-
Name: new("foo"),
134+
Name: "foo",
135135
}, nil)
136136

137137
node := &corev1.Node{
@@ -177,7 +177,7 @@ var _ = Describe("Node Controller", func() {
177177
It("successfully gets the instance status with provider ID", func() {
178178
nodeMockClient.EXPECT().ListServers(gomock.Any(), projectID, region).Return(&[]iaas.Server{
179179
{
180-
Name: new("foo"),
180+
Name: "foo",
181181
Status: new(instanceStopping),
182182
},
183183
}, nil)
@@ -193,7 +193,7 @@ var _ = Describe("Node Controller", func() {
193193

194194
It("successfully gets the instance status without provider ID", func() {
195195
nodeMockClient.EXPECT().GetServer(gomock.Any(), projectID, region, serverID).Return(&iaas.Server{
196-
Name: new("foo"),
196+
Name: "foo",
197197
Status: new("ACTIVE"),
198198
}, nil)
199199

@@ -238,10 +238,10 @@ var _ = Describe("Node Controller", func() {
238238
It("successfully get all the metadata values", func() {
239239
nodeMockClient.EXPECT().ListServers(gomock.Any(), projectID, region).Return(&[]iaas.Server{
240240
{
241-
Name: new("foo"),
241+
Name: "foo",
242242
Id: new(serverID),
243-
MachineType: new("flatcar"),
244-
Nics: &[]iaas.ServerNetwork{
243+
MachineType: "flatcar",
244+
Nics: []iaas.ServerNetwork{
245245
{
246246
Ipv4: new("10.10.100.24"),
247247
},

pkg/ccm/stackit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
stackitconfig "github.com/stackitcloud/cloud-provider-stackit/pkg/stackit/config"
1010
sdkconfig "github.com/stackitcloud/stackit-sdk-go/core/config"
11-
"github.com/stackitcloud/stackit-sdk-go/services/iaas"
11+
iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api"
1212
loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api"
1313
"gopkg.in/yaml.v3"
1414
corev1 "k8s.io/api/core/v1"

pkg/csi/blockstorage/controllerserver.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/go-viper/mapstructure/v2"
2828
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
2929
"github.com/stackitcloud/cloud-provider-stackit/pkg/csi/util"
30-
"github.com/stackitcloud/stackit-sdk-go/services/iaas"
30+
iaas "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api"
3131
"google.golang.org/grpc/codes"
3232
"google.golang.org/grpc/status"
3333
"google.golang.org/protobuf/types/known/timestamppb"
@@ -130,7 +130,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
130130
if *vols[0].Status != stackit.VolumeAvailableStatus {
131131
return nil, status.Error(codes.Internal, fmt.Sprintf("Volume %s is not in available state", *vols[0].Id))
132132
}
133-
klog.V(4).Infof("Volume %s already exists in Availability Zone: %s of size %d GiB", *vols[0].Id, *vols[0].AvailabilityZone, *vols[0].Size)
133+
klog.V(4).Infof("Volume %s already exists in Availability Zone: %s of size %d GiB", *vols[0].Id, vols[0].AvailabilityZone, *vols[0].Size)
134134
return getCreateVolumeResponse(&vols[0]), nil
135135
} else if len(vols) > 1 {
136136
klog.V(3).Infof("found multiple existing volumes with selected name (%s) during create", volName)
@@ -175,8 +175,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
175175
if err != nil {
176176
return nil, status.Errorf(codes.Internal, "Failed to retrieve the source volume of snapshot %s: %v", sourceSnapshotID, err)
177177
}
178-
if *snapshotVolSrc.AvailabilityZone != volAvailability {
179-
return nil, status.Errorf(codes.ResourceExhausted, "Volume must be in the same availability zone as source Snapshot. Got %s Required: %s", volAvailability, *snapshotVolSrc.AvailabilityZone)
178+
if snapshotVolSrc.AvailabilityZone != volAvailability {
179+
return nil, status.Errorf(codes.ResourceExhausted, "Volume must be in the same availability zone as source Snapshot. Got %s Required: %s", volAvailability, snapshotVolSrc.AvailabilityZone)
180180
}
181181
}
182182

@@ -208,8 +208,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
208208
}
209209
return nil, status.Errorf(codes.Internal, "Failed to retrieve the source volume %s: %v", sourceVolID, err)
210210
}
211-
if volAvailability != *sourceVolume.AvailabilityZone {
212-
return nil, status.Errorf(codes.ResourceExhausted, "Volume must be in the same availability zone as source Volume. Got %s Required: %s", volAvailability, *sourceVolume.AvailabilityZone)
211+
if volAvailability != sourceVolume.AvailabilityZone {
212+
return nil, status.Errorf(codes.ResourceExhausted, "Volume must be in the same availability zone as source Volume. Got %s Required: %s", volAvailability, sourceVolume.AvailabilityZone)
213213
}
214214
volumeSourceType = stackit.VolumeSource
215215
}
@@ -218,7 +218,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
218218
Name: new(volName),
219219
PerformanceClass: volParams.PerformanceClass,
220220
Size: new(volSizeGB),
221-
AvailabilityZone: new(volAvailability),
221+
AvailabilityZone: volAvailability,
222222
//TODO: IaaS API does not allow dots or slashes. Additionally we would like to actually use metadata/annotations
223223
//Labels: new(util.ConvertMapStringToInterface(properties)),
224224
}
@@ -233,8 +233,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
233233
volumeSourceID := determineSourceIDForSourceType(volumeSourceType, sourceSnapshotID, sourceVolID)
234234
klog.V(4).Infof("Creating volume from %s source", volumeSourceType)
235235
opts.Source = &iaas.VolumeSource{
236-
Id: new(volumeSourceID),
237-
Type: new(string(volumeSourceType)),
236+
Id: volumeSourceID,
237+
Type: string(volumeSourceType),
238238
}
239239
}
240240

@@ -272,7 +272,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
272272
return nil, status.Error(codes.Internal, fmt.Sprintf("CreateVolume Volume %s failed getting available in time: %v", *vol.Id, err))
273273
}
274274

275-
klog.V(4).Infof("CreateVolume: Successfully created volume %s in Availability Zone: %s of size %d GiB", *vol.Id, *vol.AvailabilityZone, *vol.Size)
275+
klog.V(4).Infof("CreateVolume: Successfully created volume %s in Availability Zone: %s of size %d GiB", *vol.Id, vol.AvailabilityZone, *vol.Size)
276276

277277
return getCreateVolumeResponse(vol), nil
278278
}
@@ -289,10 +289,10 @@ func setVolumeEncryptionParameters(opts *iaas.CreateVolumePayload, volParams *st
289289
}
290290

291291
encryptionConfig := &iaas.VolumeEncryptionParameter{
292-
KekKeyId: volParams.KMSKeyID,
293-
KekKeyVersion: new(int64(kmsKeyVersionInt)),
294-
KekKeyringId: volParams.KMSKeyringID,
295-
ServiceAccount: volParams.KMSServiceAccount,
292+
KekKeyId: *volParams.KMSKeyID,
293+
KekKeyVersion: int64(kmsKeyVersionInt),
294+
KekKeyringId: *volParams.KMSKeyringID,
295+
ServiceAccount: *volParams.KMSServiceAccount,
296296
}
297297

298298
if volParams.KMSProjectID != nil {
@@ -571,7 +571,7 @@ func (cs *controllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
571571
Snapshot: &csi.Snapshot{
572572
SnapshotId: *snap.Id,
573573
SizeBytes: *snap.Size * util.GIBIBYTE,
574-
SourceVolumeId: *snap.VolumeId,
574+
SourceVolumeId: snap.VolumeId,
575575
CreationTime: ctime,
576576
ReadyToUse: true,
577577
},
@@ -643,7 +643,7 @@ func (cs *controllerServer) createSnapshot(ctx context.Context, cloud stackit.Ia
643643
// Verify a snapshot with the provided name doesn't already exist for this tenant
644644
if len(snapshots) == 1 {
645645
snap := &snapshots[0]
646-
if *snap.VolumeId != volumeID {
646+
if snap.VolumeId != volumeID {
647647
return nil, status.Error(codes.AlreadyExists, "Snapshot with given name already exists, with different source volume ID")
648648
}
649649

@@ -754,7 +754,7 @@ func (cs *controllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnap
754754
Snapshot: &csi.Snapshot{
755755
SizeBytes: *snap.Size * util.GIBIBYTE,
756756
SnapshotId: *snap.Id,
757-
SourceVolumeId: *snap.VolumeId,
757+
SourceVolumeId: snap.VolumeId,
758758
CreationTime: ctime,
759759
ReadyToUse: true,
760760
},
@@ -798,7 +798,7 @@ func (cs *controllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnap
798798
Snapshot: &csi.Snapshot{
799799
SizeBytes: *v.Size * util.GIBIBYTE,
800800
SnapshotId: *v.Id,
801-
SourceVolumeId: *v.VolumeId,
801+
SourceVolumeId: v.VolumeId,
802802
CreationTime: ctime,
803803
ReadyToUse: true,
804804
},
@@ -967,15 +967,15 @@ func getCreateVolumeResponse(vol *iaas.Volume) *csi.CreateVolumeResponse {
967967
volCnx := map[string]string{}
968968

969969
if vol.Source != nil {
970-
volumeSourceType = stackit.VolumeSourceTypes(*vol.Source.Type)
970+
volumeSourceType = stackit.VolumeSourceTypes(vol.Source.Type)
971971
switch volumeSourceType {
972972
case stackit.VolumeSource:
973973
volCnx[ResizeRequired] = "true"
974974

975975
volsrc = &csi.VolumeContentSource{
976976
Type: &csi.VolumeContentSource_Volume{
977977
Volume: &csi.VolumeContentSource_VolumeSource{
978-
VolumeId: *vol.Source.Id,
978+
VolumeId: vol.Source.Id,
979979
},
980980
},
981981
}
@@ -985,7 +985,7 @@ func getCreateVolumeResponse(vol *iaas.Volume) *csi.CreateVolumeResponse {
985985
volsrc = &csi.VolumeContentSource{
986986
Type: &csi.VolumeContentSource_Snapshot{
987987
Snapshot: &csi.VolumeContentSource_SnapshotSource{
988-
SnapshotId: *vol.Source.Id,
988+
SnapshotId: vol.Source.Id,
989989
},
990990
},
991991
}
@@ -995,7 +995,7 @@ func getCreateVolumeResponse(vol *iaas.Volume) *csi.CreateVolumeResponse {
995995
volsrc = &csi.VolumeContentSource{
996996
Type: &csi.VolumeContentSource_Snapshot{
997997
Snapshot: &csi.VolumeContentSource_SnapshotSource{
998-
SnapshotId: *vol.Source.Id,
998+
SnapshotId: vol.Source.Id,
999999
},
10001000
},
10011001
}
@@ -1004,7 +1004,7 @@ func getCreateVolumeResponse(vol *iaas.Volume) *csi.CreateVolumeResponse {
10041004

10051005
accessibleTopology := []*csi.Topology{
10061006
{
1007-
Segments: map[string]string{topologyKey: ptr.Deref(vol.AvailabilityZone, "")},
1007+
Segments: map[string]string{topologyKey: vol.AvailabilityZone},
10081008
},
10091009
}
10101010

0 commit comments

Comments
 (0)