mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #54600 from marun/enable-federation-vendoring
Automatic merge from submit-queue (batch tested with PRs 54081, 54271, 51783, 54600, 54594). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update to latest kube-openapi and kazel - update vendored kube-openapi to include https://github.com/kubernetes/kube-openapi/pull/14 - update hash of repo infra used for bazel generation so kazel includes https://github.com/kubernetes/repo-infra/pull/48 This is the final step in enabling federation to generate openapi code for itself and vendored kube (#54335). /sig multicluster testing
This commit is contained in:
commit
3f5f9c3df9
14
Godeps/Godeps.json
generated
14
Godeps/Godeps.json
generated
@ -3069,31 +3069,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/utils/exec",
|
"ImportPath": "k8s.io/utils/exec",
|
||||||
|
@ -36,7 +36,7 @@ rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
|
|||||||
# The git commit sha1s here should match the values in $KUBE_ROOT/WORKSPACE.
|
# The git commit sha1s here should match the values in $KUBE_ROOT/WORKSPACE.
|
||||||
kube::util::go_install_from_commit \
|
kube::util::go_install_from_commit \
|
||||||
github.com/kubernetes/repo-infra/kazel \
|
github.com/kubernetes/repo-infra/kazel \
|
||||||
e26fc85d14a1d3dc25569831acc06919673c545a
|
ae4e9a3906ace4ba657b7a09242610c6266e832c
|
||||||
kube::util::go_install_from_commit \
|
kube::util::go_install_from_commit \
|
||||||
github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle \
|
github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle \
|
||||||
c72631a220406c4fae276861ee286aaec82c5af2
|
c72631a220406c4fae276861ee286aaec82c5af2
|
||||||
|
2
staging/src/k8s.io/api/Godeps/Godeps.json
generated
2
staging/src/k8s.io/api/Godeps/Godeps.json
generated
@ -216,7 +216,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
|
@ -1548,19 +1548,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||||
|
@ -216,7 +216,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
8
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
8
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
@ -1608,19 +1608,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/client-go/discovery",
|
"ImportPath": "k8s.io/client-go/discovery",
|
||||||
|
2
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
2
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
@ -692,7 +692,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -252,11 +252,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1536,23 +1536,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
2
staging/src/k8s.io/metrics/Godeps/Godeps.json
generated
2
staging/src/k8s.io/metrics/Godeps/Godeps.json
generated
@ -520,7 +520,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1524,19 +1524,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -940,7 +940,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
21
vendor/k8s.io/kube-openapi/pkg/generators/openapi.go
generated
vendored
21
vendor/k8s.io/kube-openapi/pkg/generators/openapi.go
generated
vendored
@ -118,17 +118,32 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
|||||||
|
|
||||||
`)...)
|
`)...)
|
||||||
|
|
||||||
if err := context.AddDir(arguments.OutputPackagePath); err != nil {
|
outputPath := arguments.OutputPackagePath
|
||||||
|
|
||||||
|
if err := context.AddDir(outputPath); err != nil {
|
||||||
glog.Fatalf("Failed to load output package: %v", err)
|
glog.Fatalf("Failed to load output package: %v", err)
|
||||||
}
|
}
|
||||||
pkg := context.Universe[arguments.OutputPackagePath]
|
|
||||||
|
// Compute the canonical output path to allow retrieval of the
|
||||||
|
// package for a vendored output path.
|
||||||
|
const vendorPath = "/vendor/"
|
||||||
|
canonicalOutputPath := outputPath
|
||||||
|
if strings.Contains(outputPath, vendorPath) {
|
||||||
|
canonicalOutputPath = outputPath[strings.Index(outputPath, vendorPath)+len(vendorPath):]
|
||||||
|
}
|
||||||
|
|
||||||
|
// The package for outputPath is mapped to the canonical path
|
||||||
|
pkg := context.Universe[canonicalOutputPath]
|
||||||
if pkg == nil {
|
if pkg == nil {
|
||||||
glog.Fatalf("Got nil output package: %v", err)
|
glog.Fatalf("Got nil output package: %v", err)
|
||||||
}
|
}
|
||||||
return generator.Packages{
|
return generator.Packages{
|
||||||
&generator.DefaultPackage{
|
&generator.DefaultPackage{
|
||||||
PackageName: strings.Split(filepath.Base(pkg.Path), ".")[0],
|
PackageName: strings.Split(filepath.Base(pkg.Path), ".")[0],
|
||||||
PackagePath: pkg.Path,
|
// Use the supplied output path rather than the canonical
|
||||||
|
// one to allow generation into the path of a
|
||||||
|
// vendored package.
|
||||||
|
PackagePath: outputPath,
|
||||||
HeaderText: header,
|
HeaderText: header,
|
||||||
GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) {
|
GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) {
|
||||||
return []generator.Generator{NewOpenAPIGen(arguments.OutputFileBaseName, pkg, context)}
|
return []generator.Generator{NewOpenAPIGen(arguments.OutputFileBaseName, pkg, context)}
|
||||||
|
Loading…
Reference in New Issue
Block a user