Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for EquivalentResourcesFor (0.27 sec)

  1. staging/src/k8s.io/apiserver/pkg/storageversion/manager.go

    		s.managedResourceInfos[r] = struct{}{}
    		s.addPendingManagedStatusLocked(r)
    	}
    }
    
    func (s *defaultManager) addPendingManagedStatusLocked(r *ResourceInfo) {
    	gvrs := r.EquivalentResourceMapper.EquivalentResourcesFor(r.GroupResource.WithVersion(""), "")
    	for _, gvr := range gvrs {
    		gr := gvr.GroupResource()
    		if _, ok := s.managedStatus[gr]; !ok {
    			s.managedStatus[gr] = &updateStatus{}
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 17:47:19 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go

    			}
    
    			// Verify equivalents to primary resource
    			if resources := mapper.EquivalentResourcesFor(gvr("apps", "v1", "deployments"), ""); !reflect.DeepEqual(resources, tc.ResourcesForV1Deployment) {
    				t.Errorf("diff:\n%s", cmp.Diff(tc.ResourcesForV1Deployment, resources))
    			}
    			// Verify equivalents to subresources
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/mapper.go

    func NewEquivalentResourceRegistryWithIdentity(keyFunc func(schema.GroupResource) string) EquivalentResourceRegistry {
    	return &equivalentResourceRegistry{keyFunc: keyFunc}
    }
    
    func (r *equivalentResourceRegistry) EquivalentResourcesFor(resource schema.GroupVersionResource, subresource string) []schema.GroupVersionResource {
    	r.mutex.RLock()
    	defer r.mutex.RUnlock()
    	return r.resources[r.keys[resource.GroupResource()]][subresource]
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 18:26:06 UTC 2019
    - 3.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/matching/matching.go

    		return false, schema.GroupVersionResource{}, schema.GroupVersionKind{}, nil
    	}
    
    	attrWithOverride := &attrWithResourceOverride{Attributes: attr}
    	equivalents := o.GetEquivalentResourceMapper().EquivalentResourcesFor(attr.GetResource(), attr.GetSubresource())
    	for _, namedRule := range namedRules {
    		for _, equivalent := range equivalents {
    			if equivalent == attr.GetResource() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go

    		}
    	}
    	if invocation == nil && h.GetMatchPolicy() != nil && *h.GetMatchPolicy() == v1.Equivalent {
    		attrWithOverride := &attrWithResourceOverride{Attributes: attr}
    		equivalents := o.GetEquivalentResourceMapper().EquivalentResourcesFor(attr.GetResource(), attr.GetSubresource())
    		// honor earlier rules first
    	OuterLoop:
    		for _, r := range h.GetRules() {
    			// see if the rule matches any of the equivalent resources
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go

    type EquivalentResourceMapper interface {
    	// EquivalentResourcesFor returns a list of resources that address the same underlying data as resource.
    	// If subresource is specified, only equivalent resources which also have the same subresource are included.
    	// The specified resource can be included in the returned list.
    	EquivalentResourcesFor(resource schema.GroupVersionResource, subresource string) []schema.GroupVersionResource
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 19K bytes
    - Viewed (0)
Back to top