update kube and vendor dependencies
With kubernetes 1.18 release of client-go, signatures on methods in generated clientsets, dynamic, metadata, and scale clients have been modified to accept context.Context as a first argument. Signatures of Create, Update, and Patch methods have been updated to accept CreateOptions, UpdateOptions and PatchOptions respectively. Signatures of Delete and DeleteCollection methods now accept DeleteOptions by value instead of by reference. These changes are now accommodated with this PR and client-go and dependencies are updated to v1.18.0 Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
34
vendor/k8s.io/gengo/parser/parse.go
generated
vendored
34
vendor/k8s.io/gengo/parser/parse.go
generated
vendored
@@ -227,12 +227,16 @@ func (b *Builder) AddDirRecursive(dir string) error {
|
||||
klog.Warningf("Ignoring directory %v: %v", dir, err)
|
||||
}
|
||||
|
||||
// filepath.Walk includes the root dir, but we already did that, so we'll
|
||||
// remove that prefix and rebuild a package import path.
|
||||
prefix := b.buildPackages[dir].Dir
|
||||
// filepath.Walk does not follow symlinks. We therefore evaluate symlinks and use that with
|
||||
// filepath.Walk.
|
||||
realPath, err := filepath.EvalSymlinks(b.buildPackages[dir].Dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fn := func(filePath string, info os.FileInfo, err error) error {
|
||||
if info != nil && info.IsDir() {
|
||||
rel := filepath.ToSlash(strings.TrimPrefix(filePath, prefix))
|
||||
rel := filepath.ToSlash(strings.TrimPrefix(filePath, realPath))
|
||||
if rel != "" {
|
||||
// Make a pkg path.
|
||||
pkg := path.Join(string(canonicalizeImportPath(b.buildPackages[dir].ImportPath)), rel)
|
||||
@@ -245,7 +249,7 @@ func (b *Builder) AddDirRecursive(dir string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if err := filepath.Walk(b.buildPackages[dir].Dir, fn); err != nil {
|
||||
if err := filepath.Walk(realPath, fn); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@@ -544,6 +548,10 @@ func (b *Builder) findTypesIn(pkgPath importPathString, u *types.Universe) error
|
||||
if ok && !tv.IsField() {
|
||||
b.addVariable(*u, nil, tv)
|
||||
}
|
||||
tconst, ok := obj.(*tc.Const)
|
||||
if ok {
|
||||
b.addConstant(*u, nil, tconst)
|
||||
}
|
||||
}
|
||||
|
||||
importedPkgs := []string{}
|
||||
@@ -774,7 +782,10 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t
|
||||
if out.Methods == nil {
|
||||
out.Methods = map[string]*types.Type{}
|
||||
}
|
||||
out.Methods[t.Method(i).Name()] = b.walkType(u, nil, t.Method(i).Type())
|
||||
method := t.Method(i)
|
||||
mt := b.walkType(u, nil, method.Type())
|
||||
mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text())
|
||||
out.Methods[method.Name()] = mt
|
||||
}
|
||||
}
|
||||
return out
|
||||
@@ -811,6 +822,17 @@ func (b *Builder) addVariable(u types.Universe, useName *types.Name, in *tc.Var)
|
||||
return out
|
||||
}
|
||||
|
||||
func (b *Builder) addConstant(u types.Universe, useName *types.Name, in *tc.Const) *types.Type {
|
||||
name := tcVarNameToName(in.String())
|
||||
if useName != nil {
|
||||
name = *useName
|
||||
}
|
||||
out := u.Constant(name)
|
||||
out.Kind = types.DeclarationOf
|
||||
out.Underlying = b.walkType(u, nil, in.Type())
|
||||
return out
|
||||
}
|
||||
|
||||
// canonicalizeImportPath takes an import path and returns the actual package.
|
||||
// It doesn't support nested vendoring.
|
||||
func canonicalizeImportPath(importPath string) importPathString {
|
||||
|
Reference in New Issue
Block a user