serving

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckServingTypeIsOk

func CheckServingTypeIsOk(stype string) error

func DefinePodPhaseStatus

func DefinePodPhaseStatus(pod v1.Pod) (string, int, int, int)

func GetMultiJobsHelpInfo

func GetMultiJobsHelpInfo(jobs []Serving) string

print the help info when jobs more than one

func IsPodControllerByDeploment

func IsPodControllerByDeploment(pod v1.Pod, deploy app_v1.Deployment) bool

func KeyMapServingType

func KeyMapServingType(servingKey string) types.ServingType

Types

type Serving

type Serving struct {
	Name      string            `yaml:"name" json:"name"`
	Namespace string            `yaml:"namespace" json:"namespace"`
	ServeType types.ServingType `yaml:"serving_type" json:"serving_type"`
	Version   string            `yaml:"version" json:"version"`
	// contains filtered or unexported fields
}

func FilterJobs

func FilterJobs(namespace, version, servingTypeKey string, jobs []Serving) []Serving

filter jobs under the assigned conditions.

func GetOnlyOneJob

func GetOnlyOneJob(client *kubernetes.Clientset, ns, servingName, servingTypeKey, version string) (Serving, string, error)

func NewServingJob

func NewServingJob(client *kubernetes.Clientset, deploy app_v1.Deployment, allPods []v1.Pod) Serving

func NewServingJobList

func NewServingJobList(client *kubernetes.Clientset, servingName string, ns string) ([]Serving, error)

Get all jobs under the assigned conditons.

func (Serving) AllPods

func (s Serving) AllPods() []v1.Pod

func (Serving) AllSvcs

func (s Serving) AllSvcs() (svcs []v1.Service)

func (Serving) AvailableInstances

func (s Serving) AvailableInstances() int32

Available instances

func (Serving) DesiredInstances

func (s Serving) DesiredInstances() int32

Desired Instances

func (Serving) GetAge

func (s Serving) GetAge() string

GetAge returns the time string for serving job is running

func (Serving) GetClusterIP

func (s Serving) GetClusterIP() string

Cluster IP

func (Serving) GetEndpointIP

func (s Serving) GetEndpointIP() string

* Get the endpoint IP

  • Try to get load balancer id first, if failed, turn to

func (Serving) GetName

func (s Serving) GetName() string

func (Serving) GetPorts

func (s Serving) GetPorts() string

func (Serving) GetStatus

func (s Serving) GetStatus() string

func (Serving) IsMatchedGivenCondition

func (s Serving) IsMatchedGivenCondition(target string, targetType string) bool

Jump to

Keyboard shortcuts

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