Upgrade k8s package verison (#5358)

* upgrade k8s package version

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>

* Script upgrade and code formatting.

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
hongzhouzi
2022-11-15 14:56:38 +08:00
committed by GitHub
parent 5f91c1663a
commit 44167aa47a
3106 changed files with 321340 additions and 172080 deletions

View File

@@ -167,6 +167,20 @@ func (c *convert) makeRef(model proto.Schema, preserveUnknownFields bool) schema
// reference a named type
_, n := path.Split(r.Reference())
tr.NamedType = &n
ext := model.GetExtensions()
if val, ok := ext["x-kubernetes-map-type"]; ok {
switch val {
case "atomic":
relationship := schema.Atomic
tr.ElementRelationship = &relationship
case "granular":
relationship := schema.Separable
tr.ElementRelationship = &relationship
default:
c.reportError("unknown map type %v", val)
}
}
} else {
// compute the type inline
c2 := c.push("inlined in "+c.currentName, &tr.Inlined)
@@ -449,10 +463,7 @@ func (c *convert) VisitPrimitive(p *proto.Primitive) {
}
func (c *convert) VisitArbitrary(a *proto.Arbitrary) {
*c.top() = untypedDef.Atom
if c.preserveUnknownFields {
*c.top() = deducedDef.Atom
}
*c.top() = deducedDef.Atom
}
func (c *convert) VisitReference(proto.Reference) {