Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for supportsMetrics (0.27 sec)

  1. pkg/volume/metrics_nil.go

    // Metrics.  It serves as a placeholder for Volumes that do not yet support
    // metrics.
    type MetricsNil struct{}
    
    // SupportsMetrics returns false for the MetricsNil type.
    func (*MetricsNil) SupportsMetrics() bool {
    	return false
    }
    
    // GetMetrics returns an empty Metrics and an error.
    // See MetricsProvider.GetMetrics
    func (*MetricsNil) GetMetrics() (*Metrics, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 20 15:10:23 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  2. pkg/volume/flexvolume/driver-call.go

    	SELinuxRelabel   bool `json:"selinuxRelabel"`
    	SupportsMetrics  bool `json:"supportsMetrics"`
    	FSGroup          bool `json:"fsGroup"`
    	RequiresFSResize bool `json:"requiresFSResize"`
    }
    
    func defaultCapabilities() *DriverCapabilities {
    	return &DriverCapabilities{
    		Attach:           true,
    		SELinuxRelabel:   true,
    		SupportsMetrics:  false,
    		FSGroup:          true,
    		RequiresFSResize: true,
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 25 02:39:55 UTC 2021
    - 7.5K bytes
    - Viewed (0)
  3. pkg/volume/metrics_nil_test.go

    limitations under the License.
    */
    
    package volume
    
    import (
    	"testing"
    )
    
    func TestMetricsNilSupportsMetrics(t *testing.T) {
    	metrics := &MetricsNil{}
    	supported := metrics.SupportsMetrics()
    	if supported {
    		t.Error("Expected no support for metrics")
    	}
    }
    
    func TestMetricsNilGetCapacity(t *testing.T) {
    	metrics := &MetricsNil{}
    	actual, err := metrics.GetMetrics()
    	expected := &Metrics{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 20 15:10:23 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  4. pkg/kubelet/server/stats/volume_stat_calculator.go

    				// Some drivers inherit the MetricsProvider interface from Filesystem
    				// mode volumes, but do not implement it for Block mode. Checking
    				// SupportsMetrics() will prevent panics in that case.
    				if v.SupportsMetrics() {
    					metricVolumes[name] = v
    				}
    			}
    		}
    	}
    
    	// Get volume specs for the pod - key'd by volume name
    	volumesSpec := make(map[string]v1.Volume)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 29 00:55:10 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  5. pkg/volume/flexvolume/plugin.go

    	if err != nil {
    		return nil, err
    	}
    
    	readOnly, err := getReadOnly(spec)
    	if err != nil {
    		return nil, err
    	}
    
    	var metricsProvider volume.MetricsProvider
    	if plugin.capabilities.SupportsMetrics {
    		metricsProvider = volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(
    			pod.UID, utilstrings.EscapeQualifiedName(sourceDriver), spec.Name()))
    	} else {
    		metricsProvider = &volume.MetricsNil{}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. pkg/volume/local/local.go

    	return globalPath, nil
    }
    
    // GetStagingPath returns
    func (m *localVolumeMapper) GetStagingPath() string {
    	return ""
    }
    
    // SupportsMetrics returns true for SupportsMetrics as it initializes the
    // MetricsProvider.
    func (m *localVolumeMapper) SupportsMetrics() bool {
    	return true
    }
    
    // localVolumeUnmapper implements the BlockVolumeUnmapper interface for local volumes.
    type localVolumeUnmapper struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  7. pkg/volume/volume.go

    	// ex. pods/{podUid}/{DefaultKubeletVolumeDevicesDirName}/{escapeQualifiedPluginName}/, {volumeName}
    	GetPodDeviceMapPath() (string, string)
    
    	// SupportsMetrics should return true if the MetricsProvider is
    	// initialized
    	SupportsMetrics() bool
    
    	// MetricsProvider embeds methods for exposing metrics (e.g.
    	// used, available space).
    	MetricsProvider
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. pkg/volume/iscsi/iscsi.go

    type iscsiDiskUnmapper struct {
    	*iscsiDisk
    	exec       utilexec.Interface
    	deviceUtil ioutil.DeviceUtil
    	volume.MetricsNil
    }
    
    // SupportsMetrics returns true for SupportsMetrics as it initializes the
    // MetricsProvider.
    func (idm *iscsiDiskMapper) SupportsMetrics() bool {
    	return true
    }
    
    var _ volume.BlockVolumeUnmapper = &iscsiDiskUnmapper{}
    var _ volume.CustomBlockVolumeUnmapper = &iscsiDiskUnmapper{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  9. pkg/kubelet/server/stats/volume_stat_calculator_test.go

    func (v *fakeBlockVolume) GetGlobalMapPath(*volume.Spec) (string, error) { return "", nil }
    
    func (v *fakeBlockVolume) GetPodDeviceMapPath() (string, string) { return "", "" }
    
    func (v *fakeBlockVolume) SupportsMetrics() bool { return true }
    
    func (v *fakeBlockVolume) GetMetrics() (*volume.Metrics, error) {
    	return expectedBlockMetrics(), nil
    }
    
    func expectedBlockMetrics() *volume.Metrics {
    	vMetrics := &volume.Metrics{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  10. pkg/volume/csi/csi_block.go

    func (m *csiBlockMapper) GetStagingPath() string {
    	return filepath.Join(m.plugin.host.GetVolumeDevicePluginDir(CSIPluginName), "staging", m.specName)
    }
    
    // SupportsMetrics returns true for csiBlockMapper as it initializes the
    // MetricsProvider.
    func (m *csiBlockMapper) SupportsMetrics() bool {
    	return true
    }
    
    // getPublishDir returns path to a directory, where the volume is published to each pod.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 06:07:40 UTC 2023
    - 20.1K bytes
    - Viewed (0)
Back to top