Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for UnsatisfiableConstraintAction (0.77 sec)

  1. pkg/scheduler/framework/plugins/podtopologyspread/common.go

    // .DefaultConstraints and the selectors from the services, replication
    // controllers, replica sets and stateful sets that match the pod.
    func (pl *PodTopologySpread) buildDefaultConstraints(p *v1.Pod, action v1.UnsatisfiableConstraintAction) ([]topologySpreadConstraint, error) {
    	constraints, err := pl.filterTopologySpreadConstraints(pl.defaultConstraints, p.Labels, action)
    	if err != nil || len(constraints) == 0 {
    		return nil, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. pkg/scheduler/apis/config/validation/validation_pluginargs.go

    	} else {
    		allErrs = append(allErrs, metav1validation.ValidateLabelName(v, p)...)
    	}
    	return allErrs
    }
    
    func validateWhenUnsatisfiable(p *field.Path, v v1.UnsatisfiableConstraintAction) *field.Error {
    	supportedScheduleActions := sets.New(string(v1.DoNotSchedule), string(v1.ScheduleAnyway))
    
    	if len(v) == 0 {
    		return field.Required(p, "can not be empty")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 09:29:49 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  3. pkg/scheduler/testing/wrappers.go

    	return p
    }
    
    // SpreadConstraint constructs a TopologySpreadConstraint object and injects
    // into the inner pod.
    func (p *PodWrapper) SpreadConstraint(maxSkew int, tpKey string, mode v1.UnsatisfiableConstraintAction, selector *metav1.LabelSelector, minDomains *int32, nodeAffinityPolicy, nodeTaintsPolicy *v1.NodeInclusionPolicy, matchLabelKeys []string) *PodWrapper {
    	c := v1.TopologySpreadConstraint{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  4. pkg/apis/core/types.go

    	DefaultHardPodAffinitySymmetricWeight int32 = 1
    )
    
    // UnsatisfiableConstraintAction defines the actions that can be taken for an
    // unsatisfiable constraint.
    type UnsatisfiableConstraintAction string
    
    const (
    	// DoNotSchedule instructs the scheduler not to schedule the pod
    	// when constraints are not satisfied.
    	DoNotSchedule UnsatisfiableConstraintAction = "DoNotSchedule"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 268.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/api/core/v1/types.go

    	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
    }
    
    // +enum
    type UnsatisfiableConstraintAction string
    
    const (
    	// DoNotSchedule instructs the scheduler not to schedule the pod
    	// when constraints are not satisfied.
    	DoNotSchedule UnsatisfiableConstraintAction = "DoNotSchedule"
    	// ScheduleAnyway instructs the scheduler to schedule the pod
    	// even if constraints are not satisfied.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 390.8K bytes
    - Viewed (0)
  6. pkg/apis/core/validation/validation.go

    		return field.Required(fldPath, "can not be empty")
    	}
    	return nil
    }
    
    // ValidateWhenUnsatisfiable tests that the argument is a valid UnsatisfiableConstraintAction.
    func ValidateWhenUnsatisfiable(fldPath *field.Path, action core.UnsatisfiableConstraintAction) *field.Error {
    	if !supportedScheduleActions.Has(action) {
    		return field.NotSupported(fldPath, action, sets.List(supportedScheduleActions))
    	}
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/zz_generated.conversion.go

    	out.MaxSkew = in.MaxSkew
    	out.TopologyKey = in.TopologyKey
    	out.WhenUnsatisfiable = core.UnsatisfiableConstraintAction(in.WhenUnsatisfiable)
    	out.LabelSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
    	out.MinDomains = (*int32)(unsafe.Pointer(in.MinDomains))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 472.1K bytes
    - Viewed (0)
  8. pkg/apis/core/validation/validation_test.go

    		},
    		wantFieldErrors: []*field.Error{field.NotSupported(fieldPathWhenUnsatisfiable, core.UnsatisfiableConstraintAction(""), sets.List(supportedScheduleActions))},
    	}, {
    		name: "unsupported scheduling mode",
    		constraints: []core.TopologySpreadConstraint{
    			{MaxSkew: 1, TopologyKey: "k8s.io/zone", WhenUnsatisfiable: core.UnsatisfiableConstraintAction("N/A")},
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/api/core/v1/generated.pb.go

    			postIndex := iNdEx + intStringLen
    			if postIndex < 0 {
    				return ErrInvalidLengthGenerated
    			}
    			if postIndex > l {
    				return io.ErrUnexpectedEOF
    			}
    			m.WhenUnsatisfiable = UnsatisfiableConstraintAction(dAtA[iNdEx:postIndex])
    			iNdEx = postIndex
    		case 4:
    			if wireType != 2 {
    				return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
    			}
    			var msglen int
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 1.8M bytes
    - Viewed (0)
Back to top