Skip to content

Commit 09398e1

Browse files
owainlewisprydie
authored andcommitted
Use options.PVName when creating FSS PV objects to ensure success across all regions. (#279)
An OCID cannot be reliability used as a PV name since OCIDs may contain invalid chars.
1 parent a9f1706 commit 09398e1

File tree

1 file changed

+1
-2
lines changed
  • pkg/volume/provisioner/fss

1 file changed

+1
-2
lines changed

pkg/volume/provisioner/fss/fss.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ func (fsp *filesystemProvisioner) Provision(options controller.VolumeOptions, ad
184184
// Randomly select a MountTarget IP address to attach to.
185185
var ip string
186186
{
187-
188187
id := target.PrivateIpIds[rand.Int()%len(target.PrivateIpIds)]
189188
logger = logger.With("privateIPID", id)
190189
privateIP, err := fsp.client.Networking().GetPrivateIP(ctx, id)
@@ -218,7 +217,7 @@ func (fsp *filesystemProvisioner) Provision(options controller.VolumeOptions, ad
218217

219218
return &v1.PersistentVolume{
220219
ObjectMeta: metav1.ObjectMeta{
221-
Name: *fs.Id,
220+
Name: options.PVName,
222221
Annotations: map[string]string{
223222
ociVolumeID: *fs.Id,
224223
ociExportID: *export.Id,

0 commit comments

Comments
 (0)