Documentation ¶
Index ¶
- type CustomizedInterpreter
- func (e *CustomizedInterpreter) GetReplicas(ctx context.Context, attributes *webhook.RequestAttributes) (replica int32, requires *workv1alpha2.ReplicaRequirements, matched bool, ...)
- func (e *CustomizedInterpreter) HookEnabled(attributes *webhook.RequestAttributes) bool
- func (e *CustomizedInterpreter) Patch(ctx context.Context, attributes *webhook.RequestAttributes) (obj *unstructured.Unstructured, matched bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomizedInterpreter ¶
type CustomizedInterpreter struct {
// contains filtered or unexported fields
}
CustomizedInterpreter interpret custom resource with webhook configuration.
func NewCustomizedInterpreter ¶
func NewCustomizedInterpreter(kubeconfig string, informer informermanager.SingleClusterInformerManager) (*CustomizedInterpreter, error)
NewCustomizedInterpreter return a new CustomizedInterpreter.
func (*CustomizedInterpreter) GetReplicas ¶
func (e *CustomizedInterpreter) GetReplicas(ctx context.Context, attributes *webhook.RequestAttributes) (replica int32, requires *workv1alpha2.ReplicaRequirements, matched bool, err error)
GetReplicas returns the desired replicas of the object as well as the requirements of each replica. return matched value to indicate whether there is a matching hook.
func (*CustomizedInterpreter) HookEnabled ¶
func (e *CustomizedInterpreter) HookEnabled(attributes *webhook.RequestAttributes) bool
HookEnabled tells if any hook exist for specific resource type and operation type.
func (*CustomizedInterpreter) Patch ¶ added in v1.0.0
func (e *CustomizedInterpreter) Patch(ctx context.Context, attributes *webhook.RequestAttributes) (obj *unstructured.Unstructured, matched bool, err error)
Patch returns the Unstructured object that applied patch response that based on the RequestAttributes. return matched value to indicate whether there is a matching hook.
Click to show internal directories.
Click to hide internal directories.