Documentation
¶
Index ¶
- func CreateResourceInterpreterContext(versions []string, attributes *RequestAttributes) (uid types.UID, request runtime.Object, err error)
- func CreateV1alpha1ResourceInterpreterContext(uid types.UID, attributes *RequestAttributes) *configv1alpha1.ResourceInterpreterContext
- type RequestAttributes
- type ResponseAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResourceInterpreterContext ¶
func CreateResourceInterpreterContext(versions []string, attributes *RequestAttributes) (uid types.UID, request runtime.Object, err error)
CreateResourceInterpreterContext returns the unique request uid, the ResourceInterpreterContext object to send the webhook, or an error if the webhook does not support receiving any of the versions we know to send.
func CreateV1alpha1ResourceInterpreterContext ¶
func CreateV1alpha1ResourceInterpreterContext(uid types.UID, attributes *RequestAttributes) *configv1alpha1.ResourceInterpreterContext
CreateV1alpha1ResourceInterpreterContext creates an ResourceInterpreterContext for the provided RequestAttributes.
Types ¶
type RequestAttributes ¶
type RequestAttributes struct {
Operation configv1alpha1.InterpreterOperation
Object *unstructured.Unstructured
ObservedObj *unstructured.Unstructured
ReplicasSet int32
AggregatedStatus []workv1alpha2.AggregatedStatusItem
}
RequestAttributes contains the attributes that call webhook.
type ResponseAttributes ¶
type ResponseAttributes struct {
Successful bool
Status configv1alpha1.RequestStatus
Replicas int32
ReplicaRequirements *workv1alpha2.ReplicaRequirements
Dependencies []configv1alpha1.DependentObjectReference
Patch []byte
PatchType configv1alpha1.PatchType
RawStatus runtime.RawExtension
Healthy bool
}
ResponseAttributes contains the attributes that response by the webhook.
func VerifyResourceInterpreterContext ¶
func VerifyResourceInterpreterContext(uid types.UID, operation configv1alpha1.InterpreterOperation, interpreterContext runtime.Object) (response *ResponseAttributes, err error)
VerifyResourceInterpreterContext checks the validity of the provided resourceInterpreterContext, and returns ResponseAttributes, or an error if the provided resourceInterpreterContext was not valid.