Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for krt (0.02 sec)

  1. pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go

    	Waypoints krt.Collection[Waypoint],
    	WorkloadServices krt.Collection[model.ServiceInfo],
    	WorkloadEntries krt.Collection[*networkingclient.WorkloadEntry],
    	ServiceEntries krt.Collection[*networkingclient.ServiceEntry],
    	AllPolicies krt.Collection[model.WorkloadAuthorization],
    	Namespaces krt.Collection[*v1.Namespace],
    ) krt.Collection[model.WorkloadInfo] {
    	WorkloadServicesNamespaceIndex := krt.NewNamespaceIndex(WorkloadServices)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/kube/controller/ambient/policies.go

    	"istio.io/istio/pkg/kube/krt"
    	"istio.io/istio/pkg/slices"
    	"istio.io/istio/pkg/spiffe"
    	"istio.io/istio/pkg/workloadapi/security"
    )
    
    func PolicyCollections(
    	AuthzPolicies krt.Collection[*securityclient.AuthorizationPolicy],
    	PeerAuths krt.Collection[*securityclient.PeerAuthentication],
    	MeshConfig krt.Singleton[MeshConfig],
    	Waypoints krt.Collection[Waypoint],
    	Pods krt.Collection[*v1.Pod],
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. pkg/kube/krt/bench_test.go

    	return s.Spec.Selector
    }
    
    var _ krt.LabelSelectorer = ServiceWrapper{}
    
    func NewModern(c kube.Client, events chan string, _ <-chan struct{}) {
    	Pods := krt.NewInformer[*v1.Pod](c)
    	Services := krt.NewInformer[*v1.Service](c, krt.WithObjectAugmentation(func(o any) any {
    		return ServiceWrapper{o.(*v1.Service)}
    	}))
    	ServicesByNamespace := krt.NewNamespaceIndex(Services)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 09 19:55:53 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. pkg/kube/krt/collection_test.go

    }
    
    func SimpleEndpointsCollection(pods krt.Collection[SimplePod], services krt.Collection[SimpleService]) krt.Collection[SimpleEndpoint] {
    	return krt.NewManyCollection[SimpleService, SimpleEndpoint](services, func(ctx krt.HandlerContext, svc SimpleService) []SimpleEndpoint {
    		pods := krt.Fetch(ctx, pods, krt.FilterLabel(svc.Selector))
    		return slices.Map(pods, func(pod SimplePod) SimpleEndpoint {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex.go

    type workloadsCollection struct {
    	krt.Collection[model.WorkloadInfo]
    	ByAddress        *krt.Index[model.WorkloadInfo, networkAddress]
    	ByServiceKey     *krt.Index[model.WorkloadInfo, string]
    	ByOwningWaypoint *krt.Index[model.WorkloadInfo, networkAddress]
    }
    
    type waypointsCollection struct {
    	krt.Collection[Waypoint]
    }
    
    type servicesCollection struct {
    	krt.Collection[model.ServiceInfo]
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 19 17:19:41 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. pkg/kube/krt/README.md

    Example computing a list of service endpoints, similar to the Kubernetes core endpoints controller:
    
    ```go
    Endpoints := krt.NewManyCollection[Endpoint](func(ctx krt.HandlerContext, svc *v1.Service) (res []Endpoint) {
        for _, c := range krt.Fetch(ctx, Pods, krt.FilterLabel(svc.Spec.Selector)) {
          res = append(res, Endpoint{Service: svc.Name, Pod: pod.Name, IP: pod.status.PodIP})
        }
        return res
    }) // Results in a Collection[Endpoint]
    ```
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 18 17:21:50 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/kube/controller/ambient/waypoints.go

    	return w.GetNamespace() + "/" + w.GetName()
    }
    
    func WaypointsCollection(
    	Gateways krt.Collection[*v1beta1.Gateway],
    	GatewayClasses krt.Collection[*v1beta1.GatewayClass],
    	Pods krt.Collection[*v1.Pod],
    ) krt.Collection[Waypoint] {
    	podsByNamespace := krt.NewNamespaceIndex(Pods)
    	return krt.NewCollection(Gateways, func(ctx krt.HandlerContext, gateway *v1beta1.Gateway) *Waypoint {
    		if len(gateway.Status.Addresses) == 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 18:02:28 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  8. pkg/kube/krt/index_test.go

    	pc := clienttest.Wrap(t, kpc)
    	pods := krt.WrapClient[*corev1.Pod](kpc)
    	stop := test.NewStop(t)
    	c.RunAndWait(stop)
    	SimplePods := SimplePodCollection(pods)
    	tt := assert.NewTracker[string](t)
    	IPIndex := krt.NewIndex[SimplePod, string](SimplePods, func(o SimplePod) []string {
    		return []string{o.IP}
    	})
    	Collection := krt.NewSingleton[string](func(ctx krt.HandlerContext) *string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 09 19:55:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  9. pilot/pkg/controllers/untaint/nodeuntainter.go

    		log.Debugf("pod %s on node %s ready!", p.Name, p.Spec.NodeName)
    		return p
    	}, krt.WithStop(stop))
    
    	// these are all the nodes that have a ready cni pod. if the cni pod is ready,
    	// it means we are ok scheduling pods to it.
    	readyCniNodes := krt.NewCollection(readyCniPods, func(ctx krt.HandlerContext, p v1.Pod) *v1.Node {
    		pnode := krt.FetchOne(ctx, nodes, krt.FilterKey(p.Spec.NodeName))
    		if pnode == nil {
    			return nil
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 00:50:31 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  10. pkg/kube/krt/singleton_test.go

    func TrackerHandler[T any](tracker *assert.Tracker[string]) func(krt.Event[T]) {
    	return func(o krt.Event[T]) {
    		tracker.Record(fmt.Sprintf("%v/%v", o.Event, krt.GetKey(o.Latest())))
    	}
    }
    
    func BatchedTrackerHandler[T any](tracker *assert.Tracker[string]) func([]krt.Event[T], bool) {
    	return func(o []krt.Event[T], initialSync bool) {
    		tracker.Record(slices.Join(",", slices.Map(o, func(o krt.Event[T]) string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 08:27:29 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top