pkg

package
v0.0.0-...-941fc4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func SetupClient(k string) (client.Client, error)

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

func WaitForReplicas(n int, sd *seldonv2.SeldonDeployment, c client.Client) error

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

func WaitForStatus(s string, sd *seldonv2.SeldonDeployment, c client.Client) error

WaitForStatus halts execution until the specified status is returned by the resource. Checks every 2 seconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL