Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for pvSrc (0.06 sec)

  1. pkg/volume/csi/csi_mounter_test.go

    			mode:   storage.VolumeLifecyclePersistent,
    			fsType: "zfs",
    			spec: func(fsType string, options []string) *volume.Spec {
    				pvSrc := makeTestPV("pv1", 20, testDriver, "vol1")
    				pvSrc.Spec.CSI.FSType = fsType
    				pvSrc.Spec.MountOptions = options
    				return volume.NewSpecFromPersistentVolume(pvSrc, false)
    			},
    		},
    		{
    			name:   "setup with persistent source without unspecified fstype and options",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 50.1K bytes
    - Viewed (0)
  2. pkg/volume/csi/csi_util.go

    }
    
    // GetCSIDriverName returns the csi driver name
    func GetCSIDriverName(spec *volume.Spec) (string, error) {
    	volSrc, pvSrc, err := getSourceFromSpec(spec)
    	if err != nil {
    		return "", err
    	}
    
    	switch {
    	case volSrc != nil:
    		return volSrc.Driver, nil
    	case pvSrc != nil:
    		return pvSrc.Driver, nil
    	default:
    		return "", errors.New(log("volume source not found in volume.Spec"))
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 28 17:14:00 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  3. pkg/volume/csi/csi_attacher.go

    		klog.Error(log("attacher.Attach missing volume.Spec"))
    		return "", errors.New("missing spec")
    	}
    
    	pvSrc, err := getPVSourceFromSpec(spec)
    	if err != nil {
    		return "", errors.New(log("attacher.Attach failed to get CSIPersistentVolumeSource: %v", err))
    	}
    
    	node := string(nodeName)
    	attachID := getAttachmentName(pvSrc.VolumeHandle, pvSrc.Driver, node)
    
    	attachment, err := c.plugin.volumeAttachmentLister.Get(attachID)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 03 07:38:14 UTC 2023
    - 25.9K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_mounter.go

    		}
    	case pvSrc != nil:
    		if c.volumeLifecycleMode != storage.VolumeLifecyclePersistent {
    			return fmt.Errorf("unexpected driver mode: %s", c.volumeLifecycleMode)
    		}
    
    		fsType = pvSrc.FSType
    
    		volAttribs = pvSrc.VolumeAttributes
    
    		if pvSrc.NodePublishSecretRef != nil {
    			secretRef = pvSrc.NodePublishSecretRef
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jan 30 10:47:59 UTC 2024
    - 21K bytes
    - Viewed (1)
  5. pkg/volume/csi/csi_plugin.go

    		driverName = volSrc.Driver
    		if volSrc.ReadOnly != nil {
    			readOnly = *volSrc.ReadOnly
    		}
    	case pvSrc != nil:
    		driverName = pvSrc.Driver
    		volumeHandle = pvSrc.VolumeHandle
    		readOnly = spec.ReadOnly
    	default:
    		return nil, errors.New(log("volume source not found in volume.Spec"))
    	}
    
    	volumeLifecycleMode, err := p.getVolumeLifecycleMode(spec)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 29.2K bytes
    - Viewed (0)
  6. pkg/volume/csi/csi_plugin_test.go

    		shouldFail          bool
    	}{
    		{
    			name:       "mounter with missing spec",
    			shouldFail: true,
    		},
    		{
    			name: "mounter with spec with both volSrc and pvSrc",
    			spec: &volume.Spec{
    				Volume:           makeTestVol("test-vol1", testDriver),
    				PersistentVolume: makeTestPV("test-pv1", 20, testDriver, testVol),
    				ReadOnly:         true,
    			},
    			shouldFail: true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
Back to top