Merge pull request #106878 from humblec/rbd-1

rbd: initialize ceph monitors slice with an empty value.
This commit is contained in:
Kubernetes Prow Robot 2021-12-08 11:47:55 -08:00 committed by GitHub
commit 8f91d09865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ func (p rbdCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.P
return nil, fmt.Errorf("pv is nil or CSI source not defined on pv")
}
var rbdImageName string
var monSlice []string
monSlice := []string{""}
csiSource := pv.Spec.CSI
rbdImageName = csiSource.VolumeAttributes[imgNameKey]

View File

@ -415,7 +415,7 @@ func TestTranslateCSIPvToInTree(t *testing.T) {
},
PersistentVolumeSource: v1.PersistentVolumeSource{
RBD: &v1.RBDPersistentVolumeSource{
CephMonitors: nil,
CephMonitors: []string{""},
RBDPool: "replicapool",
RBDImage: "kubernetes-dynamic-pvc-e4111eb6-4088-11ec-b823-0242ac110003",
RadosUser: "admin",