@@ -22,7 +22,6 @@ import (
22
22
"k8s.io/apimachinery/pkg/runtime/schema"
23
23
"k8s.io/kube-openapi/pkg/schemaconv"
24
24
"k8s.io/kube-openapi/pkg/util/proto"
25
- smdschema "sigs.k8s.io/structured-merge-diff/schema"
26
25
"sigs.k8s.io/structured-merge-diff/typed"
27
26
)
28
27
@@ -49,7 +48,6 @@ func newGVKParser(models proto.Models) (*gvkParser, error) {
49
48
if err != nil {
50
49
return nil , fmt .Errorf ("failed to convert models to schema: %v" , err )
51
50
}
52
- typeSchema = makeRawExtensionUntyped (typeSchema )
53
51
parser := gvkParser {
54
52
gvks : map [schema.GroupVersionKind ]string {},
55
53
}
@@ -120,20 +118,3 @@ func parseGroupVersionKind(s proto.Schema) []schema.GroupVersionKind {
120
118
121
119
return gvkListResult
122
120
}
123
-
124
- // makeRawExtensionUntyped explicitly sets RawExtension's type in the schema to Untyped atomic
125
- // TODO: remove this once kube-openapi is updated to include
126
- // https://github.com/kubernetes/kube-openapi/pull/133
127
- func makeRawExtensionUntyped (s * smdschema.Schema ) * smdschema.Schema {
128
- s2 := & smdschema.Schema {}
129
- for _ , t := range s .Types {
130
- t2 := t
131
- if t2 .Name == "io.k8s.apimachinery.pkg.runtime.RawExtension" {
132
- t2 .Atom = smdschema.Atom {
133
- Untyped : & smdschema.Untyped {},
134
- }
135
- }
136
- s2 .Types = append (s2 .Types , t2 )
137
- }
138
- return s2
139
- }
0 commit comments