warnning on relaim policy when it is Recycle

This commit is contained in:
carlory
2023-12-15 17:50:37 +08:00
parent 1a1941eebb
commit 85d08833bf
2 changed files with 15 additions and 0 deletions

View File

@@ -174,6 +174,17 @@ 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: "PersistentVolumeReclaimRecycle deprecation warning",
template: &api.PersistentVolume{
Spec: api.PersistentVolumeSpec{
PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimRecycle,
},
},
expected: []string{
`spec.persistentVolumeReclaimPolicy: The Recycle reclaim policy is deprecated. Instead, the recommended approach is to use dynamic provisioning.`,
},
},
{
name: "PV CephFS deprecation warning",
template: &api.PersistentVolume{