Skip to content

Commit

Permalink
Use local disk for ConfigMap volume instead of tmpfs
Browse files Browse the repository at this point in the history
So that ConfigMap volumes are counted against pod's storage quota.
  • Loading branch information
pmorie committed May 11, 2016
1 parent 6f288b3 commit 3567b1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/volume/configmap/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3567b1f

Please sign in to comment.