code: func (p *csiPlugin) getDriverMode(spec *volume.Spec) (driverMode, error) {
  	// TODO (vladimirvivien) ultimately, mode will be retrieved from CSIDriver.Spec.Mode.
  	// However, in alpha version, mode is determined by the volume source:
  	// 1) if volume.Spec.Volume.CSI != nil -> mode is ephemeral
  	// 2) if volume.Spec.PersistentVolume.Spec.CSI != nil -> persistent
  	volSrc, _, err := getSourceFromSpec(spec)
  	if err != nil {
  		return "", err
  	}
  
  	if volSrc != nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) {
  		return ephemeralDriverMode, nil
  	}
  	return persistentDriverMode, nil
  }
docs: // getDriverMode returns the driver mode for the specified spec: {persistent|ephemeral}.
  // 1) If mode cannot be determined, it will default to "persistent".
  // 2) If Mode cannot be resolved to either {persistent | ephemeral}, an error is returned
  // See https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20190122-csi-inline-volumes.md