Skip to content

Commit

Permalink
UPSTREAM: <carry>: feat: mount EmptyDir volumes for launcher write lo…
Browse files Browse the repository at this point in the history
…cations pt 2

follows up on dfe6edc, which does an EmptyDir mount for /.local and /.cache.
/.config is another common write location, so EmptyDir mount that too.
  • Loading branch information
gregsheremeta committed Apr 3, 2024
1 parent 680e445 commit e428f16
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 e428f16

Please sign in to comment.