kubeadm: mark v1beta2 as deprecated

This commit is contained in:
Paco Xu 2021-12-14 16:57:56 +08:00
parent 93d858c46e
commit 703f2a7b86
3 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,8 @@ limitations under the License.
// +k8s:deepcopy-gen=package // +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm // +k8s:conversion-gen=k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm
// Package v1beta2 has been DEPRECATED by v1beta3
//
// Package v1beta2 defines the v1beta2 version of the kubeadm configuration file format. // Package v1beta2 defines the v1beta2 version of the kubeadm configuration file format.
// This version improves on the v1beta1 format by fixing some minor issues and adding a few new fields. // This version improves on the v1beta1 format by fixing some minor issues and adding a few new fields.
// //

View File

@ -69,7 +69,9 @@ func validateSupportedVersion(gv schema.GroupVersion, allowDeprecated bool) erro
} }
// Deprecated API versions are supported by us, but can only be used for migration. // Deprecated API versions are supported by us, but can only be used for migration.
deprecatedAPIVersions := map[string]struct{}{} deprecatedAPIVersions := map[string]struct{}{
"kubeadm.k8s.io/v1beta2": {},
}
gvString := gv.String() gvString := gv.String()

View File

@ -73,6 +73,7 @@ func TestValidateSupportedVersion(t *testing.T) {
Group: KubeadmGroupName, Group: KubeadmGroupName,
Version: "v1beta2", Version: "v1beta2",
}, },
allowDeprecated: true,
}, },
{ {
gv: schema.GroupVersion{ gv: schema.GroupVersion{