Add all extra_pkgs needed by main API types to validation-gen

This commit is contained in:
Joe Betz
2025-03-06 19:45:17 -05:00
parent 3a812ec464
commit 9765fe4abb
2 changed files with 13 additions and 4 deletions

View File

@@ -430,8 +430,16 @@ function codegen::validation() {
tag_pkgs+=("./$dir")
done
# This list needs to cover all of the types used transitively from the
# main API types. Validations defined on types in these packages will be
# used, but not regenerated, unless they are also listed as a "regular"
# input on the command-line.
local extra_pkgs=(
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/runtime
k8s.io/apimachinery/pkg/types
k8s.io/apimachinery/pkg/util/intstr
)
kube::log::status "Generating validation code for ${#tag_pkgs[@]} targets"