Skip to content

Commit

Permalink
Add deprecation warning of removing scheduler CC v1beta3
Browse files Browse the repository at this point in the history
Signed-off-by: kerthcet <kerthcet@gmail.com>
  • Loading branch information
kerthcet committed Sep 7, 2022
1 parent 532d1df commit 700065a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/kube-scheduler/app/options/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ func loadConfig(data []byte) (*config.KubeSchedulerConfiguration, error) {
// conversion. See KubeSchedulerConfiguration internal type definition for
// more details.
cfgObj.TypeMeta.APIVersion = gvk.GroupVersion().String()
if cfgObj.TypeMeta.APIVersion == configv1beta2.SchemeGroupVersion.String() {
switch cfgObj.TypeMeta.APIVersion {
case configv1beta2.SchemeGroupVersion.String():
klog.InfoS("KubeSchedulerConfiguration v1beta2 is deprecated in v1.25, will be removed in v1.28")
case configv1beta3.SchemeGroupVersion.String():
klog.InfoS("KubeSchedulerConfiguration v1beta3 is deprecated in v1.26, will be removed in v1.29")
}
return cfgObj, nil
}
Expand Down

0 comments on commit 700065a

Please sign in to comment.