Skip to content

Commit

Permalink
chore(*): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jian Zeng committed Nov 17, 2020
1 parent 33f211f commit 9bade06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/workflow/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ const (
// ResultFileDir contains the file `__result__` to hold execution result of a container that need to be synced to
// WorkflowRun status. Each line of the result should be in format: <key>:<value>
ResultFileDir = "/cyclone/results"
// ResultDirSubPath defines the subPath of ResultFileDir in coordinator sidecar volume
ResultDirSubPath = "__results__"

// OutputResourcesDir contains the output resources generated by workload container
OutputResourcesDir = "/cyclone/resources"
Expand Down
3 changes: 2 additions & 1 deletion pkg/workflow/workload/pod/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ func (m *Builder) ResolveInputResources() error {
MountPath: common.ToolboxPath,
},
{
// input container might write the __result__ file.
Name: common.CoordinatorSidecarVolumeName,
MountPath: common.ResultFileDir,
SubPath: common.ResultSubPath(containerName),
Expand Down Expand Up @@ -849,7 +850,7 @@ func (m *Builder) AddCoordinator() error {
{
Name: common.CoordinatorSidecarVolumeName,
MountPath: filepath.Join(common.CoordinatorWorkspacePath, "results"),
SubPath: "__results__",
SubPath: common.ResultDirSubPath,
},
},
ImagePullPolicy: controller.ImagePullPolicy(),
Expand Down

0 comments on commit 9bade06

Please sign in to comment.