Documentation ¶
Index ¶
- func GetGitBranchOrPolicyPaths(gitBranch, repoURL string, policyPaths ...string) (string, string)
- func GetKindsFromPolicy(out io.Writer, policy kyvernov1.PolicyInterface, ...) sets.Set[string]
- func GetKindsFromRule(rule kyvernov1.Rule, client dclient.Interface) (map[schema.GroupVersionKind]bool, ...)
- func GetPatchedAndGeneratedResource(resourceBytes []byte) (unstructured.Unstructured, error)
- func GetResourceAccordingToResourcePath(out io.Writer, fs billy.Filesystem, resourcePaths []string, cluster bool, ...) (resources []*unstructured.Unstructured, err error)
- func GetResources(out io.Writer, policies []kyvernov1.PolicyInterface, ...) ([]*unstructured.Unstructured, error)
- func GetResourcesWithTest(out io.Writer, fs billy.Filesystem, policies []kyvernov1.PolicyInterface, ...) ([]*unstructured.Unstructured, error)
- type KyvernoResources
- type ValidatingAdmissionResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitBranchOrPolicyPaths ¶ added in v1.9.0
func GetKindsFromPolicy ¶
func GetKindsFromRule ¶
func GetKindsFromRule(rule kyvernov1.Rule, client dclient.Interface) (map[schema.GroupVersionKind]bool, map[schema.GroupVersionKind]v1alpha1.Subresource)
GetKindsFromRule will return the kinds from policy match block
func GetPatchedAndGeneratedResource ¶ added in v1.8.0
func GetPatchedAndGeneratedResource(resourceBytes []byte) (unstructured.Unstructured, error)
GetPatchedAndGeneratedResource converts raw bytes to unstructured object
func GetResourceAccordingToResourcePath ¶
func GetResourceAccordingToResourcePath( out io.Writer, fs billy.Filesystem, resourcePaths []string, cluster bool, policies []kyvernov1.PolicyInterface, validatingAdmissionPolicies []admissionregistrationv1alpha1.ValidatingAdmissionPolicy, dClient dclient.Interface, namespace string, policyReport bool, policyResourcePath string, ) (resources []*unstructured.Unstructured, err error)
GetResourceAccordingToResourcePath - get resources according to the resource path
func GetResources ¶
func GetResources( out io.Writer, policies []kyvernov1.PolicyInterface, validatingAdmissionPolicies []admissionregistrationv1alpha1.ValidatingAdmissionPolicy, resourcePaths []string, dClient dclient.Interface, cluster bool, namespace string, policyReport bool, ) ([]*unstructured.Unstructured, error)
GetResources gets matched resources by the given policies the resources are fetched from - local paths to resources, if given - the k8s cluster, if given
func GetResourcesWithTest ¶
func GetResourcesWithTest(out io.Writer, fs billy.Filesystem, policies []kyvernov1.PolicyInterface, resourcePaths []string, policyResourcePath string) ([]*unstructured.Unstructured, error)
GetResourcesWithTest with gets matched resources by the given policies
Types ¶
type KyvernoResources ¶ added in v1.10.5
type KyvernoResources struct {
// contains filtered or unexported fields
}
func (*KyvernoResources) FetchResourcesFromPolicy ¶ added in v1.10.5
func (r *KyvernoResources) FetchResourcesFromPolicy(out io.Writer, resourcePaths []string, dClient dclient.Interface, namespace string, policyReport bool) ([]*unstructured.Unstructured, error)
type ValidatingAdmissionResources ¶ added in v1.10.5
type ValidatingAdmissionResources struct {
// contains filtered or unexported fields
}
func (*ValidatingAdmissionResources) FetchResourcesFromPolicy ¶ added in v1.10.5
func (r *ValidatingAdmissionResources) FetchResourcesFromPolicy(out io.Writer, resourcePaths []string, dClient dclient.Interface, namespace string, policyReport bool) ([]*unstructured.Unstructured, error)
Click to show internal directories.
Click to hide internal directories.