Skip to content

Commit

Permalink
add cache volume to the sidecar container
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed Jan 12, 2024
1 parent b29915f commit b46fd59
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/webhook/sidecar_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const (
SidecarContainerTmpVolumeMountPath = "/gcsfuse-tmp"
SidecarContainerBufferVolumeName = "gke-gcsfuse-buffer"
SidecarContainerBufferVolumeMountPath = "/gcsfuse-buffer"
SidecarContainerCacheVolumeName = "gke-gcsfuse-cache"
SidecarContainerCacheVolumeMountPath = "/gcsfuse-cache"

// See the nonroot user discussion: https://github.com/GoogleContainerTools/distroless/issues/443
NobodyUID = 65534
Expand Down Expand Up @@ -73,6 +75,10 @@ func GetSidecarContainerSpec(c *Config) v1.Container {
Name: SidecarContainerBufferVolumeName,
MountPath: SidecarContainerBufferVolumeMountPath,
},
{
Name: SidecarContainerCacheVolumeName,
MountPath: SidecarContainerCacheVolumeMountPath,
},
},
}

Expand All @@ -93,6 +99,12 @@ func GetSidecarContainerVolumeSpec() []v1.Volume {
EmptyDir: &v1.EmptyDirVolumeSource{},
},
},
{
Name: SidecarContainerCacheVolumeName,
VolumeSource: v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{},
},
},
}
}

Expand Down

0 comments on commit b46fd59

Please sign in to comment.