go.*: Update k8s packages

- update k8s client_go
 - update k8s apiextensions-apiserver
 - update k8s controller-tools

Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
leonnicolas
2022-04-23 11:01:19 +02:00
parent e20d13ace0
commit 3eaacc01ae
762 changed files with 58552 additions and 14514 deletions

View File

@@ -864,6 +864,8 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) {
sw.Do("in, out := &in.$.name$, &out.$.name$\n", args)
g.generateFor(ft, sw)
sw.Do("}\n", nil)
case uft.Kind == types.Array:
sw.Do("out.$.name$ = in.$.name$\n", args)
case uft.Kind == types.Struct:
if ft.IsAssignable() {
sw.Do("out.$.name$ = in.$.name$\n", args)

11
vendor/k8s.io/gengo/namer/namer.go generated vendored
View File

@@ -17,7 +17,9 @@ limitations under the License.
package namer
import (
"fmt"
"path/filepath"
"strconv"
"strings"
"k8s.io/gengo/types"
@@ -246,6 +248,12 @@ func (ns *NameStrategy) Name(t *types.Type) string {
"Slice",
ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix)
case types.Array:
name = ns.Join(ns.Prefix, []string{
"Array",
ns.removePrefixAndSuffix(fmt.Sprintf("%d", t.Len)),
ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix)
case types.Pointer:
name = ns.Join(ns.Prefix, []string{
"Pointer",
@@ -340,6 +348,9 @@ func (r *rawNamer) Name(t *types.Type) string {
name = "map[" + r.Name(t.Key) + "]" + r.Name(t.Elem)
case types.Slice:
name = "[]" + r.Name(t.Elem)
case types.Array:
l := strconv.Itoa(int(t.Len))
name = "[" + l + "]" + r.Name(t.Elem)
case types.Pointer:
name = "*" + r.Name(t.Elem)
case types.Struct:

View File

@@ -723,8 +723,7 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t
}
out.Kind = types.Array
out.Elem = b.walkType(u, nil, t.Elem())
// TODO: need to store array length, otherwise raw type name
// cannot be properly written.
out.Len = in.(*tc.Array).Len()
return out
case *tc.Chan:
out := u.Type(name)

12
vendor/k8s.io/gengo/types/types.go generated vendored
View File

@@ -83,11 +83,13 @@ const (
// Interface is any type that could have differing types at run time.
Interface Kind = "Interface"
// Array is just like slice, but has a fixed length.
Array Kind = "Array"
// The remaining types are included for completeness, but are not well
// supported.
Array Kind = "Array" // Array is just like slice, but has a fixed length.
Chan Kind = "Chan"
Func Kind = "Func"
Chan Kind = "Chan"
Func Kind = "Func"
// DeclarationOf is different from other Kinds; it indicates that instead of
// representing an actual Type, the type is a declaration of an instance of
@@ -350,7 +352,9 @@ type Type struct {
// TODO: Add:
// * channel direction
// * array length
// If Kind == Array
Len int64
}
// String returns the name of the type.