Hot-fix admission of volumes that are being provisioned.

This is a first-aid bandage to let admission controller ignore persistent
volumes that are being provisioned right now and thus may not exist in
external cloud infrastructure yet.
This commit is contained in:
Jan Safranek
2016-02-23 09:46:40 +01:00
parent 599af17e0d
commit a304e3478d
5 changed files with 19 additions and 3 deletions

View File

@@ -439,7 +439,7 @@ func (c *awsElasticBlockStoreProvisioner) NewPersistentVolumeTemplate() (*api.Pe
},
PersistentVolumeSource: api.PersistentVolumeSource{
AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{
VolumeID: "dummy",
VolumeID: volume.ProvisionedVolumeName,
FSType: "ext4",
Partition: 0,
ReadOnly: false,

View File

@@ -445,7 +445,7 @@ func (c *cinderVolumeProvisioner) NewPersistentVolumeTemplate() (*api.Persistent
},
PersistentVolumeSource: api.PersistentVolumeSource{
Cinder: &api.CinderVolumeSource{
VolumeID: "dummy",
VolumeID: volume.ProvisionedVolumeName,
FSType: "ext4",
ReadOnly: false,
},

View File

@@ -401,7 +401,7 @@ func (c *gcePersistentDiskProvisioner) NewPersistentVolumeTemplate() (*api.Persi
},
PersistentVolumeSource: api.PersistentVolumeSource{
GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{
PDName: "dummy",
PDName: volume.ProvisionedVolumeName,
FSType: "ext4",
Partition: 0,
ReadOnly: false,

View File

@@ -113,6 +113,12 @@ type DeletableVolumePlugin interface {
NewDeleter(spec *Spec) (Deleter, error)
}
const (
// Name of a volume in external cloud that is being provisioned and thus
// should be ignored by rest of Kubernetes.
ProvisionedVolumeName = "placeholder-for-provisioning"
)
// ProvisionableVolumePlugin is an extended interface of VolumePlugin and is used to create volumes for the cluster.
type ProvisionableVolumePlugin interface {
VolumePlugin