Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backend] Cache - Add cache_enabled label for cache filtering #3352

Merged
merged 18 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/src/apiserver/resource/resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ func (r *ResourceManager) CreateRun(apiRun *api.Run) (*model.RunDetail, error) {

// Disable istio sidecar injection
workflow.SetAnnotationsToAllTemplates(util.AnnotationKeyIstioSidecarInject, util.AnnotationValueIstioSidecarInjectDisabled)
// Add a KFP specific annotation for cache service filtering
workflow.SetAnnotationsToAllTemplates(util.AnnotationKeyCacheEnabled, util.AnnotationValueCacheEnabled)
rui5i marked this conversation as resolved.
Show resolved Hide resolved
rui5i marked this conversation as resolved.
Show resolved Hide resolved
// Append provided parameter
workflow.OverrideParameters(parameters)

Expand Down
10 changes: 6 additions & 4 deletions backend/src/common/util/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ const (
// It captures whether the name of the owning ScheduledWorkflow.
LabelKeyWorkflowScheduledWorkflowName = constants.FullName + "/scheduledWorkflowName"


LabelKeyWorkflowRunId = "pipeline/runid"
LabelKeyWorkflowRunId = "pipeline/runid"
LabelKeyWorkflowPersistedFinalState = "pipeline/persistedFinalState"

// LabelKeyWorkflowEpoch is a Workflow annotation key.
// It captures the the name of the Run.
AnnotationKeyRunName = "pipelines.kubeflow.org/run_name"

AnnotationKeyIstioSidecarInject = "sidecar.istio.io/inject"
AnnotationValueIstioSidecarInjectEnabled = "true"
AnnotationKeyIstioSidecarInject = "sidecar.istio.io/inject"
AnnotationValueIstioSidecarInjectEnabled = "true"
AnnotationValueIstioSidecarInjectDisabled = "false"

AnnotationKeyCacheEnabled = "pipelines.kubeflow.org/cache_enabled"
AnnotationValueCacheEnabled = "true"
rui5i marked this conversation as resolved.
Show resolved Hide resolved
)