Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MatchTopologySelectorTerms (0.21 sec)

  1. pkg/apis/core/v1/helper/helpers.go

    			return nil, err
    		}
    		selector = selector.Add(*r)
    	}
    
    	return selector, nil
    }
    
    // MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed;
    // nil or empty term matches no objects; while empty term list matches all objects.
    func MatchTopologySelectorTerms(topologySelectorTerms []v1.TopologySelectorTerm, lbls labels.Set) bool {
    	if len(topologySelectorTerms) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 23:03:54 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. pkg/apis/core/v1/helper/helpers_test.go

    					"label_1": "label_1_val-failed",
    					"label_2": "label_2_val",
    				},
    			},
    			want: false,
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := MatchTopologySelectorTerms(tt.args.topologySelectorTerms, tt.args.labels); got != tt.want {
    				t.Errorf("MatchTopologySelectorTermsORed() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 23:03:54 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/volumebinding/binder.go

    			return false, true, nil, nil
    		}
    
    		// Check if the node can satisfy the topology requirement in the class
    		if !v1helper.MatchTopologySelectorTerms(class.AllowedTopologies, labels.Set(node.Labels)) {
    			logger.V(4).Info("Node cannot satisfy provisioning topology requirements of claim", "node", klog.KObj(node), "PVC", klog.KObj(claim))
    			return false, true, nil, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 14:55:34 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top