Merge pull request #10073 from olemarkus/validate-storage-type-fix

Allow more volume types
This commit is contained in:
Kubernetes Prow Robot 2020-10-20 06:04:08 -07:00 committed by GitHub
commit 7f035dc824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -190,7 +190,7 @@ func CrossValidateInstanceGroup(g *kops.InstanceGroup, cluster *kops.Cluster, cl
}
if g.Spec.RootVolumeType != nil && kops.CloudProviderID(cluster.Spec.CloudProvider) == kops.CloudProviderAWS {
allErrs = append(allErrs, IsValidValue(field.NewPath("spec", "rootVolumeType"), g.Spec.RootVolumeType, []string{"gp2", "io1"})...)
allErrs = append(allErrs, IsValidValue(field.NewPath("spec", "rootVolumeType"), g.Spec.RootVolumeType, []string{"standard", "gp2", "io1", "io2"})...)
}
return allErrs

View File

@ -193,6 +193,9 @@ func TestValidBootDevice(t *testing.T) {
volumeType string
expected []string
}{
{
volumeType: "standard",
},
{
volumeType: "gp2",
},