mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #118143 from humblec/cephfs
deprecate CephFS plugin from available in-tree drivers.
This commit is contained in:
commit
6b700c398b
@ -79,6 +79,10 @@ func warningsForPersistentVolumeSpecAndMeta(fieldPath *field.Path, pvSpec *api.P
|
||||
warnings = append(warnings, nodeapi.GetWarningsForNodeSelectorTerm(term, termFldPath.Index(i))...)
|
||||
}
|
||||
}
|
||||
// If we are on deprecated volume plugin
|
||||
if pvSpec.CephFS != nil {
|
||||
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.28, non-functional in v1.31+", fieldPath.Child("spec", "persistentVolumeSource").Child("cephfs")))
|
||||
}
|
||||
|
||||
return warnings
|
||||
}
|
||||
|
@ -176,6 +176,26 @@ func TestWarnings(t *testing.T) {
|
||||
`spec.nodeAffinity.required.nodeSelectorTerms[0].matchExpressions[0].key: beta.kubernetes.io/os is deprecated since v1.14; use "kubernetes.io/os" instead`,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "PV CephFS deprecation warning",
|
||||
template: &api.PersistentVolume{
|
||||
Spec: api.PersistentVolumeSpec{
|
||||
PersistentVolumeSource: api.PersistentVolumeSource{
|
||||
CephFS: &api.CephFSPersistentVolumeSource{
|
||||
Monitors: nil,
|
||||
Path: "",
|
||||
User: "",
|
||||
SecretFile: "",
|
||||
SecretRef: nil,
|
||||
ReadOnly: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: []string{
|
||||
`spec.persistentVolumeSource.cephfs: deprecated in v1.28, non-functional in v1.31+`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
|
@ -160,6 +160,9 @@ func warningsForPodSpecAndMeta(fieldPath *field.Path, podSpec *api.PodSpec, meta
|
||||
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)...)
|
||||
}
|
||||
if v.CephFS != nil {
|
||||
warnings = append(warnings, fmt.Sprintf("%s: deprecated in v1.28, non-functional in v1.31+", fieldPath.Child("spec", "volumes").Index(i).Child("cephfs")))
|
||||
}
|
||||
}
|
||||
|
||||
// duplicate hostAliases (#91670, #58477)
|
||||
|
@ -214,7 +214,16 @@ func TestWarnings(t *testing.T) {
|
||||
}},
|
||||
},
|
||||
expected: []string{`spec.volumes[0].glusterfs: deprecated in v1.25, non-functional in v1.26+`},
|
||||
}, {
|
||||
name: "CephFS",
|
||||
template: &api.PodTemplateSpec{Spec: api.PodSpec{
|
||||
Volumes: []api.Volume{
|
||||
{Name: "s", VolumeSource: api.VolumeSource{CephFS: &api.CephFSVolumeSource{}}},
|
||||
}},
|
||||
},
|
||||
expected: []string{`spec.volumes[0].cephfs: deprecated in v1.28, non-functional in v1.31+`},
|
||||
},
|
||||
|
||||
{
|
||||
name: "duplicate hostAlias",
|
||||
template: &api.PodTemplateSpec{Spec: api.PodSpec{
|
||||
|
Loading…
Reference in New Issue
Block a user