- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 28 for IsResourceRequest (0.27 sec)
-
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) -
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) -
pkg/auth/authorizer/abac/abac.go
if !p.Spec.Readonly { return true } return false } func nonResourceMatches(p abac.Policy, a authorizer.Attributes) bool { // A non-resource policy cannot match a resource request if !a.IsResourceRequest() { // Allow wildcard match if p.Spec.NonResourcePath == "*" { return true } // Allow exact match if p.Spec.NonResourcePath == a.GetPath() { return true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 11 03:11:30 UTC 2021 - 7.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go
if !found { return nil, errors.New("no RequestInfo found in the context") } // Start with common attributes that apply to resource and non-resource requests attribs.ResourceRequest = requestInfo.IsResourceRequest attribs.Path = requestInfo.Path attribs.Verb = requestInfo.Verb attribs.APIGroup = requestInfo.APIGroup attribs.APIVersion = requestInfo.APIVersion attribs.Resource = requestInfo.Resource
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 20 13:35:55 UTC 2023 - 3.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 27 07:29:19 UTC 2023 - 35K bytes - Viewed (0) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/storageversion.go
if !found { responsewriters.InternalError(w, req, errors.New("no RequestInfo found in the context")) return } // Allow non-resource requests if !requestInfo.IsResourceRequest { handler.ServeHTTP(w, req) return } // Allow read requests if requestInfo.Verb == "get" || requestInfo.Verb == "list" || requestInfo.Verb == "watch" { handler.ServeHTTP(w, req) return }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 03 06:51:04 UTC 2023 - 5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/proxy/proxy.go
// trim leading and trailing slashes. Then "/apis/group/version" requests are for discovery, so if we have exactly three // segments that we are going to proxy, we have a discovery request. if !requestInfo.IsResourceRequest && len(strings.Split(strings.Trim(requestInfo.Path, "/"), "/")) == 3 { // discovery requests are used by kubectl and others to determine which resources a server has. This is a cheap call that
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 19 00:36:22 UTC 2023 - 5.6K bytes - Viewed (0) -
cluster/gce/gci/audit_policy_test.go
} t.expectLevel(level, attrs) } } } } func (t *auditTester) expectLevel(expected audit.Level, attrs authorizer.Attributes) { obj := attrs.GetPath() if attrs.IsResourceRequest() { obj = attrs.GetResource() if attrs.GetNamespace() != "" { obj = obj + ":" + attrs.GetNamespace() } } name := fmt.Sprintf("%s.%s.%s", attrs.GetUser().GetName(), attrs.GetVerb(), obj)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 30 06:23:50 UTC 2021 - 9.8K bytes - Viewed (0)