deprecate CephFS plugin from available in-tree drivers.
https://groups.google.com/a/kubernetes.io/g/dev/c/g8rwL-qnQhk based on above, the consensus was to start the deprecation in v1.28. This commit start the deprecation process of CephFS plugin from in-tree drivers. Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
This commit is contained in:
		| @@ -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{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Humble Chirammal
					Humble Chirammal