diff --git a/apis/project.cattle.io/v3/schema/schema.go b/apis/project.cattle.io/v3/schema/schema.go index 47257af5..ef12f588 100644 --- a/apis/project.cattle.io/v3/schema/schema.go +++ b/apis/project.cattle.io/v3/schema/schema.go @@ -584,7 +584,6 @@ func addServiceOrDNSRecord(dns bool) types.SchemasInitFunc { schemas = schemas. AddMapperForType(&Version, v1.ServiceSpec{}, &m.Move{From: "externalName", To: "hostname"}, - &ServiceSpecMapper{}, &m.Move{From: "type", To: "serviceKind"}, &m.SetValue{ Field: "clusterIP", diff --git a/apis/project.cattle.io/v3/schema/service_spec_mapper.go b/apis/project.cattle.io/v3/schema/service_spec_mapper.go deleted file mode 100644 index 31bb1044..00000000 --- a/apis/project.cattle.io/v3/schema/service_spec_mapper.go +++ /dev/null @@ -1,32 +0,0 @@ -package schema - -import ( - "github.com/rancher/norman/types" - "github.com/rancher/norman/types/convert" -) - -type ServiceSpecMapper struct { -} - -func (e ServiceSpecMapper) FromInternal(data map[string]interface{}) { -} - -func (e ServiceSpecMapper) ToInternal(data map[string]interface{}) error { - if data == nil { - return nil - } - - if convert.IsAPIObjectEmpty(data["hostname"]) { - data["type"] = "ClusterIP" - data["clusterIP"] = "None" - } else { - data["type"] = "ExternalName" - data["clusterIP"] = "" - } - - return nil -} - -func (e ServiceSpecMapper) ModifySchema(schema *types.Schema, schemas *types.Schemas) error { - return nil -}