Add errdefs package
Providers should use this package so the virtual kubelet core controllers can understand the errors produced from the provider code.
This commit is contained in:
@@ -41,6 +41,10 @@ import (
|
||||
|
||||
// PodLifecycleHandler defines the interface used by the PodController to react
|
||||
// to new and changed pods scheduled to the node that is being managed.
|
||||
//
|
||||
// Errors produced by these methods should implement an interface from
|
||||
// github.com/virtual-kubelet/virtual-kubelet/errdefs package in order for the
|
||||
// core logic to be able to understand the type of failure.
|
||||
type PodLifecycleHandler interface {
|
||||
// CreatePod takes a Kubernetes Pod and deploys it within the provider.
|
||||
CreatePod(ctx context.Context, pod *corev1.Pod) error
|
||||
|
||||
Reference in New Issue
Block a user