Documentation ¶
Index ¶
- Constants
- Variables
- func AllMatchersV1Beta1() []admissionregistrationv1beta1.MatchCondition
- func AllVariablesCEL() []cel.NamedExpressionAccessor
- func AllVariablesV1Beta1() []admissionregistrationv1beta1.Variable
- func BindObjectCEL() cel.NamedExpressionAccessor
- func BindObjectV1Beta1() admissionregistrationv1beta1.Variable
- func BindParamsCEL() cel.NamedExpressionAccessor
- func BindParamsV1Beta1() admissionregistrationv1beta1.Variable
- func ConstraintToBinding(constraint *unstructured.Unstructured, actions []string) (*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, error)
- func IsVapAPIEnabled(log *logr.Logger) (bool, *schema.GroupVersion)
- func MatchExcludedNamespacesGlobCEL() []cel.ExpressionAccessor
- func MatchExcludedNamespacesGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
- func MatchKindsCEL() []cel.ExpressionAccessor
- func MatchKindsV1Beta1() admissionregistrationv1beta1.MatchCondition
- func MatchNameGlobCEL() []cel.ExpressionAccessor
- func MatchNameGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
- func MatchNamespacesGlobCEL() []cel.ExpressionAccessor
- func MatchNamespacesGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
- func RequestToVersionedAttributes(request *admissionv1.AdmissionRequest) (*admission.VersionedAttributes, error)
- func TemplateToPolicyDefinition(template *templates.ConstraintTemplate) (*admissionregistrationv1beta1.ValidatingAdmissionPolicy, error)
- type RequestWrapper
- func (w *RequestWrapper) AddAnnotation(_, _ string) error
- func (w *RequestWrapper) AddAnnotationWithLevel(_, _ string, _ auditinternal.Level) error
- func (w *RequestWrapper) GetKind() schema.GroupVersionKind
- func (w *RequestWrapper) GetName() string
- func (w *RequestWrapper) GetNamespace() string
- func (w *RequestWrapper) GetObject() runtime.Object
- func (w *RequestWrapper) GetOldObject() runtime.Object
- func (w *RequestWrapper) GetOperation() admission.Operation
- func (w *RequestWrapper) GetOperationOptions() runtime.Object
- func (w *RequestWrapper) GetReinvocationContext() admission.ReinvocationContext
- func (w *RequestWrapper) GetResource() schema.GroupVersionResource
- func (w *RequestWrapper) GetSubresource() string
- func (w *RequestWrapper) GetUserInfo() user.Info
- func (w *RequestWrapper) IsDryRun() bool
Constants ¶
View Source
const StrictCost = true
Variables ¶
View Source
var ErrBadEnforcementAction = errors.New("invalid enforcement action")
View Source
var GroupVersion *schema.GroupVersion
View Source
var VapAPIEnabled *bool
Functions ¶
func AllMatchersV1Beta1 ¶
func AllMatchersV1Beta1() []admissionregistrationv1beta1.MatchCondition
func AllVariablesCEL ¶
func AllVariablesCEL() []cel.NamedExpressionAccessor
func AllVariablesV1Beta1 ¶
func AllVariablesV1Beta1() []admissionregistrationv1beta1.Variable
func BindObjectCEL ¶
func BindObjectCEL() cel.NamedExpressionAccessor
func BindObjectV1Beta1 ¶
func BindObjectV1Beta1() admissionregistrationv1beta1.Variable
func BindParamsCEL ¶
func BindParamsCEL() cel.NamedExpressionAccessor
func BindParamsV1Beta1 ¶
func BindParamsV1Beta1() admissionregistrationv1beta1.Variable
func ConstraintToBinding ¶
func ConstraintToBinding(constraint *unstructured.Unstructured, actions []string) (*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, error)
ConstraintToBinding converts a Constraint to a ValidatingAdmissionPolicyBinding. Accepts a list of enforcement actions to apply to the binding. If the enforcement action is not recognized, returns an error.
func IsVapAPIEnabled ¶
func IsVapAPIEnabled(log *logr.Logger) (bool, *schema.GroupVersion)
func MatchExcludedNamespacesGlobCEL ¶
func MatchExcludedNamespacesGlobCEL() []cel.ExpressionAccessor
func MatchExcludedNamespacesGlobV1Beta1 ¶
func MatchExcludedNamespacesGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
func MatchKindsCEL ¶
func MatchKindsCEL() []cel.ExpressionAccessor
func MatchKindsV1Beta1 ¶
func MatchKindsV1Beta1() admissionregistrationv1beta1.MatchCondition
func MatchNameGlobCEL ¶
func MatchNameGlobCEL() []cel.ExpressionAccessor
func MatchNameGlobV1Beta1 ¶
func MatchNameGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
func MatchNamespacesGlobCEL ¶
func MatchNamespacesGlobCEL() []cel.ExpressionAccessor
func MatchNamespacesGlobV1Beta1 ¶
func MatchNamespacesGlobV1Beta1() admissionregistrationv1beta1.MatchCondition
func RequestToVersionedAttributes ¶
func RequestToVersionedAttributes(request *admissionv1.AdmissionRequest) (*admission.VersionedAttributes, error)
func TemplateToPolicyDefinition ¶
func TemplateToPolicyDefinition(template *templates.ConstraintTemplate) (*admissionregistrationv1beta1.ValidatingAdmissionPolicy, error)
Types ¶
type RequestWrapper ¶
type RequestWrapper struct {
// contains filtered or unexported fields
}
FRICTION this wrapper class is excessive. Validator code should define an interface that only requires the methods it needs.
func NewWrapper ¶
func NewWrapper(req *admissionv1.AdmissionRequest) (*RequestWrapper, error)
func (*RequestWrapper) AddAnnotation ¶
func (w *RequestWrapper) AddAnnotation(_, _ string) error
func (*RequestWrapper) AddAnnotationWithLevel ¶
func (w *RequestWrapper) AddAnnotationWithLevel(_, _ string, _ auditinternal.Level) error
func (*RequestWrapper) GetKind ¶
func (w *RequestWrapper) GetKind() schema.GroupVersionKind
func (*RequestWrapper) GetName ¶
func (w *RequestWrapper) GetName() string
func (*RequestWrapper) GetNamespace ¶
func (w *RequestWrapper) GetNamespace() string
func (*RequestWrapper) GetObject ¶
func (w *RequestWrapper) GetObject() runtime.Object
func (*RequestWrapper) GetOldObject ¶
func (w *RequestWrapper) GetOldObject() runtime.Object
func (*RequestWrapper) GetOperation ¶
func (w *RequestWrapper) GetOperation() admission.Operation
func (*RequestWrapper) GetOperationOptions ¶
func (w *RequestWrapper) GetOperationOptions() runtime.Object
func (*RequestWrapper) GetReinvocationContext ¶
func (w *RequestWrapper) GetReinvocationContext() admission.ReinvocationContext
func (*RequestWrapper) GetResource ¶
func (w *RequestWrapper) GetResource() schema.GroupVersionResource
func (*RequestWrapper) GetSubresource ¶
func (w *RequestWrapper) GetSubresource() string
func (*RequestWrapper) GetUserInfo ¶
func (w *RequestWrapper) GetUserInfo() user.Info
func (*RequestWrapper) IsDryRun ¶
func (w *RequestWrapper) IsDryRun() bool
Click to show internal directories.
Click to hide internal directories.