server

package
v0.0.0-...-4f670de Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentType     string = "Content-Type"
	JsonContentType string = "application/json"
)
View Source
const (
	KFPCacheEnabledLabelKey   string = "pipelines.kubeflow.org/cache_enabled"
	KFPCacheEnabledLabelValue string = "true"
	KFPCachedLabelKey         string = "pipelines.kubeflow.org/reused_from_cache"
	KFPCachedLabelValue       string = "true"
	ArgoWorkflowNodeName      string = "workflows.argoproj.io/node-name"
	ArgoWorkflowTemplate      string = "workflows.argoproj.io/template"
	ExecutionKey              string = "pipelines.kubeflow.org/execution_cache_key"
	CacheIDLabelKey           string = "pipelines.kubeflow.org/cache_id"
	ArgoWorkflowOutputs       string = "workflows.argoproj.io/outputs"
	MetadataWrittenKey        string = "pipelines.kubeflow.org/metadata_written"
	AnnotationPath            string = "/metadata/annotations"
	LabelPath                 string = "/metadata/labels"
	SpecContainersPath        string = "/spec/containers"
	SpecInitContainersPath    string = "/spec/initContainers"
	TFXPodSuffix              string = "tfx/orchestration/kubeflow/container_entrypoint.py"
	ArchiveLocationKey        string = "archiveLocation"
)
View Source
const (
	ArgoCompleteLabelKey   string = "workflows.argoproj.io/completed"
	MetadataExecutionIDKey string = "pipelines.kubeflow.org/metadata_execution_id"
	MaxCacheStalenessKey   string = "pipelines.kubeflow.org/max_cache_staleness"
)

Variables

This section is empty.

Functions

func AdmitFuncHandler

func AdmitFuncHandler(admit admitFunc, clientMgr ClientManagerInterface) http.Handler

AdmitFuncHandler takes an admitFunc and wraps it into a http.Handler by means of calling serveAdmitFunc.

func MutatePodIfCached

func MutatePodIfCached(req *v1beta1.AdmissionRequest, clientMgr ClientManagerInterface) ([]patchOperation, error)

MutatePodIfCached will check whether the execution has already been run before from MLMD and apply the output into pod.metadata.output

func WatchPods

func WatchPods(namespaceToWatch string, clientManager ClientManagerInterface)

Types

type ClientManagerInterface

type ClientManagerInterface interface {
	CacheStore() storage.ExecutionCacheStoreInterface
	KubernetesCoreClient() client.KubernetesCoreInterface
}

type FakeClientManager

type FakeClientManager struct {
	// contains filtered or unexported fields
}

func NewFakeClientManager

func NewFakeClientManager(time util.TimeInterface) (*FakeClientManager, error)

func NewFakeClientManagerOrFatal

func NewFakeClientManagerOrFatal(time util.TimeInterface) *FakeClientManager

func (*FakeClientManager) CacheStore

func (*FakeClientManager) Close

func (f *FakeClientManager) Close() error

func (*FakeClientManager) DB

func (f *FakeClientManager) DB() *storage.DB

func (*FakeClientManager) KubernetesCoreClient

func (f *FakeClientManager) KubernetesCoreClient() client.KubernetesCoreInterface

func (*FakeClientManager) Time

type OperationType

type OperationType string
const (
	OperationTypeAdd     OperationType = "add"
	OperationTypeReplace OperationType = "replace"
	OperationTypeRemove  OperationType = "remove"
)

Jump to

Keyboard shortcuts

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