Update warnings for removed in-tree plugins

This commit is contained in:
xing-yang 2023-01-12 15:05:36 -05:00
parent 2b69bec35d
commit 07a1bc5b3e
2 changed files with 8 additions and 8 deletions

View File

@ -141,16 +141,16 @@ func warningsForPodSpecAndMeta(fieldPath *field.Path, podSpec *api.PodSpec, meta
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.16, non-functional in v1.22+", fieldPath.Child("spec", "volumes").Index(i).Child("scaleIO")))
}
if v.Flocker != nil {
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, support removal is planned in v1.26", fieldPath.Child("spec", "volumes").Index(i).Child("flocker")))
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, non-functional in v1.25+", fieldPath.Child("spec", "volumes").Index(i).Child("flocker")))
}
if v.StorageOS != nil {
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, support removal is planned in v1.26", fieldPath.Child("spec", "volumes").Index(i).Child("storageOS")))
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, non-functional in v1.25+", fieldPath.Child("spec", "volumes").Index(i).Child("storageOS")))
}
if v.Quobyte != nil {
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, support removal is planned in v1.26", fieldPath.Child("spec", "volumes").Index(i).Child("quobyte")))
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.22, non-functional in v1.25+", fieldPath.Child("spec", "volumes").Index(i).Child("quobyte")))
}
if v.Glusterfs != nil {
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.25, this feature will be removed soon after in a subsequent release", fieldPath.Child("spec", "volumes").Index(i).Child("glusterfs")))
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.25, non-functional in v1.26+", fieldPath.Child("spec", "volumes").Index(i).Child("glusterfs")))
}
if v.Ephemeral != nil && v.Ephemeral.VolumeClaimTemplate != nil {
warnings = append(warnings, pvcutil.GetWarningsForPersistentVolumeClaimSpec(fieldPath.Child("spec", "volumes").Index(i).Child("ephemeral").Child("volumeClaimTemplate").Child("spec"), v.Ephemeral.VolumeClaimTemplate.Spec)...)

View File

@ -185,7 +185,7 @@ func TestWarnings(t *testing.T) {
{Name: "s", VolumeSource: api.VolumeSource{Flocker: &api.FlockerVolumeSource{}}},
}},
},
expected: []string{`spec.volumes[0].flocker: deprecated in v1.22, support removal is planned in v1.26`},
expected: []string{`spec.volumes[0].flocker: deprecated in v1.22, non-functional in v1.25+`},
},
{
name: "storageOS",
@ -194,7 +194,7 @@ func TestWarnings(t *testing.T) {
{Name: "s", VolumeSource: api.VolumeSource{StorageOS: &api.StorageOSVolumeSource{}}},
}},
},
expected: []string{`spec.volumes[0].storageOS: deprecated in v1.22, support removal is planned in v1.26`},
expected: []string{`spec.volumes[0].storageOS: deprecated in v1.22, non-functional in v1.25+`},
},
{
name: "quobyte",
@ -203,7 +203,7 @@ func TestWarnings(t *testing.T) {
{Name: "s", VolumeSource: api.VolumeSource{Quobyte: &api.QuobyteVolumeSource{}}},
}},
},
expected: []string{`spec.volumes[0].quobyte: deprecated in v1.22, support removal is planned in v1.26`},
expected: []string{`spec.volumes[0].quobyte: deprecated in v1.22, non-functional in v1.25+`},
},
{
name: "glusterfs",
@ -212,7 +212,7 @@ func TestWarnings(t *testing.T) {
{Name: "s", VolumeSource: api.VolumeSource{Glusterfs: &api.GlusterfsVolumeSource{}}},
}},
},
expected: []string{`spec.volumes[0].glusterfs: deprecated in v1.25, this feature will be removed soon after in a subsequent release`},
expected: []string{`spec.volumes[0].glusterfs: deprecated in v1.25, non-functional in v1.26+`},
},
{
name: "duplicate hostAlias",