Documentation
¶
Index ¶
- type PolicyInterrupter
- func NewBaseInterrupter(otm, vtm templatemanager.TemplateManager, cm templatemanager.CueManager) PolicyInterrupter
- func NewClusterOverridePolicyInterrupter(opInterrupter PolicyInterrupter, lister v1alpha1.ClusterOverridePolicyLister) PolicyInterrupter
- func NewClusterValidatePolicyInterrupter(interrupter PolicyInterrupter, tm tokenmanager.TokenManager, ...) PolicyInterrupter
- func NewOverridePolicyInterrupter(interrupter PolicyInterrupter, tm tokenmanager.TokenManager, ...) PolicyInterrupter
- type PolicyInterrupterManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyInterrupter ¶
type PolicyInterrupter interface {
// OnMutating called on "/mutating" api to complete policy
// return nil means obj is not defined policy
OnMutating(obj, oldObj *unstructured.Unstructured, operation admissionv1.Operation) ([]jsonpatchv2.JsonPatchOperation, error)
// OnValidating called on "/validating" api to validate policy
// return nil means obj is not defined policy or no invalid field
OnValidating(obj, oldObj *unstructured.Unstructured, operation admissionv1.Operation) error
// OnStartUp called when webhook process initialize
// return error if initial phase get any error
OnStartUp() error
}
PolicyInterrupter defines interrupt process for policy change It validate and mutate policy.
func NewBaseInterrupter ¶
func NewBaseInterrupter(otm, vtm templatemanager.TemplateManager, cm templatemanager.CueManager) PolicyInterrupter
func NewClusterOverridePolicyInterrupter ¶
func NewClusterOverridePolicyInterrupter(opInterrupter PolicyInterrupter, lister v1alpha1.ClusterOverridePolicyLister) PolicyInterrupter
func NewClusterValidatePolicyInterrupter ¶
func NewClusterValidatePolicyInterrupter(interrupter PolicyInterrupter, tm tokenmanager.TokenManager, client client.Client, lister v1alpha1.ClusterValidatePolicyLister) PolicyInterrupter
func NewOverridePolicyInterrupter ¶
func NewOverridePolicyInterrupter(interrupter PolicyInterrupter, tm tokenmanager.TokenManager, client client.Client, lister v1alpha1.OverridePolicyLister) PolicyInterrupter
type PolicyInterrupterManager ¶
type PolicyInterrupterManager interface {
PolicyInterrupter
// AddInterrupter add a PolicyInterrupter to manager,
// it will replace interrupter if already add with same gvk.s
AddInterrupter(gvk schema.GroupVersionKind, pi PolicyInterrupter)
}
PolicyInterrupterManager manage multi PolicyInterrupter and decide which one to use by gvk.
func NewPolicyInterrupterManager ¶
func NewPolicyInterrupterManager() PolicyInterrupterManager
Source Files
¶
Click to show internal directories.
Click to hide internal directories.