Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getPodLocality (0.43 sec)

  1. pilot/pkg/serviceregistry/kube/controller/endpoint_builder.go

    }
    
    func (c *Controller) NewEndpointBuilder(pod *v1.Pod) *EndpointBuilder {
    	var locality, sa, namespace, hostname, subdomain, ip, node string
    	var podLabels labels.Instance
    	if pod != nil {
    		locality = c.getPodLocality(pod)
    		sa = kube.SecureNamingSAN(pod, c.meshWatcher.Mesh())
    		podLabels = pod.Labels
    		namespace = pod.Namespace
    		subdomain = pod.Spec.Subdomain
    		if subdomain != "" {
    			hostname = pod.Spec.Hostname
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go

    			Services:              constructServices(p, services),
    			AuthorizationPolicies: policies,
    			Status:                status,
    			TrustDomain:           pickTrustDomain(meshCfg),
    			Locality:              getPodLocality(ctx, Nodes, p),
    		}
    
    		w.WorkloadName, w.WorkloadType = workloadNameAndType(p)
    		w.CanonicalName, w.CanonicalRevision = kubelabels.CanonicalService(p.Labels, w.WorkloadName)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/controller.go

    func (c *Controller) GetService(hostname host.Name) *model.Service {
    	c.RLock()
    	svc := c.servicesMap[hostname]
    	c.RUnlock()
    	return svc
    }
    
    // getPodLocality retrieves the locality for a pod.
    func (c *Controller) getPodLocality(pod *v1.Pod) string {
    	// if pod has `istio-locality` label, skip below ops
    	if len(pod.Labels[model.LocalityLabel]) > 0 {
    		return model.GetLocalityLabel(pod.Labels[model.LocalityLabel])
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  4. pilot/pkg/serviceregistry/kube/controller/controller_test.go

    			addNodes(t, controller, tc.nodes...)
    			addPods(t, controller, fx, tc.pods...)
    
    			// Verify expected existing pod AZs
    			for pod, wantAZ := range tc.wantAZ {
    				az := controller.getPodLocality(pod)
    				if wantAZ != "" {
    					if !reflect.DeepEqual(az, wantAZ) {
    						t.Fatalf("Wanted az: %s, got: %s", wantAZ, az)
    					}
    				} else {
    					if az != "" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 85K bytes
    - Viewed (0)
Back to top