common

package
v1.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func SplitYAMLDocuments(yamlBytes []byte) (policies [][]byte, error error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL