Documentation ¶
Index ¶
Constants ¶
View Source
const ( ObjectVarName = "object" ParamsVarName = "params" PodMetaVarName = "podMeta" PodSpecVarName = "podSpec" AllContainersVarName = "allContainers" APIVersionsVarName = "apiVersions" KubeVersionVarName = "kubeVersion" )
Variables ¶
This section is empty.
Functions ¶
func ExtractPodSpec ¶
func ExtractPodSpec(u unstructured.Unstructured) (*metav1.ObjectMeta, *corev1.PodSpec, error)
ExtractPodSpec returns the metadata and Pod spec from the given object
func HasPodSpec ¶
func HasPodSpec(u unstructured.Unstructured) bool
HasPodSpec returns true if the given object has a Pod spec
func MatchesPodSpec ¶
func MatchesPodSpec(rules []types.ResourceRule) bool
MatchesPodSpec returns true if any rule matches a Pod spec
Types ¶
type CELValidator ¶
type CELValidator struct {
// contains filtered or unexported fields
}
CELValidator is a Validator that performs CEL expressions
func (*CELValidator) SetAPIVersions ¶
func (r *CELValidator) SetAPIVersions(apiVersions []string)
func (*CELValidator) SetKubeVersion ¶
func (r *CELValidator) SetKubeVersion(v *version.Info)
func (*CELValidator) Validate ¶
func (r *CELValidator) Validate(obj unstructured.Unstructured, params any) (bool, string, error)
Click to show internal directories.
Click to hide internal directories.