Skip to content

Commit

Permalink
Merge pull request #968 from wzshiming/clean/old-config
Browse files Browse the repository at this point in the history
Remove old config
  • Loading branch information
wzshiming authored Feb 18, 2024
2 parents b8917ec + ef34a11 commit 7cd0f4f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 150 deletions.
129 changes: 0 additions & 129 deletions pkg/config/compatibility/compatibility.go

This file was deleted.

21 changes: 0 additions & 21 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
configv1alpha1 "sigs.k8s.io/kwok/pkg/apis/config/v1alpha1"
"sigs.k8s.io/kwok/pkg/apis/internalversion"
"sigs.k8s.io/kwok/pkg/apis/v1alpha1"
"sigs.k8s.io/kwok/pkg/config/compatibility"
"sigs.k8s.io/kwok/pkg/log"
"sigs.k8s.io/kwok/pkg/utils/file"
"sigs.k8s.io/kwok/pkg/utils/maps"
Expand Down Expand Up @@ -289,26 +288,6 @@ func Load(ctx context.Context, src ...string) ([]InternalObject, error) {

gvk := meta.GroupVersionKind()

// Converting old configurations to the latest
// TODO: Remove this in the future
if gvk.Version == "" && gvk.Group == "" && gvk.Kind == "" {
conf := compatibility.Config{}
err = json.Unmarshal(raw, &conf)
if err != nil {
logger.Error("Unsupported config", err,
"src", src,
)
continue
}
obj, ok := compatibility.Convert_Config_To_internalversion_KwokctlConfiguration(&conf)
if ok {
logger.Debug("Convert old config",
"src", src,
)
return []InternalObject{obj}, nil
}
}

handler, ok := configHandlers[gvk.Kind]
if !ok {
logger.Warn("Unsupported type",
Expand Down

0 comments on commit 7cd0f4f

Please sign in to comment.