Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for IsResourceRequest (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics_test.go

    				Name:              "my-resource",
    				Namespace:         "my-namespace",
    				IsResourceRequest: false,
    			},
    			expectedScope: "resource",
    		},
    		{
    			name: "POST resource scope",
    			requestInfo: &request.RequestInfo{
    				Verb:              "create",
    				Namespace:         "my-namespace",
    				IsResourceRequest: false,
    			},
    			expectedScope: "resource",
    		},
    		{
    			name: "namespace scope",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 07:29:19 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go

    			labelSelector: "",
    			fieldSelector: "",
    			indexLabels:   []string{},
    			indexFields:   []string{"metadata.namespace"},
    			ctx: request.WithRequestInfo(context.Background(), &request.RequestInfo{
    				IsResourceRequest: true,
    				Path:              "/api/v1/namespaces/default/pods",
    				Verb:              "list",
    				APIPrefix:         "api",
    				APIGroup:          "",
    				APIVersion:        "v1",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 30 10:39:09 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/gen_test.go

    	matchesAllNonResourceRequests bool
    	// maps `matches bool` to `isResourceRequest bool` to digests
    	digests map[bool]map[bool][]RequestDigest
    }
    
    func (ftr *fsTestingRecord) addDigest(digest RequestDigest, matches bool) {
    	ftr.digests[matches][digest.RequestInfo.IsResourceRequest] = append(ftr.digests[matches][digest.RequestInfo.IsResourceRequest], digest)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 24.8K bytes
    - Viewed (0)
  4. plugin/pkg/admission/certificates/ctbattest/admission_test.go

    	}
    	if a.GetName() != f.allowedName {
    		return authorizer.DecisionDeny, fmt.Sprintf("unrecognised resource name '%s'", a.GetName()), nil
    	}
    	if !a.IsResourceRequest() {
    		return authorizer.DecisionDeny, fmt.Sprintf("unrecognised IsResourceRequest '%t'", a.IsResourceRequest()), nil
    	}
    	return f.decision, "", nil
    }
    
    type testAttributes struct {
    	resource    schema.GroupResource
    	subresource string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/caching_authorizer.go

    	GetUser() user.Info
    	GetVerb() string
    	IsReadOnly() bool
    	GetNamespace() string
    	GetResource() string
    	GetSubresource() string
    	GetName() string
    	GetAPIGroup() string
    	GetAPIVersion() string
    	IsResourceRequest() bool
    	GetPath() string
    })(nil)
    
    // The user info accessors known to cache key construction. If this fails to compile, the cache
    // implementation may need to be updated.
    var _ user.Info = (interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/match_test.go

    		})
    	}
    }
    
    func TestLiterals(t *testing.T) {
    	ui := &user.DefaultInfo{Name: "goodu", UID: "1",
    		Groups: []string{"goodg1", "goodg2"}}
    	reqRN := RequestDigest{
    		RequestInfo: &request.RequestInfo{
    			IsResourceRequest: true,
    			Path:              "/apis/goodapig/v1/namespaces/goodns/goodrscs",
    			Verb:              "goodverb",
    			APIPrefix:         "apis",
    			APIGroup:          "goodapig",
    			APIVersion:        "v1",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:35 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/filters/traces.go

    		otelhttp.WithTracerProvider(tp),
    		otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string {
    			ctx := r.Context()
    			info, exist := request.RequestInfoFrom(ctx)
    			if !exist || !info.IsResourceRequest {
    				return r.Method
    			}
    			return getSpanNameFromRequestInfo(info, r)
    		}),
    	}
    	wrappedHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 15 01:42:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go

    	// However, we need to tweak it e.g. to differentiate GET from LIST.
    	reportedVerb := cleanVerb(CanonicalVerb(strings.ToUpper(req.Method), scope), "", req, requestInfo)
    
    	if requestInfo.IsResourceRequest {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 07:29:19 UTC 2023
    - 35K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter_test.go

    	})
    	if err != nil {
    		t.Errorf("expected the controller to reconcile the priority level configuration object: %s, error: %s", plcObj.Name, err)
    	}
    
    	reqInfo := &request.RequestInfo{
    		IsResourceRequest: false,
    		Path:              "/foobar",
    		Verb:              "GET",
    	}
    	noteFn := func(fs *flowcontrol.FlowSchema, plc *flowcontrol.PriorityLevelConfiguration, fd string) {}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/rule.go

    }
    
    func matchesPolicyRule(digest RequestDigest, policyRule *flowcontrol.PolicyRulesWithSubjects) bool {
    	if !matchesASubject(digest.User, policyRule.Subjects) {
    		return false
    	}
    	if digest.RequestInfo.IsResourceRequest {
    		return matchesAResourceRule(digest.RequestInfo, policyRule.ResourceRules)
    	}
    	return matchesANonResourceRule(digest.RequestInfo, policyRule.NonResourceRules)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:35 UTC 2023
    - 6.3K bytes
    - Viewed (0)
Back to top