Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for MetricSpec (0.14 sec)

  1. pkg/apis/autoscaling/validation/validation_test.go

    			ScaleTargetRef: autoscaling.CrossVersionObjectReference{
    				Kind: "ReplicationController",
    				Name: "myrc",
    			},
    			MinReplicas: utilpointer.Int32(1),
    			MaxReplicas: 5,
    			Metrics: []autoscaling.MetricSpec{{
    				Type: autoscaling.ResourceMetricSourceType,
    				Resource: &autoscaling.ResourceMetricSource{
    					Name: api.ResourceCPU,
    					Target: autoscaling.MetricTarget{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 56.7K bytes
    - Viewed (0)
  2. pkg/controller/podautoscaler/horizontal.go

    	} else if metricSpec.Object.Target.Type == autoscalingv2.AverageValueMetricType && metricSpec.Object.Target.AverageValue != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  3. pkg/apis/autoscaling/v1/conversion_test.go

    	}{
    		{
    			"TestConversionWithCPUAverageValueAndUtilizationBoth1",
    			args{
    				in: &autoscaling.HorizontalPodAutoscalerSpec{
    					MinReplicas: utilpointer.Int32(1),
    					MaxReplicas: 3,
    					Metrics: []autoscaling.MetricSpec{
    						{
    							Type: autoscaling.ResourceMetricSourceType,
    							Resource: &autoscaling.ResourceMetricSource{
    								Name: api.ResourceCPU,
    								Target: autoscaling.MetricTarget{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 08 12:14:37 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. pkg/apis/autoscaling/validation/validation.go

    	return allErrs
    }
    
    func validateMetrics(metrics []autoscaling.MetricSpec, fldPath *field.Path, minReplicas *int32) field.ErrorList {
    	allErrs := field.ErrorList{}
    	hasObjectMetrics := false
    	hasExternalMetrics := false
    
    	for i, metricSpec := range metrics {
    		idxPath := fldPath.Index(i)
    		if targetErrs := validateMetricSpec(metricSpec, idxPath); len(targetErrs) > 0 {
    			allErrs = append(allErrs, targetErrs...)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 25 00:58:00 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  5. pkg/kubelet/stats/provider_test.go

    		})
    	var ret []cadvisorapiv1.MetricSpec
    	f.Fuzz(&ret)
    	return ret
    }
    
    func generateCustomMetrics(spec []cadvisorapiv1.MetricSpec) map[string][]cadvisorapiv1.MetricVal {
    	ret := map[string][]cadvisorapiv1.MetricVal{}
    	for _, metricSpec := range spec {
    		f := fuzz.New().NilChance(0).Funcs(
    			func(e *cadvisorapiv1.MetricVal, c fuzz.Continue) {
    				switch metricSpec.Format {
    				case cadvisorapiv1.IntType:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 20K bytes
    - Viewed (0)
  6. pkg/controller/podautoscaler/horizontal_test.go

    	statusUpdated                bool
    	eventCreated                 bool
    	verifyEvents                 bool
    	useMetricsAPI                bool
    	metricsTarget                []autoscalingv2.MetricSpec
    	expectedDesiredReplicas      int32
    	expectedConditions           []autoscalingv2.HorizontalPodAutoscalerCondition
    	// Channel with names of HPA objects which we have reconciled.
    	processed chan string
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 199.3K bytes
    - Viewed (0)
  7. pkg/apis/autoscaling/v2beta1/defaults.go

    		obj.Spec.MinReplicas = pointer.Int32(1)
    	}
    
    	if len(obj.Spec.Metrics) == 0 {
    		utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
    		obj.Spec.Metrics = []autoscalingv2beta1.MetricSpec{
    			{
    				Type: autoscalingv2beta1.ResourceMetricSourceType,
    				Resource: &autoscalingv2beta1.ResourceMetricSource{
    					Name:                     v1.ResourceCPU,
    					TargetAverageUtilization: &utilizationDefaultVal,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 15 06:03:59 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  8. pkg/apis/autoscaling/v2/defaults.go

    	if obj.Spec.MinReplicas == nil {
    		obj.Spec.MinReplicas = pointer.Int32(1)
    	}
    
    	if len(obj.Spec.Metrics) == 0 {
    		utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
    		obj.Spec.Metrics = []autoscalingv2.MetricSpec{
    			{
    				Type: autoscalingv2.ResourceMetricSourceType,
    				Resource: &autoscalingv2.ResourceMetricSource{
    					Name: v1.ResourceCPU,
    					Target: autoscalingv2.MetricTarget{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 15 06:03:59 UTC 2022
    - 4.6K bytes
    - Viewed (0)
  9. operator/pkg/apis/istio/v1alpha1/deepcopy_test.go

    	x := &v1alpha12.ResourceMetricSource{}
    	err := yaml.UnmarshalStrict([]byte("targetAverageValue: 100m"), x)
    	t.Log(x)
    	if err != nil {
    		t.Fatal(err)
    	}
    	y := &v1alpha12.MetricSpec{}
    	err = yaml.UnmarshalStrict([]byte(`
    type: Resource
    resource:
      targetAverageValue: 100m`), y)
    	t.Log(y)
    	if err != nil {
    		t.Fatal(err)
    	}
    	z := &v1alpha12.HorizontalPodAutoscalerSpec{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 05 23:34:13 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  10. pkg/apis/autoscaling/fuzzer/fuzzer.go

    			var objMetricID autoscaling.MetricIdentifier
    			c.Fuzz(&podMetricID)
    			c.Fuzz(&objMetricID)
    
    			targetUtilization := int32(c.RandUint64())
    			averageValue := randomQuantity()
    			s.Metrics = []autoscaling.MetricSpec{
    				{
    					Type: autoscaling.PodsMetricSourceType,
    					Pods: &autoscaling.PodsMetricSource{
    						Metric: podMetricID,
    						Target: autoscaling.MetricTarget{
    							Type:         autoscaling.AverageValueMetricType,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 15 06:03:59 UTC 2022
    - 5.1K bytes
    - Viewed (0)
Back to top