Documentation ¶
Index ¶
- func CanAutoGen(policy *kyverno.ClusterPolicy, log logr.Logger) (applyAutoGen bool, controllers string)
- func GenerateJSONPatchesForDefaults(policy *kyverno.ClusterPolicy, log logr.Logger) ([]byte, []string)
- func GeneratePodControllerRule(policy kyverno.ClusterPolicy, log logr.Logger) (patches [][]byte, errs []error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanAutoGen ¶ added in v1.3.6
func CanAutoGen(policy *kyverno.ClusterPolicy, log logr.Logger) (applyAutoGen bool, controllers string)
CanAutoGen checks whether the rule(s) (in policy) can be applied to Pod controllers returns controllers as: - "none" if:
- name or selector is defined
- mixed kinds (Pod + pod controller) is defined
- mutate.Patches/mutate.PatchesJSON6902/validate.deny/generate rule is defined
- otherwise it returns all pod controllers
func GenerateJSONPatchesForDefaults ¶
func GenerateJSONPatchesForDefaults(policy *kyverno.ClusterPolicy, log logr.Logger) ([]byte, []string)
GenerateJSONPatchesForDefaults generates default JSON patches for - ValidationFailureAction - Background - auto-gen annotation and rules
func GeneratePodControllerRule ¶
func GeneratePodControllerRule(policy kyverno.ClusterPolicy, log logr.Logger) (patches [][]byte, errs []error)
GeneratePodControllerRule returns two patches: rulePatches and annotation patch(if necessary)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.