mirror of https://github.com/k3s-io/k3s
Update vendored kube-openapi to latest
parent
54295026bf
commit
fae7a7a1e3
|
@ -3084,31 +3084,31 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/utils/exec",
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||
|
|
|
@ -1548,19 +1548,19 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1608,19 +1608,19 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/discovery",
|
||||
|
|
|
@ -692,7 +692,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -252,11 +252,11 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/generators",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1536,23 +1536,23 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/aggregator",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1524,19 +1524,19 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/builder",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/handler",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -940,7 +940,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "89ae48fe8691077463af5b7fb3b6f194632c5946"
|
||||
"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
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 {
|
||||
glog.Fatalf("Got nil output package: %v", err)
|
||||
}
|
||||
return generator.Packages{
|
||||
&generator.DefaultPackage{
|
||||
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,
|
||||
GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) {
|
||||
return []generator.Generator{NewOpenAPIGen(arguments.OutputFileBaseName, pkg, context)}
|
||||
|
|
Loading…
Reference in New Issue