Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for topologySpreadConstraint (0.35 sec)

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

    	"k8s.io/utils/ptr"
    )
    
    type topologyPair struct {
    	key   string
    	value string
    }
    
    // topologySpreadConstraint is an internal version for v1.TopologySpreadConstraint
    // and where the selector is parsed.
    // Fields are exported for comparison during testing.
    type topologySpreadConstraint struct {
    	MaxSkew            int32
    	TopologyKey        string
    	Selector           labels.Selector
    	MinDomains         int32
    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/api/pod/util_test.go

    			enabled: false,
    			oldPodSpec: &api.PodSpec{
    				TopologySpreadConstraints: []api.TopologySpreadConstraint{},
    			},
    			podSpec: &api.PodSpec{
    				TopologySpreadConstraints: []api.TopologySpreadConstraint{},
    			},
    			wantPodSpec: &api.PodSpec{
    				TopologySpreadConstraints: []api.TopologySpreadConstraint{},
    			},
    		},
    		{
    			name:    "feature disabled, only old pod use NodeAffinityPolicy field",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 108.8K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/podtopologyspread/plugin.go

    	return framework.QueueSkip, nil
    }
    
    // getConstraints extracts topologySpreadConstraint(s) from the Pod spec.
    // If the Pod doesn't have any topologySpreadConstraint, it returns default constraints.
    func (pl *PodTopologySpread) getConstraints(pod *v1.Pod) ([]topologySpreadConstraint, error) {
    	var constraints []topologySpreadConstraint
    	var err error
    	if len(pod.Spec.TopologySpreadConstraints) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:13:06 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/podtopologyspread/filtering_test.go

    				Obj(),
    			defaultConstraints: []v1.TopologySpreadConstraint{
    				{MaxSkew: 2, TopologyKey: "node", WhenUnsatisfiable: v1.DoNotSchedule},
    			},
    			objs: []runtime.Object{
    				&v1.Service{Spec: v1.ServiceSpec{Selector: map[string]string{"foo": "bar"}}},
    			},
    			want: &preFilterState{
    				Constraints: []topologySpreadConstraint{
    					{
    						MaxSkew:            1,
    						TopologyKey:        "zone",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 143.1K bytes
    - Viewed (0)
  5. pkg/scheduler/apis/config/validation/validation_pluginargs_test.go

    	cases := map[string]struct {
    		args     *config.PodTopologySpreadArgs
    		wantErrs field.ErrorList
    	}{
    		"valid config": {
    			args: &config.PodTopologySpreadArgs{
    				DefaultConstraints: []v1.TopologySpreadConstraint{
    					{
    						MaxSkew:           1,
    						TopologyKey:       "node",
    						WhenUnsatisfiable: v1.DoNotSchedule,
    					},
    					{
    						MaxSkew:           2,
    						TopologyKey:       "zone",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go

    			config: config.PodTopologySpreadArgs{
    				DefaultConstraints: []v1.TopologySpreadConstraint{
    					{
    						MaxSkew:           2,
    						TopologyKey:       "planet",
    						WhenUnsatisfiable: v1.ScheduleAnyway,
    					},
    				},
    				DefaultingType: config.ListDefaulting,
    			},
    			nodes: []*v1.Node{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 60K bytes
    - Viewed (0)
  7. pkg/scheduler/apis/config/validation/validation_pluginargs.go

    		}
    	}
    	if len(allErrs) == 0 {
    		return nil
    	}
    	return allErrs.ToAggregate()
    }
    
    func validateDefaultingType(p *field.Path, v config.PodTopologySpreadConstraintsDefaulting, constraints []v1.TopologySpreadConstraint) *field.Error {
    	if v != config.SystemDefaulting && v != config.ListDefaulting {
    		return field.NotSupported(p, v, []string{string(config.SystemDefaulting), string(config.ListDefaulting)})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 09:29:49 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/podtopologyspread/filtering.go

    // An empty preFilterState object denotes it's a legit state and is set in PreFilter phase.
    // Fields are exported for comparison during testing.
    type preFilterState struct {
    	Constraints []topologySpreadConstraint
    	// We record 2 critical paths instead of all critical paths here.
    	// criticalPaths[0].MatchNum always holds the minimum matching number.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. pkg/scheduler/apis/config/scheme/scheme_test.go

    									},
    								},
    							},
    						},
    						{
    							Name: "PodTopologySpread",
    							Args: &config.PodTopologySpreadArgs{
    								DefaultConstraints: []corev1.TopologySpreadConstraint{
    									{MaxSkew: 1, TopologyKey: "zone", WhenUnsatisfiable: corev1.ScheduleAnyway},
    								},
    								DefaultingType: config.SystemDefaulting,
    							},
    						},
    						{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 13 07:42:19 UTC 2023
    - 22.2K bytes
    - Viewed (0)
  10. pkg/scheduler/apis/config/v1/defaults_test.go

    			in: &configv1.PodTopologySpreadArgs{
    				DefaultConstraints: []v1.TopologySpreadConstraint{
    					{
    						TopologyKey:       "planet",
    						WhenUnsatisfiable: v1.DoNotSchedule,
    						MaxSkew:           2,
    					},
    				},
    			},
    			want: &configv1.PodTopologySpreadArgs{
    				DefaultConstraints: []v1.TopologySpreadConstraint{
    					{
    						TopologyKey:       "planet",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 06 15:03:04 UTC 2024
    - 27.9K bytes
    - Viewed (0)
Back to top