mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
update the apply generator to use the same package the the client generator expects
This commit is contained in:
parent
e643b0e667
commit
06497aa13c
@ -30,6 +30,7 @@ import (
|
|||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
|
|
||||||
applygenargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args"
|
applygenargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args"
|
||||||
|
"k8s.io/code-generator/cmd/client-gen/generators/util"
|
||||||
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
clientgentypes "k8s.io/code-generator/cmd/client-gen/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -236,8 +237,10 @@ func packageTypesForInputDirs(context *generator.Context, inputDirs []string, ou
|
|||||||
klog.Warningf("Skipping internal package: %s", p.Path)
|
klog.Warningf("Skipping internal package: %s", p.Path)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
gv := groupVersion(p)
|
// this is how the client generator finds the package we are creating. It uses the API package name, not the group name.
|
||||||
pkg := filepath.Join(outputPath, gv.Group.PackageName(), strings.ToLower(gv.Version.NonEmpty()))
|
_, gvPackageString := util.ParsePathGroupVersion(p.Path)
|
||||||
|
|
||||||
|
pkg := filepath.Join(outputPath, strings.ToLower(gvPackageString))
|
||||||
pkgTypes[pkg] = p
|
pkgTypes[pkg] = p
|
||||||
}
|
}
|
||||||
return pkgTypes
|
return pkgTypes
|
||||||
|
Loading…
Reference in New Issue
Block a user