Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for namespaceMatch (1.68 sec)

  1. pkg/config/analysis/analyzers/authz/authorizationpolicies_test.go

    )
    
    func TestNamespaceMatch(t *testing.T) {
    	assert.Equal(t, namespaceMatch("test-login", "*"), true)
    
    	assert.Equal(t, namespaceMatch("test-login", "test-*"), true)
    	assert.Equal(t, namespaceMatch("test-login", "*-test"), false)
    
    	assert.Equal(t, namespaceMatch("test-login", "login-*"), false)
    	assert.Equal(t, namespaceMatch("test-login", "*-login"), true)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 14 19:27:32 UTC 2021
    - 1022 bytes
    - Viewed (0)
  2. pkg/config/analysis/analyzers/authz/authorizationpolicies.go

    	match := false
    	c.ForEach(gvk.Namespace, func(r *resource.Instance) bool {
    		ns := r.Metadata.FullName.String()
    		match = namespaceMatch(ns, exp)
    		return !match
    	})
    
    	return match
    }
    
    func namespaceMatch(ns, exp string) bool {
    	if strings.EqualFold(exp, "*") {
    		return true
    	}
    	if strings.HasPrefix(exp, "*") {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 11 20:57:29 UTC 2023
    - 6K bytes
    - Viewed (0)
  3. pilot/pkg/config/kube/gateway/conversion.go

    					parentNamespace, parentHostname := spl[0], spl[1]
    					hostnameMatch := host.Name(parentHostname).Matches(host.Name(routeHostname))
    					namespaceMatch := parentNamespace == "*" || parentNamespace == namespace
    					hostMatched = hostMatched || hostnameMatch
    					if hostnameMatch && namespaceMatch {
    						matched = true
    						break out
    					}
    				}
    			}
    			if !matched {
    				if hostMatched {
    					return &ParentError{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 84.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go

    		t.Fatalf("unable to create noxu Instance:%v", err)
    	}
    	return createdInstance
    }
    
    func checkNamespacesWatchHelper(t *testing.T, ns string, namespacedwatch watch.Interface) {
    	namespacedAddEvent := 0
    	for namespacedAddEvent < 2 {
    		select {
    		case watchEvent := <-namespacedwatch.ResultChan():
    			// Check that the namespaced watch only has one result
    			if namespacedAddEvent > 0 {
    				t.Fatalf("extra watch event")
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 11:35:33 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top