Documentation ¶
Index ¶
- func AddNamespace(sd *seldonv2.SeldonDeployment, n string) *apiv1.Namespace
- func CreateDeployment(f string) (*seldonv2.SeldonDeployment, error)
- func SetupClient(k string) (client.Client, error)
- func WaitForReplicas(n int, sd *seldonv2.SeldonDeployment, c client.Client) error
- func WaitForStatus(s string, sd *seldonv2.SeldonDeployment, c client.Client) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNamespace ¶
func AddNamespace(sd *seldonv2.SeldonDeployment, n string) *apiv1.Namespace
AddNamespace creates a namespace variable and adds the namespace name to the SeldonDeployment CRD.
func CreateDeployment ¶
func CreateDeployment(f string) (*seldonv2.SeldonDeployment, error)
CreateDeployment reads the CRD json and populates a SeldonDeployment struct with the data. Includes error handling for when a non-json file is passed to the function.
func SetupClient ¶
SetupClient creates and returns the k8s client through which we interact with the cluster. Both the seldon and k8s.io/api apis are added to the scheme so we can manipulate resources on the cluster.
func WaitForReplicas ¶
WaitForReplicas halts execution until the specified number of replicas are available. Checks every 2 seconds. This function is brittle - it requires that the resource name end "-0-classifier" so may need adjusting for other Seldon CRDs.
func WaitForStatus ¶
WaitForStatus halts execution until the specified status is returned by the resource. Checks every 2 seconds.
Types ¶
This section is empty.