Documentation ¶
Index ¶
Constants ¶
View Source
const (
ValidatorName = "built-in:privileged-pods"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertResourceToObj ¶
func ConvertResourceToObj(resource unstructured.Unstructured, obj interface{}) error
ConvertResourceToObj function converts the unstructured object to the wanted object interface type
Types ¶
type PrivilegedPodsValidator ¶
type PrivilegedPodsValidator struct {
// contains filtered or unexported fields
}
func (*PrivilegedPodsValidator) GetName ¶
func (v *PrivilegedPodsValidator) GetName() string
func (*PrivilegedPodsValidator) SetPreApprovedPods ¶
func (v *PrivilegedPodsValidator) SetPreApprovedPods(pods []unstructured.Unstructured)
func (*PrivilegedPodsValidator) Validate ¶
func (v *PrivilegedPodsValidator) Validate(resources []unstructured.Unstructured) ([]common.Violation, error)
*
the return violations array is non-nil if invalid resources were found the return error is non-nil if another type of error was encountered
Click to show internal directories.
Click to hide internal directories.