Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for MatchCondition (0.72 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go

    	m.compileMatcher.Do(func() {
    		expressions := make([]cel.ExpressionAccessor, len(m.MutatingWebhook.MatchConditions))
    		for i, matchCondition := range m.MutatingWebhook.MatchConditions {
    			expressions[i] = &matchconditions.MatchCondition{
    				Name:       matchCondition.Name,
    				Expression: matchCondition.Expression,
    			}
    		}
    		strictCost := false
    		if utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForWebhooks) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  2. pkg/apis/admissionregistration/validation/validation_test.go

    				}
    			}
    		})
    	}
    }
    
    func get65MatchConditions() []admissionregistration.MatchCondition {
    	result := []admissionregistration.MatchCondition{}
    	for i := 0; i < 65; i++ {
    		result = append(result, admissionregistration.MatchCondition{
    			Name:       fmt.Sprintf("test%v", i),
    			Expression: "true",
    		})
    	}
    	return result
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 147.1K bytes
    - Viewed (0)
  3. pkg/apis/admissionregistration/validation/validation.go

    			if conditionNames.Has(matchCondition.Name) {
    				allErrors = append(allErrors, field.Duplicate(fldPath.Index(i).Child("name"), matchCondition.Name))
    			} else {
    				conditionNames.Insert(matchCondition.Name)
    			}
    		}
    	}
    	return allErrors
    }
    
    func validateMatchCondition(v *admissionregistration.MatchCondition, opts validationOptions, fldPath *field.Path) field.ErrorList {
    	var allErrors field.ErrorList
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 56.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/api/admissionregistration/v1/generated.proto

      // against, followed by the type check error from the compiler.
      optional string warning = 3;
    }
    
    // MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
    message MatchCondition {
      // Name is an identifier for this match condition, used for strategic merging of MatchConditions,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/api/admissionregistration/v1/types.go

    	// manner as validation expressions.
    	//
    	// The exact matching logic is (in order):
    	//   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
    	//   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
    	//   3. If any matchCondition evaluates to an error (but none are FALSE):
    	//      - If failurePolicy=Fail, reject the request
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 61.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go

    	if len(matchConditions) > 0 {
    		matchExpressionAccessors := make([]cel.ExpressionAccessor, len(matchConditions))
    		for i := range matchConditions {
    			matchExpressionAccessors[i] = (*matchconditions.MatchCondition)(&matchConditions[i])
    		}
    		matcher = matchconditions.NewMatcher(filterCompiler.Compile(matchExpressionAccessors, optionalVars, environment.StoredExpressions), failurePolicy, "policy", "validate", policy.Name)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go

    				},
    				{
    					Expression: "request.resourceAttributes.namespace == 'kittensandponies'",
    				},
    			},
    		},
    		{
    			name:               "at least one matchCondition successfully evaluates to FALSE, error ignored",
    			attr:               alice2Attr,
    			expectedCompileErr: "",
    			expectedEvalErr:    "",
    			expectedDecision:   authorizer.DecisionNoOpinion,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  8. pkg/generated/openapi/zz_generated.openapi.go

    objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n  1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n  2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n  3. If any matchCondition evaluates to an error (but none are FALSE):\n     - If failurePolicy=Fail, reject the request\n     - If failurePolicy=Ignore, the error is ignored and the webhook is skipped",...
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 18:37:07 UTC 2024
    - 3M bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_test.go

    			if len(tt.expectedErr) == 0 && len(tt.matchConditions) > 0 && len(errList) == 0 && celMatcher == nil {
    				t.Errorf("celMatcher should not be nil when there are matchCondition and no error returned")
    			}
    			got := errList.ToAggregate()
    			if d := cmp.Diff(tt.expectedErr, errString(got)); d != "" {
    				t.Fatalf("ValidateAndCompileMatchConditions validation mismatch (-want +got):\n%s", d)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 87.2K bytes
    - Viewed (0)
  10. api/openapi-spec/swagger.json

              "type": "string"
            }
          },
          "required": [
            "fieldRef",
            "warning"
          ],
          "type": "object"
        },
        "io.k8s.api.admissionregistration.v1.MatchCondition": {
          "description": "MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.",
          "properties": {
            "expression": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 18:37:07 UTC 2024
    - 3.1M bytes
    - Viewed (0)
Back to top