Documentation ¶
Index ¶
- type CustomizedInterpreter
- func (e *CustomizedInterpreter) GetDependencies(ctx context.Context, attributes *request.Attributes) (dependencies []configv1alpha1.DependentObjectReference, matched bool, ...)
- func (e *CustomizedInterpreter) GetReplicas(ctx context.Context, attributes *request.Attributes) (replica int32, requires *workv1alpha2.ReplicaRequirements, matched bool, ...)
- func (e *CustomizedInterpreter) HookEnabled(objGVK schema.GroupVersionKind, operation configv1alpha1.InterpreterOperation) bool
- func (e *CustomizedInterpreter) InterpretHealth(ctx context.Context, attributes *request.Attributes) (healthy bool, matched bool, err error)
- func (e *CustomizedInterpreter) Patch(ctx context.Context, attributes *request.Attributes) (obj *unstructured.Unstructured, matched bool, err error)
- func (e *CustomizedInterpreter) ReflectStatus(ctx context.Context, attributes *request.Attributes) (status *runtime.RawExtension, 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(informer genericmanager.SingleClusterInformerManager, serviceLister corev1.ServiceLister) (*CustomizedInterpreter, error)
NewCustomizedInterpreter return a new CustomizedInterpreter.
func (*CustomizedInterpreter) GetDependencies ¶
func (e *CustomizedInterpreter) GetDependencies(ctx context.Context, attributes *request.Attributes) (dependencies []configv1alpha1.DependentObjectReference, matched bool, err error)
GetDependencies returns the dependencies of give object. return matched value to indicate whether there is a matching hook.
func (*CustomizedInterpreter) GetReplicas ¶
func (e *CustomizedInterpreter) GetReplicas(ctx context.Context, attributes *request.Attributes) (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(objGVK schema.GroupVersionKind, operation configv1alpha1.InterpreterOperation) bool
HookEnabled tells if any hook exist for specific resource gvk and operation type.
func (*CustomizedInterpreter) InterpretHealth ¶
func (e *CustomizedInterpreter) InterpretHealth(ctx context.Context, attributes *request.Attributes) (healthy bool, matched bool, err error)
InterpretHealth returns the health state of the object. return matched value to indicate whether there is a matching hook.
func (*CustomizedInterpreter) Patch ¶
func (e *CustomizedInterpreter) Patch(ctx context.Context, attributes *request.Attributes) (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.
func (*CustomizedInterpreter) ReflectStatus ¶
func (e *CustomizedInterpreter) ReflectStatus(ctx context.Context, attributes *request.Attributes) (status *runtime.RawExtension, matched bool, err error)
ReflectStatus returns the status of the object. return matched value to indicate whether there is a matching hook.