Drop non-preferred version and version in the schema id

This commit is contained in:
Darren Shepherd
2020-03-10 23:12:04 -07:00
parent 39ae8e9c14
commit 0ad6c2aba1
16 changed files with 292 additions and 49 deletions

View File

@@ -5,7 +5,6 @@ import (
"github.com/rancher/steve/pkg/attributes"
"github.com/rancher/steve/pkg/schema"
"github.com/rancher/steve/pkg/schemaserver/types"
runtimeschema "k8s.io/apimachinery/pkg/runtime/schema"
)
func k8sAPI(sf schema.Factory, apiOp *types.APIRequest) {
@@ -16,11 +15,7 @@ func k8sAPI(sf schema.Factory, apiOp *types.APIRequest) {
}
apiOp.Name = vars["name"]
apiOp.Type = sf.ByGVR(runtimeschema.GroupVersionResource{
Version: vars["version"],
Group: group,
Resource: vars["resource"],
})
apiOp.Type = vars["type"]
nOrN := vars["nameorns"]
if nOrN != "" {