Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 151 for admitPV (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/testing/helpers.go

    	admission admission.MutationInterface
    }
    
    // Admit reinvokes the admission handler and reports a test error if the admission handler performs
    // non-idempotent mutatations to the admission object.
    func (r *reinvoker) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	r.t.Helper()
    	outputs := []runtime.Object{}
    	for i := 0; i < 2; i++ {
    		err := r.admission.Admit(ctx, a, o)
    		if err != nil {
    			return err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/metrics/metrics.go

    	extraLabels []string
    }
    
    // Admit performs a mutating admission control check and emit metrics.
    func (p pluginHandlerWithMetrics) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	mutatingHandler, ok := p.Interface.(admission.MutationInterface)
    	if !ok {
    		return nil
    	}
    
    	start := time.Now()
    	err := mutatingHandler.Admit(ctx, a, o)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 17:01:40 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/admission_test.go

    	}
    }
    
    type mockAdmissionController struct {
    	admit func(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
    }
    
    func (c *mockAdmissionController) Handles(operation admission.Operation) bool {
    	return true
    }
    
    func (c *mockAdmissionController) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	return c.admit(ctx, a, o)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 12 21:32:54 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go

    			scope.err(err, w, req)
    			return
    		}
    		span.AddEvent("Conversion done")
    
    		audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer)
    		admit = admission.WithAudit(admit)
    
    		// if this object supports namespace info
    		if objectMeta, err := meta.Accessor(obj); err == nil {
    			// ensure namespace on the object is correct, or error if a conflicting namespace was set in the object
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. plugin/pkg/admission/admit/admission_test.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package admit
    
    import (
    	"context"
    	"testing"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apiserver/pkg/admission"
    	admissiontesting "k8s.io/apiserver/pkg/admission/testing"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 20 15:11:00 UTC 2019
    - 1.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go

    		// timeout inside the parent context is lower than requestTimeoutUpperBound.
    		ctx, cancel := context.WithTimeout(ctx, requestTimeoutUpperBound)
    		defer cancel()
    
    		ctx = request.WithNamespace(ctx, namespace)
    		admit = admission.WithAudit(admit)
    
    		outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope)
    		if err != nil {
    			scope.err(err, w, req)
    			return
    		}
    
    		options := &metav1.DeleteOptions{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 01 10:00:32 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/topologymanager/fake_topology_manager_test.go

    		podAttr := lifecycle.PodAdmitAttributes{}
    		pod := v1.Pod{}
    		pod.Status.QOSClass = tc.qosClass
    		podAttr.Pod = &pod
    		actual := fm.Admit(&podAttr)
    		if reflect.DeepEqual(actual, tc.result) {
    			t.Errorf("Error occurred, expected Admit in result to be %v got %v", tc.result, actual.Admit)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 10 11:44:15 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go

    			}
    
    			b.ResetTimer()
    			b.RunParallel(func(pb *testing.PB) {
    				for pb.Next() {
    					wh.Admit(context.TODO(), attr, objectInterfaces)
    				}
    			})
    		})
    	}
    }
    
    // TestAdmit tests that MutatingWebhook#Admit works as expected
    func TestAdmit(t *testing.T) {
    	testServer := webhooktesting.NewTestServer(t)
    	testServer.StartTLS()
    	defer testServer.Close()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/chain.go

    func NewChainHandler(handlers ...Interface) chainAdmissionHandler {
    	return chainAdmissionHandler(handlers)
    }
    
    // Admit performs an admission control check using a chain of handlers, and returns immediately on first error
    func (admissionHandler chainAdmissionHandler) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error {
    	for _, handler := range admissionHandler {
    		if !handler.Handles(a.GetOperation()) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 20 15:11:00 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go

    			obj = scope.FieldManager.UpdateNoErrors(liveObj, obj, managerOrUserAgent(options.FieldManager, req.UserAgent()))
    			admit = fieldmanager.NewManagedFieldsValidatingAdmissionController(admit)
    
    			if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) {
    				if err := mutatingAdmission.Admit(ctx, admissionAttributes, scope); err != nil {
    					return nil, err
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 10.1K bytes
    - Viewed (0)
Back to top