Documentation
¶
Index ¶
- Variables
- func IsJobFailed(status v1alpha1.MXJobStatus) bool
- func IsJobFinished(status v1alpha1.MXJobStatus) bool
- func IsJobSucceed(status v1alpha1.MXJobStatus) bool
- func RecheckDeletionTimestamp(getObject func() (metav1.Object, error)) func() error
- type ClientManager
- func (cm *ClientManager) HookClient(h *v1alpha1.Webhook) (*rest.RESTClient, error)
- func (cm *ClientManager) SetAuthenticationInfoResolver(resolver webhook.AuthenticationInfoResolver)
- func (cm *ClientManager) SetAuthenticationInfoResolverWrapper(wrapper webhook.AuthenticationInfoResolverWrapper)
- func (cm *ClientManager) SetNegotiatedSerializer(n runtime.NegotiatedSerializer)
- func (cm *ClientManager) SetServiceResolver(sr webhook.ServiceResolver)
- func (cm *ClientManager) Validate() error
- type Handler
Constants ¶
This section is empty.
Variables ¶
var (
ErrNeedServiceOrURL = errors.New("webhook configuration must have either service or URL")
)
var ( // KeyFunc is the short name to DeletionHandlingMetaNamespaceKeyFunc. // IndexerInformer uses a delta queue, therefore for deletes we have to use this // key function but it should be just fine for non delete events. KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc )
Functions ¶
func IsJobFailed ¶
func IsJobFailed(status v1alpha1.MXJobStatus) bool
IsJobFailed checks whether MXJob is in Failed condition.
func IsJobFinished ¶
func IsJobFinished(status v1alpha1.MXJobStatus) bool
IsJobFinished checks whether MXJob is in Succeed or Failed condition.
func IsJobSucceed ¶
func IsJobSucceed(status v1alpha1.MXJobStatus) bool
IsJobSucceed checks whether MXJob is in Succeed condition.
func RecheckDeletionTimestamp ¶
RecheckDeletionTimestamp returns a CanAdopt() function to recheck deletion.
The CanAdopt() function calls getObject() to fetch the latest value, and denies adoption attempts if that object has a non-nil DeletionTimestamp.
Types ¶
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
ClientManager builds REST clients to talk to webhooks. It caches the clients to avoid duplicate creation. Originate from k8s.io/apiserver/pkg/admission/plugin/webhook/config.ClientManager
func NewClientManager ¶
func NewClientManager() (ClientManager, error)
NewClientManager creates a ClientManager.
func (*ClientManager) HookClient ¶
func (cm *ClientManager) HookClient(h *v1alpha1.Webhook) (*rest.RESTClient, error)
HookClient get a RESTClient from the cache, or constructs one based on the webhook configuration.
func (*ClientManager) SetAuthenticationInfoResolver ¶
func (cm *ClientManager) SetAuthenticationInfoResolver(resolver webhook.AuthenticationInfoResolver)
SetAuthenticationInfoResolver sets the AuthenticationInfoResolver.
func (*ClientManager) SetAuthenticationInfoResolverWrapper ¶
func (cm *ClientManager) SetAuthenticationInfoResolverWrapper(wrapper webhook.AuthenticationInfoResolverWrapper)
SetAuthenticationInfoResolverWrapper sets the AuthenticationInfoResolverWrapper.
func (*ClientManager) SetNegotiatedSerializer ¶
func (cm *ClientManager) SetNegotiatedSerializer(n runtime.NegotiatedSerializer)
SetNegotiatedSerializer sets the NegotiatedSerializer.
func (*ClientManager) SetServiceResolver ¶
func (cm *ClientManager) SetServiceResolver(sr webhook.ServiceResolver)
SetServiceResolver sets the ServiceResolver.
func (*ClientManager) Validate ¶
func (cm *ClientManager) Validate() error
Validate checks if ClientManager is properly set up.