deployment

package
v1.22.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerConcurrency = 5
	DefaultSubdomainLen   = 8
)
View Source
const ModelInitializerVolumeSuffix = "provision-location"
View Source
const SeldonModelServeKind = "seldon"

Variables

This section is empty.

Functions

func ApplyObject

func ApplyObject(ctx context.Context, cli client.Client, obj client.Object) error

func CreateOrUpdateContainer

func CreateOrUpdateContainer(pod corev1.PodSpec, conname string, oncontainer func(c *corev1.Container)) corev1.PodSpec

func IsOwnBy

func IsOwnBy(obj client.Object, gvk schema.GroupVersionKind) bool

func Mergekvs

func Mergekvs(kvs map[string]string, into map[string]string) map[string]string

func OAMAppTrigger

func OAMAppTrigger() handler.EventHandler

func RandStringRunes

func RandStringRunes(n int) string

RandStringRunes generates a random string of letters and digits (lowercase)

func Run

func Run(ctx context.Context, options *Options) error

func Setup

func Setup(ctx context.Context, mgr ctrl.Manager, options *Options) error

func ToRawExtension

func ToRawExtension(obj any) *runtime.RawExtension

Types

type ModelServe

type ModelServe interface {
	Watches() client.Object
	Apply(ctx context.Context, md *modelsv1beta1.ModelDeployment) error
}

type OAMWebServiceProperties

type OAMWebServiceProperties struct {
	Labels          map[string]string                   `json:"labels,omitempty"`
	Annotations     map[string]string                   `json:"annotations,omitempty"`
	Image           string                              `json:"image,omitempty"`
	ImagePullPolicy string                              `json:"imagePullPolicy,omitempty"`
	Ports           []OAMWebServicePropertiesPort       `json:"ports,omitempty"`
	ExposeType      string                              `json:"exposeType,omitempty"`
	CMD             []string                            `json:"cmd,omitempty"`
	ENV             []OAMWebServicePropertiesEnv        `json:"env,omitempty"`
	CPU             string                              `json:"cpu,omitempty"`
	Memory          string                              `json:"memory,omitempty"`
	VolumeMounts    OAMWebServicePropertiesVolumeMounts `json:"volumeMounts,omitempty"`
}

type OAMWebServicePropertiesEnv

type OAMWebServicePropertiesEnv struct {
	Name      string               `json:"name"`
	Value     string               `json:"value"`
	ValueFrom *corev1.EnvVarSource `json:"valueFrom,omitempty"`
}

type OAMWebServicePropertiesPort

type OAMWebServicePropertiesPort struct {
	Port     int32  `json:"port,omitempty"`
	Name     string `json:"name,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Expose   bool   `json:"expose,omitempty"`
}

type OAMWebServicePropertiesVolumeMount

type OAMWebServicePropertiesVolumeMount struct {
	Name        string `json:"name,omitempty"`
	MountPath   string `json:"mountPath,omitempty"`
	ClaimName   string `json:"claimName,omitempty"`
	CMName      string `json:"cmName,omitempty"`
	SecretName  string `json:"secretName,omitempty"`
	Medium      string `json:"medium,omitempty"` // when EmptyDir
	Path        string `json:"path,omitempty"`   // when HostPath
	DefaultMode int    `json:"defaultMode,omitempty"`

	Items []OAMWebServicePropertiesVolumeMountItem `json:"items,omitempty"`
}

type OAMWebServicePropertiesVolumeMountItem

type OAMWebServicePropertiesVolumeMountItem struct {
	Key  string `json:"key,omitempty"`
	Path string `json:"path,omitempty"`
	Mode int    `json:"mode,omitempty"`
}

type OAMWebServicePropertiesVolumeMounts

type OAMWebServicePropertiesVolumeMounts struct {
	PVC       []OAMWebServicePropertiesVolumeMount `json:"pvc,omitempty"`
	ConfigMap []OAMWebServicePropertiesVolumeMount `json:"configMap,omitempty"`
	Secret    []OAMWebServicePropertiesVolumeMount `json:"secret,omitempty"`
	EmptyDir  []OAMWebServicePropertiesVolumeMount `json:"emptyDir,omitempty"`
	HostPath  []OAMWebServicePropertiesVolumeMount `json:"hostPath,omitempty"`
}

type Options

type Options struct {
	MetricsAddr          string `json:"metricsAddr,omitempty" description:"The address the metric endpoint binds to."`
	EnableLeaderElection bool   `json:"enableLeaderElection,omitempty" description:"Enable leader election for controller manager."`
	ProbeAddr            string `json:"probeAddr,omitempty" description:"The address the probe endpoint binds to."`
	IngressHost          string `json:"ingressHost,omitempty" description:"The base host of the ingress."`
	IngressScheme        string `json:"ingressScheme,omitempty" description:"The scheme of the ingress."`
}

func DefaultOptions

func DefaultOptions() *Options

type Reconciler

type Reconciler struct {
	client.Client
	Options    *Options
	SeldonBack *SeldonModelServe
}

func (*Reconciler) Default

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) Sync

type SeldonModelServe

type SeldonModelServe struct {
	Client        client.Client
	IngressHost   string
	IngressScheme string
}

func (*SeldonModelServe) Apply

func (*SeldonModelServe) Watches

func (r *SeldonModelServe) Watches() client.Object

Jump to

Keyboard shortcuts

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