2019-01-01 08:23:01 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-05-09 22:05:51 +00:00
|
|
|
"os"
|
|
|
|
|
2019-08-10 05:07:43 +00:00
|
|
|
bindata "github.com/go-bindata/go-bindata"
|
2022-03-02 23:47:27 +00:00
|
|
|
v1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
|
2024-05-06 16:42:27 +00:00
|
|
|
controllergen "github.com/rancher/wrangler/v3/pkg/controller-gen"
|
|
|
|
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
|
2019-01-01 08:23:01 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2022-03-02 23:47:27 +00:00
|
|
|
basePackage = "github.com/k3s-io/k3s/types"
|
2019-01-01 08:23:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-05-09 22:05:51 +00:00
|
|
|
os.Unsetenv("GOPATH")
|
2019-01-09 16:54:15 +00:00
|
|
|
bc := &bindata.Config{
|
|
|
|
Input: []bindata.InputConfig{
|
|
|
|
{
|
|
|
|
Path: "build/data",
|
|
|
|
Recursive: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Package: "data",
|
|
|
|
NoCompress: true,
|
|
|
|
NoMemCopy: true,
|
|
|
|
NoMetadata: true,
|
|
|
|
Output: "pkg/data/zz_generated_bindata.go",
|
|
|
|
}
|
|
|
|
if err := bindata.Translate(bc); err != nil {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
2019-01-22 21:14:58 +00:00
|
|
|
|
|
|
|
bc = &bindata.Config{
|
|
|
|
Input: []bindata.InputConfig{
|
|
|
|
{
|
2019-11-05 21:30:50 +00:00
|
|
|
Path: "manifests",
|
|
|
|
Recursive: true,
|
2019-01-22 21:14:58 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
Package: "deploy",
|
|
|
|
NoMetadata: true,
|
|
|
|
Prefix: "manifests/",
|
|
|
|
Output: "pkg/deploy/zz_generated_bindata.go",
|
2020-09-11 21:51:45 +00:00
|
|
|
Tags: "!no_stage",
|
2019-01-22 21:14:58 +00:00
|
|
|
}
|
|
|
|
if err := bindata.Translate(bc); err != nil {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
|
2019-03-20 00:21:49 +00:00
|
|
|
bc = &bindata.Config{
|
|
|
|
Input: []bindata.InputConfig{
|
|
|
|
{
|
|
|
|
Path: "build/static",
|
|
|
|
Recursive: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Package: "static",
|
|
|
|
NoMetadata: true,
|
|
|
|
Prefix: "build/static/",
|
|
|
|
Output: "pkg/static/zz_generated_bindata.go",
|
2020-09-11 21:51:45 +00:00
|
|
|
Tags: "!no_stage",
|
2019-03-20 00:21:49 +00:00
|
|
|
}
|
|
|
|
if err := bindata.Translate(bc); err != nil {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
|
2019-05-09 22:05:51 +00:00
|
|
|
controllergen.Run(args.Options{
|
2022-03-02 23:47:27 +00:00
|
|
|
OutputPackage: "github.com/k3s-io/k3s/pkg/generated",
|
2019-05-09 22:05:51 +00:00
|
|
|
Boilerplate: "scripts/boilerplate.go.txt",
|
|
|
|
Groups: map[string]args.Group{
|
|
|
|
"k3s.cattle.io": {
|
|
|
|
Types: []interface{}{
|
|
|
|
v1.Addon{},
|
2023-09-08 16:35:14 +00:00
|
|
|
v1.ETCDSnapshotFile{},
|
2019-05-09 22:05:51 +00:00
|
|
|
},
|
2021-07-03 08:37:19 +00:00
|
|
|
GenerateTypes: true,
|
|
|
|
GenerateClients: true,
|
2019-05-09 22:05:51 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2019-01-01 08:23:01 +00:00
|
|
|
}
|