Documentation
¶
Overview ¶
Package v1beta1 provides types and methods for manipulating v1beta1 KFServing InferenceService objects.
Index ¶
- func EnsureReadiness(t *Target) bool
- func GetConditions(t *Target) ([]target.Condition, error)
- type Target
- func (t *Target) Error() error
- func (t *Target) Fetch(targetRef string) target.Target
- func (t *Target) GetVersionInfo() (*etc3.VersionInfo, error)
- func (t *Target) InitializeTrafficSplit() target.Target
- func (t *Target) SetCanaryTrafficPercent(p int64) target.Target
- func (t *Target) SetExperiment(exp *experiment.Experiment) target.Target
- func (t *Target) SetK8sClient(c client.Client) target.Target
- func (t *Target) SetNewBaseline() target.Target
- func (t *Target) SetVersionInfoInExperiment() target.Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureReadiness ¶
EnsureReadiness ensures that the condition "Ready" has "Status" true in t.infService. It periodically fetches t.infService and checks this condition. Returns true if readiness is reached in 180 sec and false otherwise.
Types ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target is an enhancement of KFServing v1beta1 InferenceService.
func TargetBuilder ¶
func TargetBuilder() *Target
TargetBuilder returns an initial v1beta1 target struct pointer.
func (*Target) Error ¶
Error returns the error accumulated by target until this point or nil if there is none.
func (*Target) Fetch ¶
Fetch fetches the v1beta1 InferenceService object from the Kubernetes cluster and populates the target struct with it. InferenceService may be unavailable at the start of this call. So, Fetch periodically attempts to fetch the InferenceService object for 180 sec. Upon success, it returns the fetched object; if it does not succeed in 180 secs, it returns an error.
func (*Target) GetVersionInfo ¶
func (t *Target) GetVersionInfo() (*etc3.VersionInfo, error)
GetVersionInfo constructs the VersionInfo object based on the target and returns it.
func (*Target) InitializeTrafficSplit ¶
InitializeTrafficSplit initializes traffic split for the target. The value of the field spec.predictor.canaryTrafficPercent is set to 1 (i.e., 1%). After this step, the handler waits for (<=) 180 sec to ensure InferenceService object is ready. If any of the above steps fail, the method returns after setting an error.
func (*Target) SetCanaryTrafficPercent ¶
SetCanaryTrafficPercent sets spec.predictor.canaryTrafficPercent field to the given value. After this step, the handler waits for (<=) 180 sec to ensure InferenceService object is ready. If any of the above steps fail, the method returns after setting an error.
func (*Target) SetExperiment ¶
func (t *Target) SetExperiment(exp *experiment.Experiment) target.Target
SetExperiment sets a pointer to an experiment object within the target.
func (*Target) SetK8sClient ¶
SetK8sClient sets a k8s client within the target struct.
func (*Target) SetNewBaseline ¶
SetNewBaseline sets a new baseline (i.e., 'default' version) within the target
func (*Target) SetVersionInfoInExperiment ¶
SetVersionInfoInExperiment sets version info in the experiment associated with this target.