Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for TopologySpreadConstraint (0.44 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. pkg/api/pod/warnings_test.go

    						{Preference: api.NodeSelectorTerm{MatchExpressions: []api.NodeSelectorRequirement{{Key: `foo`}}}},
    					},
    				},
    			},
    			TopologySpreadConstraints: []api.TopologySpreadConstraint{
    				{TopologyKey: `foo`},
    			},
    			HostAliases: []api.HostAlias{
    				{IP: "1.1.1.1"},
    				{IP: "2.2.2.2"},
    			},
    			ImagePullSecrets: []api.LocalObjectReference{
    				{Name: "secret1"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 17:51:48 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  6. pkg/registry/core/pod/strategy_test.go

    		ignore           = api.NodeInclusionPolicyIgnore
    		emptyConstraints = []api.TopologySpreadConstraint{
    			{
    				WhenUnsatisfiable: api.DoNotSchedule,
    				TopologyKey:       "kubernetes.io/hostname",
    				MaxSkew:           1,
    			},
    		}
    		defaultConstraints = []api.TopologySpreadConstraint{
    			{
    				NodeAffinityPolicy: &honor,
    				NodeTaintsPolicy:   &ignore,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/zz_generated.conversion.go

    	}); err != nil {
    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*v1.TopologySpreadConstraint)(nil), (*core.TopologySpreadConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error {
    		return Convert_v1_TopologySpreadConstraint_To_core_TopologySpreadConstraint(a.(*v1.TopologySpreadConstraint), b.(*core.TopologySpreadConstraint), scope)
    	}); err != nil {
    		return err
    	}
    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/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{
    		MaxSkew:            int32(maxSkew),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  9. pkg/apis/core/validation/validation_test.go

    	testCases := []struct {
    		name            string
    		constraints     []core.TopologySpreadConstraint
    		wantFieldErrors field.ErrorList
    		opts            PodValidationOptions
    	}{{
    		name: "all required fields ok",
    		constraints: []core.TopologySpreadConstraint{{
    			MaxSkew:           1,
    			TopologyKey:       "k8s.io/zone",
    			WhenUnsatisfiable: core.DoNotSchedule,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
  10. pkg/apis/core/zz_generated.deepcopy.go

    		copy(*out, *in)
    	}
    	return
    }
    
    // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySpreadConstraint.
    func (in *TopologySpreadConstraint) DeepCopy() *TopologySpreadConstraint {
    	if in == nil {
    		return nil
    	}
    	out := new(TopologySpreadConstraint)
    	in.DeepCopyInto(out)
    	return out
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 181.5K bytes
    - Viewed (0)
Back to top