File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "os"
5
+
6
+ v1 "github.com/rancher/system-upgrade-controller/pkg/apis/upgrade.cattle.io/v1"
7
+ _ "github.com/rancher/system-upgrade-controller/pkg/generated/controllers/upgrade.cattle.io/v1"
8
+ "github.com/rancher/wrangler/pkg/crd"
9
+ )
10
+
11
+ func main () {
12
+ plan := crd .NamespacedType ("Plan.upgrade.cattle.io/v1" ).
13
+ WithSchemaFromStruct (v1.Plan {}).
14
+ WithColumn ("Image" , ".spec.upgrade.image" ).
15
+ WithColumn ("Channel" , ".spec.channel" ).
16
+ WithColumn ("Version" , ".spec.version" )
17
+ crd .Print (os .Stdout , []crd.CRD {plan })
18
+ }
Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ if [ "$ARCH" = "amd64" ]; then
35
35
trap reset-kustomization EXIT
36
36
kustomize edit set image " rancher/system-upgrade-controller=${REPO} /system-upgrade-controller:${VERSION} "
37
37
kustomize build --reorder=none --output ./dist/artifacts/system-upgrade-controller.yaml
38
+ go run hack/crdgen.go > ./dist/artifacts/crd.yaml
38
39
fi
You can’t perform that action at this time.
0 commit comments