Documentation ¶
Index ¶
- func GetPolicies(paths []string) (policies []*v1.ClusterPolicy, error error)
- func GetPoliciesValidation(policyPaths []string) ([]*v1.ClusterPolicy, *openapi.Controller, error)
- func GetPolicy(path string) (clusterPolicies []*v1.ClusterPolicy, errors []error)
- func MutatePolicy(policy *v1.ClusterPolicy, logger logr.Logger) (*v1.ClusterPolicy, error)
- func PolicyHasVariables(policy v1.ClusterPolicy) bool
- func SplitYAMLDocuments(yamlBytes []byte) (policies [][]byte, error error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPolicies ¶
func GetPolicies(paths []string) (policies []*v1.ClusterPolicy, error error)
GetPolicies - Extracting the policies from multiple YAML
func GetPoliciesValidation ¶
func GetPoliciesValidation(policyPaths []string) ([]*v1.ClusterPolicy, *openapi.Controller, error)
GetPoliciesValidation - validating policies
func GetPolicy ¶
func GetPolicy(path string) (clusterPolicies []*v1.ClusterPolicy, errors []error)
GetPolicy - Extracts policies from a YAML
func MutatePolicy ¶ added in v1.1.9
func MutatePolicy(policy *v1.ClusterPolicy, logger logr.Logger) (*v1.ClusterPolicy, error)
MutatePolicy - applies mutation to a policy
func PolicyHasVariables ¶ added in v1.1.7
func PolicyHasVariables(policy v1.ClusterPolicy) bool
PolicyHasVariables - check for variables in policy
func SplitYAMLDocuments ¶
SplitYAMLDocuments reads the YAML bytes per-document, unmarshals the TypeMeta information from each document and returns a map between the GroupVersionKind of the document and the document bytes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.