Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for GetSubresource (0.25 sec)

  1. plugin/pkg/auth/authorizer/node/node_authorizer.go

    			return r.authorizeReadNamespacedObject(nodeName, secretVertexType, attrs)
    		case configMapResource:
    			return r.authorizeReadNamespacedObject(nodeName, configMapVertexType, attrs)
    		case pvcResource:
    			if attrs.GetSubresource() == "status" {
    				return r.authorizeStatusUpdate(nodeName, pvcVertexType, attrs)
    			}
    			return r.authorizeGet(nodeName, pvcVertexType, attrs)
    		case pvResource:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 16K bytes
    - Viewed (0)
  2. plugin/pkg/admission/gc/gc_admission_test.go

    	username := a.GetUser().GetName()
    
    	if username == "non-deleter" {
    		if a.GetVerb() == "delete" {
    			return authorizer.DecisionNoOpinion, "", nil
    		}
    		if a.GetVerb() == "update" && a.GetSubresource() == "finalizers" {
    			return authorizer.DecisionNoOpinion, "", nil
    		}
    		if a.GetAPIGroup() == "*" && a.GetResource() == "*" { // this user does not have full rights
    			return authorizer.DecisionNoOpinion, "", nil
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  3. plugin/pkg/admission/serviceaccount/admission.go

    			return admission.NewForbidden(a, err)
    		}
    	}
    
    	return nil
    }
    
    func shouldIgnore(a admission.Attributes) bool {
    	if a.GetResource().GroupResource() != api.Resource("pods") || (a.GetSubresource() != "" && a.GetSubresource() != "ephemeralcontainers") {
    		return true
    	}
    	obj := a.GetObject()
    	if obj == nil {
    		return true
    	}
    	_, ok := obj.(*api.Pod)
    	if !ok {
    		return true
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 17:49:30 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. plugin/pkg/admission/noderestriction/admission.go

    	case podResource:
    		switch a.GetSubresource() {
    		case "":
    			return p.admitPod(nodeName, a)
    		case "status":
    			return p.admitPodStatus(nodeName, a)
    		case "eviction":
    			return p.admitPodEviction(nodeName, a)
    		default:
    			return admission.NewForbidden(a, fmt.Errorf("unexpected pod subresource %q, only 'status' and 'eviction' are allowed", a.GetSubresource()))
    		}
    
    	case nodeResource:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  5. pkg/controller/servicecidrs/servicecidrs_controller_test.go

    			t.Errorf("Expected action %d resource to be %s, got %s", i, resource, action.GetResource().Resource)
    		}
    		subresource := expected[i][2]
    		if action.GetSubresource() != subresource {
    			t.Errorf("Expected action %d subresource to be %s, got %s", i, subresource, action.GetSubresource())
    		}
    	}
    }
    
    func TestController_canDeleteCIDR(t *testing.T) {
    	tests := []struct {
    		name       string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 22K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go

    			Namespace:   attr.GetNamespace(),
    			Verb:        attr.GetVerb(),
    			Group:       attr.GetAPIGroup(),
    			Version:     attr.GetAPIVersion(),
    			Resource:    attr.GetResource(),
    			Subresource: attr.GetSubresource(),
    			Name:        attr.GetName(),
    		}
    	} else {
    		r.Spec.NonResourceAttributes = &authorizationv1.NonResourceAttributes{
    			Path: attr.GetPath(),
    			Verb: attr.GetVerb(),
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  7. pkg/kubelet/server/server.go

    			msg := fmt.Sprintf("Authorization error (user=%s, verb=%s, resource=%s, subresource=%s)", attrs.GetUser().GetName(), attrs.GetVerb(), attrs.GetResource(), attrs.GetSubresource())
    			resp.WriteErrorString(http.StatusInternalServerError, msg)
    			return
    		}
    		if decision != authorizer.DecisionAllow {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  8. plugin/pkg/admission/certificates/ctbattest/admission_test.go

    	admission.Attributes // nil panic if any other methods called
    }
    
    func (t *testAttributes) GetResource() schema.GroupVersionResource {
    	return t.resource.WithVersion("ignored")
    }
    
    func (t *testAttributes) GetSubresource() string {
    	return t.subresource
    }
    
    func (t *testAttributes) GetObject() runtime.Object {
    	return t.obj
    }
    
    func (t *testAttributes) GetOldObject() runtime.Object {
    	return t.oldObj
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  9. pkg/volume/util/operationexecutor/operation_generator_test.go

    		return true, pv, nil
    	})
    	fakeKubeClient.AddReactor("patch", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) {
    		if action.GetSubresource() == "status" {
    			return true, pvc, nil
    		}
    		return true, nil, fmt.Errorf("no reaction implemented for %s", action)
    	})
    
    	fakeRecorder := &record.FakeRecorder{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go

    	if err == nil {
    		actions := ""
    		for _, action := range mockClient.Actions() {
    			actions = actions + action.GetVerb() + ":" + action.GetResource().Resource + ":" + action.GetSubresource() + ", "
    		}
    		t.Errorf("expected error returned from admission handler: %v", actions)
    	}
    
    	// verify create operations in the namespace cause an error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 14.2K bytes
    - Viewed (0)
Back to top