Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for NewSpecFromVolume (0.36 sec)

  1. pkg/volume/downwardapi/downwardapi_test.go

    				DefaultMode: &defaultMode,
    				Items:       files,
    			},
    		},
    	}
    	podMeta.UID = testPodUID
    	pod := &v1.Pod{ObjectMeta: podMeta}
    	mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{})
    	if err != nil {
    		t.Errorf("Failed to make a new Mounter: %v", err)
    	}
    	if mounter == nil {
    		t.Fatalf("Got a nil Mounter")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 04:48:49 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  2. pkg/volume/git_repo/git_repo_test.go

    		allErrs = append(allErrs,
    			fmt.Errorf("can't find the plugin by name"))
    		return allErrs
    	}
    	pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}}
    	mounter, err := plug.NewMounter(volume.NewSpecFromVolume(scenario.vol), pod, volume.VolumeOptions{})
    
    	if err != nil {
    		allErrs = append(allErrs,
    			fmt.Errorf("failed to make a new Mounter: %w", err))
    		return allErrs
    	}
    	if mounter == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 08:26:26 UTC 2024
    - 12K bytes
    - Viewed (0)
  3. pkg/volume/portworx/portworx.go

    		Name: volumeName,
    		VolumeSource: v1.VolumeSource{
    			PortworxVolume: &v1.PortworxVolumeSource{
    				VolumeID: volumeName,
    			},
    		},
    	}
    	return volume.ReconstructedVolume{
    		Spec: volume.NewSpecFromVolume(portworxVolume),
    	}, nil
    }
    
    func (plugin *portworxVolumePlugin) SupportsMountOption() bool {
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. pkg/volume/iscsi/iscsi_test.go

    				TargetPortal: "127.0.0.1:3260",
    				IQN:          "iqn.2014-12.server:storage.target01",
    				FSType:       "ext4",
    				Lun:          0,
    			},
    		},
    	}
    	doTestPlugin(t, volume.NewSpecFromVolume(vol))
    }
    
    func TestPluginPersistentVolume(t *testing.T) {
    	vol := &v1.PersistentVolume{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: "vol1",
    		},
    		Spec: v1.PersistentVolumeSpec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 16.4K bytes
    - Viewed (0)
  5. pkg/controller/volume/attachdetach/util/util.go

    	}
    
    	// Do not return the original volume object, since it's from the shared
    	// informer it may be mutated by another consumer.
    	clonedPodVolume := podVolume.DeepCopy()
    
    	origspec := volume.NewSpecFromVolume(clonedPodVolume)
    	spec, err := translateInTreeSpecToCSIIfNeeded(origspec, nodeName, vpm, csiMigratedPluginManager, csiTranslator, pod.Namespace)
    	if err != nil {
    		return nil, fmt.Errorf(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 10:42:15 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. pkg/controller/volume/attachdetach/testing/testvolumespec.go

    			GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{
    				PDName:   "pdName",
    				FSType:   "ext4",
    				ReadOnly: false,
    			},
    		},
    	}
    	return volume.ReconstructedVolume{
    		Spec: volume.NewSpecFromVolume(fakeVolume),
    	}, nil
    }
    
    func (plugin *TestPlugin) NewAttacher() (volume.Attacher, error) {
    	attacher := testPluginAttacher{
    		ErrorEncountered:  &plugin.ErrorEncountered,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 17 08:48:30 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  7. pkg/volume/fc/fc.go

    		fcVolume.VolumeSource.FC.TargetWWNs, *fcVolume.VolumeSource.FC.Lun, fcVolume.VolumeSource.FC.WWIDs)
    	return volume.ReconstructedVolume{
    		Spec:                volume.NewSpecFromVolume(fcVolume),
    		SELinuxMountContext: mountContext,
    	}, nil
    }
    
    // ConstructBlockVolumeSpec creates a new volume.Spec with following steps.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  8. pkg/volume/hostpath/host_path.go

    		Name: volumeName,
    		VolumeSource: v1.VolumeSource{
    			HostPath: &v1.HostPathVolumeSource{
    				Path: volumeName,
    			},
    		},
    	}
    	return volume.ReconstructedVolume{
    		Spec: volume.NewSpecFromVolume(hostPathVolume),
    	}, nil
    }
    
    func newDeleter(spec *volume.Spec, host volume.VolumeHost) (volume.Deleter, error) {
    	if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.HostPath == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  9. pkg/volume/plugins.go

    	Spec *Spec
    	// SELinuxMountContext is value of -o context=XYZ mount option.
    	// If empty, no such mount option is used.
    	SELinuxMountContext string
    }
    
    // NewSpecFromVolume creates an Spec from an v1.Volume
    func NewSpecFromVolume(vs *v1.Volume) *Spec {
    	return &Spec{
    		Volume: vs,
    	}
    }
    
    // NewSpecFromPersistentVolume creates an Spec from an v1.PersistentVolume
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 16:13:15 UTC 2024
    - 38.2K bytes
    - Viewed (0)
  10. pkg/volume/emptydir/empty_dir.go

    	emptyDirVolume := &v1.Volume{
    		Name: volName,
    		VolumeSource: v1.VolumeSource{
    			EmptyDir: &v1.EmptyDirVolumeSource{},
    		},
    	}
    	return volume.ReconstructedVolume{
    		Spec: volume.NewSpecFromVolume(emptyDirVolume),
    	}, nil
    }
    
    // mountDetector abstracts how to find what kind of mount a path is backed by.
    type mountDetector interface {
    	// GetMountMedium determines what type of medium a given path is backed
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top