Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 48 for GetSubresource (0.19 sec)

  1. pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go

    	actions := mockClient.Actions()
    	if len(actions) != 1 {
    		t.Errorf("Expected 1 mock client action, but got %v", len(actions))
    	}
    	if !actions[0].Matches("create", "namespaces") || actions[0].GetSubresource() != "finalize" {
    		t.Errorf("Expected finalize-namespace action %v", actions[0])
    	}
    	finalizers := actions[0].(core.CreateAction).GetObject().(*v1.Namespace).Spec.Finalizers
    	if len(finalizers) != 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/audit/policy/checker.go

    			return false
    		}
    	}
    	if len(r.Resources) == 0 {
    		return true
    	}
    
    	apiGroup := attrs.GetAPIGroup()
    	resource := attrs.GetResource()
    	subresource := attrs.GetSubresource()
    	combinedResource := resource
    	// If subresource, the resource in the policy must match "(resource)/(subresource)"
    	if subresource != "" {
    		combinedResource = resource + "/" + subresource
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 02 22:24:14 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. pkg/controller/volume/expand/expand_controller_test.go

    				return true, test.pv, nil
    			})
    		}
    		fakeKubeClient.AddReactor("patch", "persistentvolumeclaims", func(action coretesting.Action) (bool, runtime.Object, error) {
    			if action.GetSubresource() == "status" {
    				patchActionaction, _ := action.(coretesting.PatchAction)
    				pvc, err = applyPVCPatch(pvc, patchActionaction.GetPatch())
    				if err != nil {
    					return false, nil, err
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. 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)
  8. plugin/pkg/admission/podnodeselector/admission.go

    	return p.getNodeSelectorMap(namespace)
    }
    
    func shouldIgnore(a admission.Attributes) bool {
    	resource := a.GetResource().GroupResource()
    	if resource != api.Resource("pods") {
    		return true
    	}
    	if a.GetSubresource() != "" {
    		// only run the checks below on pods proper and not subresources
    		return true
    	}
    
    	_, ok := a.GetObject().(*api.Pod)
    	if !ok {
    		klog.Errorf("expected pod but got %s", a.GetKind().Kind)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  9. plugin/pkg/admission/runtimeclass/admission.go

    		}
    	}
    
    	return nil
    }
    
    func shouldIgnore(attributes admission.Attributes) bool {
    	// Ignore all calls to subresources or resources other than pods.
    	if len(attributes.GetSubresource()) != 0 || attributes.GetResource().GroupResource() != api.Resource("pods") {
    		return true
    	}
    
    	return false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 05:53:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. plugin/pkg/admission/resourcequota/admission_test.go

    	)
    	actionSet := sets.NewString()
    	for _, action := range kubeClient.Actions() {
    		actionSet.Insert(strings.Join([]string{action.GetVerb(), action.GetResource().Resource, action.GetSubresource()}, "-"))
    	}
    	if !actionSet.HasAll(expectedActionSet.List()...) {
    		t.Errorf("Expected actions:\n%v\n but got:\n%v\nDifference:\n%v", expectedActionSet, actionSet, expectedActionSet.Difference(actionSet))
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 84.1K bytes
    - Viewed (0)
Back to top