Documentation ¶
Index ¶
- Constants
- func CreateEtcdClient(etcdConfig EtcdConfig, secretData map[string][]byte, logger logr.Logger) (*etcd3.Client, error)
- type EtcdConfig
- type EtcdRangeWatcher
- type EtcdSecret
- type KeyEvent
- type KeyEventChan
- type KeyEventType
- type KubeResolver
- type KvListener
- type MMService
- func (mms *MMService) ConnectIfNeeded(ctx context.Context) error
- func (mms *MMService) Disconnect()
- func (mms *MMService) GetNameAndSpec() (string, *v1.ServiceSpec)
- func (mms *MMService) InferenceEndpoints() (grpc, rest string)
- func (mms *MMService) MMClient() mmeshapi.ModelMeshClient
- func (mms *MMService) UpdateConfig(cp *config.ConfigProvider) (*config.Config, bool)
- type ModelMeshEventStream
- type TLSConfigLookup
Constants ¶
const ( ModelRegistryPrefix = "registry" VModelRegistryPrefix = "vmodels" )
const KUBE_SCHEME = "kube"
Variables ¶
This section is empty.
Functions ¶
func CreateEtcdClient ¶
Types ¶
type EtcdConfig ¶
type EtcdConfig struct { Endpoints string `json:"endpoints"` Username string `json:"userid,omitempty"` Password string `json:"password,omitempty"` RootPrefix string `json:"root_prefix,omitempty"` Certificate string `json:"certificate,omitempty"` CertificateFile string `json:"certificate_file,omitempty"` ClientKey string `json:"client_key,omitempty"` ClientKeyFile string `json:"client_key_file,omitempty"` ClientCertificate string `json:"client_certificate,omitempty"` ClientCertificateFile string `json:"client_certificate_file,omitempty"` OverrideAuthority string `json:"override_authority,omitempty"` }
type EtcdRangeWatcher ¶
type EtcdRangeWatcher struct { WatchPrefix string // contains filtered or unexported fields }
EtcdRangeWatcher A wrapper for Etcd Watch with common refresh Watch Channel logic
func NewEtcdRangeWatcher ¶
func (*EtcdRangeWatcher) Start ¶
func (r *EtcdRangeWatcher) Start(ctx context.Context, keysOnly bool, listener KvListener)
type EtcdSecret ¶ added in v0.8.0
type EtcdSecret struct { Log logr.Logger Name string Namespace string ControllerNamespace string EtcdConfig *EtcdConfig Scheme *runtime.Scheme }
An EtcdSecret represents the etcd configuation for a user namespace
type KeyEvent ¶
type KeyEvent struct { Key string Value []byte Type KeyEventType }
type KeyEventChan ¶
type KeyEventChan chan KeyEvent
type KeyEventType ¶
type KeyEventType uint8
const ( UPDATE KeyEventType = iota DELETE INITIALIZED )
func (KeyEventType) String ¶
func (t KeyEventType) String() string
type KubeResolver ¶
KubeResolver is a ResolverBuilder and a Reconciler
func InitGrpcResolver ¶
func InitGrpcResolver(defaultNamespace string, mgr ctrl.Manager) (*KubeResolver, error)
InitGrpcResolver should only be called once
func (*KubeResolver) Build ¶
func (kr *KubeResolver) Build(target resolver.Target, cc resolver.ClientConn, _ resolver.BuildOptions) (resolver.Resolver, error)
func (*KubeResolver) Scheme ¶
func (*KubeResolver) Scheme() string
type KvListener ¶
type KvListener func(eventType KeyEventType, key string, value []byte)
type MMService ¶
type MMService struct { // these don't change Log logr.Logger // contains filtered or unexported fields }
Encapsulates ModelMesh gRPC service
func NewMMService ¶
func NewMMService(namespace string, tlsConfig TLSConfigLookup) *MMService
func (*MMService) ConnectIfNeeded ¶ added in v0.8.0
ConnectIfNeeded is called only in service reconcile
func (*MMService) Disconnect ¶
func (mms *MMService) Disconnect()
Disconnect is called only in service reconcile
func (*MMService) GetNameAndSpec ¶ added in v0.8.0
func (mms *MMService) GetNameAndSpec() (string, *v1.ServiceSpec)
func (*MMService) InferenceEndpoints ¶ added in v0.8.0
func (*MMService) MMClient ¶
func (mms *MMService) MMClient() mmeshapi.ModelMeshClient
MMClient is called from predictor controller
func (*MMService) UpdateConfig ¶
type ModelMeshEventStream ¶
type ModelMeshEventStream struct { MMEvents chan event.GenericEvent // contains filtered or unexported fields }
ModelMeshEventStream generates events for Predictors based on changes to models/vmodels within model-mesh's etcd-based registries. This is unfortunately tightly coupled to certain model-mesh internal details (i.e. etcd layout), and in future we would like to expose streaming gRPC APIs from model-mesh for an "official" way to watch for model events.
func NewModelEventStream ¶
func (*ModelMeshEventStream) RemoveWatchedService ¶ added in v0.8.0
func (mes *ModelMeshEventStream) RemoveWatchedService(serviceName, namespace string)
RemoveWatchedService is called from service reconciler
func (*ModelMeshEventStream) UpdateWatchedService ¶
func (mes *ModelMeshEventStream) UpdateWatchedService(ctx context.Context, etcdSecretName, serviceName, namespace string) error
UpdateWatchedService is called from service reconciler