Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 574 for LabelSelector (0.21 sec)

  1. pkg/scheduler/testing/wrappers.go

    	return &s.NodeSelector
    }
    
    // LabelSelectorWrapper wraps a LabelSelector inside.
    type LabelSelectorWrapper struct{ metav1.LabelSelector }
    
    // MakeLabelSelector creates a LabelSelector wrapper.
    func MakeLabelSelector() *LabelSelectorWrapper {
    	return &LabelSelectorWrapper{metav1.LabelSelector{}}
    }
    
    // Label applies a {k,v} pair to the inner LabelSelector.
    func (s *LabelSelectorWrapper) Label(k, v string) *LabelSelectorWrapper {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go

    			labelKey:   "foo4",
    			labelValue: "12",
    			want: map[string]string{
    				"foo4": "12",
    			},
    		},
    	}
    
    	for _, tc := range cases {
    		ls_in := LabelSelector{MatchLabels: tc.labels, MatchExpressions: matchExpressions}
    		ls_out := LabelSelector{MatchLabels: tc.want, MatchExpressions: matchExpressions}
    
    		got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue)
    		if !reflect.DeepEqual(got, &ls_out) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 07 11:09:05 UTC 2018
    - 2.6K bytes
    - Viewed (0)
  3. pkg/registry/apps/replicaset/strategy_test.go

    			},
    		},
    	}
    	rs := &apps.ReplicaSet{
    		ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
    		Spec: apps.ReplicaSetSpec{
    			Selector: &metav1.LabelSelector{MatchLabels: validSelector},
    			Template: validPodTemplate.Template,
    		},
    		Status: apps.ReplicaSetStatus{
    			Replicas:           1,
    			ObservedGeneration: int64(10),
    		},
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 09 21:04:31 UTC 2021
    - 6.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go

    	Name          *string                             `json:"name,omitempty"`
    	SignerName    *string                             `json:"signerName,omitempty"`
    	LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"`
    	Optional      *bool                               `json:"optional,omitempty"`
    	Path          *string                             `json:"path,omitempty"`
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go

    }
    
    func TestLabelSelectorMatchExpression(t *testing.T) {
    	testCases := []struct {
    		name            string
    		labelSelector   *metav1.LabelSelector
    		wantErrorNumber int
    		validateErrs    func(t *testing.T, errs field.ErrorList)
    	}{{
    		name: "Valid LabelSelector",
    		labelSelector: &metav1.LabelSelector{
    			MatchExpressions: []metav1.LabelSelectorRequirement{{
    				Key:      "key",
    				Operator: metav1.LabelSelectorOpIn,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 15.2K bytes
    - Viewed (0)
  6. pkg/apis/policy/v1/conversion_test.go

    		ExpectOut runtime.Object
    		ExpectErr string
    	}{
    		{
    			Name: "v1 to internal with match none selector",
    			In: &v1.PodDisruptionBudget{
    				Spec: v1.PodDisruptionBudgetSpec{
    					Selector: &metav1.LabelSelector{
    						MatchExpressions: []metav1.LabelSelectorRequirement{
    							{
    								Key:      "pdb.kubernetes.io/deprecated-v1beta1-empty-selector-match",
    								Operator: metav1.LabelSelectorOpExists,
    							},
    						},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 09 15:29:11 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go

    )
    
    // PodAffinityTermApplyConfiguration represents an declarative configuration of the PodAffinityTerm type for use
    // with apply.
    type PodAffinityTermApplyConfiguration struct {
    	LabelSelector     *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"`
    	Namespaces        []string                            `json:"namespaces,omitempty"`
    	TopologyKey       *string                             `json:"topologyKey,omitempty"`
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 11:28:02 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  8. pkg/util/labels/labels_test.go

    			labelKey:   "foo4",
    			labelValue: "12",
    			want: map[string]string{
    				"foo4": "12",
    			},
    		},
    	}
    
    	for _, tc := range cases {
    		ls_in := metav1.LabelSelector{MatchLabels: tc.labels}
    		ls_out := metav1.LabelSelector{MatchLabels: tc.want}
    
    		got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue)
    		if !reflect.DeepEqual(got, &ls_out) {
    			t.Errorf("got %v, want %v", got, tc.want)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 17:34:12 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go

    func TestMarshalJSONWithOmit(t *testing.T) {
    	cases := []struct {
    		input  LabelSelector
    		result string
    	}{
    		{LabelSelector{}, `{}`},
    		{LabelSelector{MatchExpressions: []LabelSelectorRequirement{}}, `{}`},
    		{LabelSelector{MatchExpressions: []LabelSelectorRequirement{{}}}, `{"matchExpressions":[{"key":"","operator":""}]}`},
    	}
    
    	for i, c := range cases {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 16:49:23 UTC 2021
    - 4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go

    }
    
    func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *v1.ListOptions, s conversion.Scope) error {
    	if err := v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
    		return err
    	}
    	if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
    		return err
    	}
    	out.Watch = in.Watch
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 01 10:00:25 UTC 2023
    - 5.5K bytes
    - Viewed (0)
Back to top