Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MostSpecificHostMatch (0.26 sec)

  1. releasenotes/notes/optimize-most-specific-host-match.yaml

    apiVersion: release-notes/v2
    kind: feature
    area: traffic-management
    releaseNotes:
    - |
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Nov 01 19:19:22 UTC 2022
    - 182 bytes
    - Viewed (0)
  2. pilot/pkg/model/config_test.go

    			actual, value, found := model.MostSpecificHostMatch(tt.needle, specific, wildcard)
    			if tt.want != "" && !found {
    				t.Fatalf("model.MostSpecificHostMatch(%q, %v) = %v, %v, %t; want: %v", tt.needle, tt.in, actual, value, found, tt.want)
    			} else if actual != tt.want {
    				t.Fatalf("model.MostSpecificHostMatch(%q, %v) = %v, %v, %t; want: %v", tt.needle, tt.in, actual, value, found, tt.want)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 20 12:54:10 UTC 2023
    - 19K bytes
    - Viewed (0)
  3. pilot/pkg/model/config.go

    			out = meta.Namespace + "/" + gwname[i+1:]
    		}
    	}
    	return out
    }
    
    // MostSpecificHostMatch compares the maps of specific and wildcard hosts to the needle, and returns the longest element
    // matching the needle and it's value, or false if no element in the maps matches the needle.
    func MostSpecificHostMatch[V any](needle host.Name, specific map[host.Name]V, wildcard map[host.Name]V) (host.Name, V, bool) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 08:51:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  4. pilot/pkg/model/cluster_local.go

    	wildcard sets.Set[host.Name]
    }
    
    // IsClusterLocal indicates whether the given host should be treated as a
    // cluster-local destination.
    func (c ClusterLocalHosts) IsClusterLocal(h host.Name) bool {
    	_, _, ok := MostSpecificHostMatch(h, c.specific, c.wildcard)
    	return ok
    }
    
    // ClusterLocalProvider provides the cluster-local hosts.
    type ClusterLocalProvider interface {
    	// GetClusterLocalHosts returns the list of cluster-local hosts, sorted in
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 20 12:54:10 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  5. pilot/pkg/model/push_context.go

    	if proxyNameSpace != ps.Mesh.RootNamespace {
    		// search through the DestinationRules in proxy's namespace first
    		if ps.destinationRuleIndex.namespaceLocal[proxyNameSpace] != nil {
    			if _, drs, ok := MostSpecificHostMatch(service.Hostname,
    				ps.destinationRuleIndex.namespaceLocal[proxyNameSpace].specificDestRules,
    				ps.destinationRuleIndex.namespaceLocal[proxyNameSpace].wildcardDestRules,
    			); ok {
    				return drs
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 09:02:11 UTC 2024
    - 91.8K bytes
    - Viewed (0)
  6. pilot/pkg/model/sidecar.go

    				if !exists {
    					fqdnVirtualServiceHostIndex[host.Name(h)] = vs
    				}
    			}
    		}
    	}
    
    	mostSpecificWildcardVsIndex := make(map[host.Name]types.NamespacedName)
    	comparator := MostSpecificHostMatch[config.Config]
    	if features.PersistOldestWinsHeuristicForVirtualServiceHostMatching {
    		comparator = OldestMatchingHost
    	}
    	for _, svc := range services {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 05 20:32:23 UTC 2024
    - 38.4K bytes
    - Viewed (0)
Back to top