From 3567b1f9c48bb6879fbe7d36b8c634e849f59438 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Sat, 7 May 2016 09:17:06 -0400 Subject: [PATCH] Use local disk for ConfigMap volume instead of tmpfs So that ConfigMap volumes are counted against pod's storage quota. --- pkg/volume/configmap/configmap.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/volume/configmap/configmap.go b/pkg/volume/configmap/configmap.go index 496468187ad..e609b9d6f57 100644 --- a/pkg/volume/configmap/configmap.go +++ b/pkg/volume/configmap/configmap.go @@ -107,7 +107,10 @@ func (sv *configMapVolume) GetAttributes() volume.Attributes { // This is the spec for the volume that this plugin wraps. var wrappedVolumeSpec = volume.Spec{ - Volume: &api.Volume{VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{Medium: api.StorageMediumMemory}}}, + // This should be on a tmpfs instead of the local disk; the problem is + // charging the memory for the tmpfs to the right cgroup. We should make + // this a tmpfs when we can do the accounting correctly. + Volume: &api.Volume{VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, } func (b *configMapVolumeMounter) SetUp(fsGroup *int64) error {