Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for supportsMetrics (0.2 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/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)
Back to top