Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FxIn ¶
type FxIn struct { fx.In Webhooks *webhooks.K8sRegistry Validators []PolicySpecValidator `group:"policy-validators"` }
FxIn is a struct that contains all dependencies for Policy Custom Resource validator.
type PolicySpecValidator ¶
type PolicySpecValidator interface { ValidateSpec( ctx context.Context, name string, yamlSrc []byte, ) (bool, string, error) }
PolicySpecValidator is an interface for Policy Custom Resource validation.
type PolicyValidator ¶
type PolicyValidator struct {
// contains filtered or unexported fields
}
PolicyValidator validates the Policy Custom Resource.
func NewPolicyValidator ¶
func NewPolicyValidator(validators []PolicySpecValidator) *PolicyValidator
NewPolicyValidator creates a new instance of PolicyValidator.
func (*PolicyValidator) ValidateObject ¶
func (v *PolicyValidator) ValidateObject( ctx context.Context, req *admissionv1.AdmissionRequest, ) (ok bool, msg string, err error)
ValidateObject checks the validity of a object as a k8s object.
Click to show internal directories.
Click to hide internal directories.