Skip to content

Commit

Permalink
Merge pull request kubeflow#32 from gregsheremeta/dot-config-scratch
Browse files Browse the repository at this point in the history
UPSTREAM: <carry>: feat: mount EmptyDir volumes for launcher write locations pt 2
  • Loading branch information
openshift-merge-bot[bot] authored Apr 8, 2024
2 parents 680e445 + e428f16 commit 6d59438
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/src/v2/compiler/argocompiler/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
dotLocalScratchName = "dot-local-scratch"
dotCacheScratchLocation = "/.cache"
dotCacheScratchName = "dot-cache-scratch"
dotConfigScratchLocation = "/.config"
dotConfigScratchName = "dot-config-scratch"
)

func (c *workflowCompiler) Container(name string, component *pipelinespec.ComponentSpec, container *pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec) error {
Expand Down Expand Up @@ -289,6 +291,12 @@ func (c *workflowCompiler) addContainerExecutorTemplate() string {
EmptyDir: &k8score.EmptyDirVolumeSource{},
},
},
{
Name: dotConfigScratchName,
VolumeSource: k8score.VolumeSource{
EmptyDir: &k8score.EmptyDirVolumeSource{},
},
},
},
InitContainers: []wfapi.UserContainer{{
Container: k8score.Container{
Expand Down Expand Up @@ -338,6 +346,10 @@ func (c *workflowCompiler) addContainerExecutorTemplate() string {
Name: dotCacheScratchName,
MountPath: dotCacheScratchLocation,
},
{
Name: dotConfigScratchName,
MountPath: dotConfigScratchLocation,
},
},
EnvFrom: []k8score.EnvFromSource{metadataEnvFrom},
Env: commonEnvs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ spec:
name: dot-local-scratch
- mountPath: /.cache
name: dot-cache-scratch
- mountPath: /.config
name: dot-config-scratch
initContainers:
- command:
- launcher-v2
Expand Down Expand Up @@ -188,6 +190,8 @@ spec:
name: dot-local-scratch
- emptyDir: { }
name: dot-cache-scratch
- emptyDir: { }
name: dot-config-scratch
- dag:
tasks:
- arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ spec:
name: dot-local-scratch
- mountPath: /.cache
name: dot-cache-scratch
- mountPath: /.config
name: dot-config-scratch
initContainers:
- command:
- launcher-v2
Expand Down Expand Up @@ -171,6 +173,8 @@ spec:
name: dot-local-scratch
- emptyDir: {}
name: dot-cache-scratch
- emptyDir: {}
name: dot-config-scratch
- dag:
tasks:
- arguments:
Expand Down

0 comments on commit 6d59438

Please sign in to comment.