server

package
v1.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 27 Imported by: 1

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"
	SdkTypeLabel               string = "pipelines.kubeflow.org/pipeline-sdk-type"
	TfxSdkTypeLabel            string = "tfx"
	V2ComponentAnnotationKey   string = "pipelines.kubeflow.org/v2_component"
	V2ComponentAnnotationValue string = "true"
)
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(ctx context.Context, 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