Skip to content
Snippets Groups Projects
Commit bc2daa50 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson
Browse files

Add CRD manifest as build artifact

parent 2c588d56
No related branches found
No related tags found
No related merge requests found
package main
import (
"os"
v1 "github.com/rancher/system-upgrade-controller/pkg/apis/upgrade.cattle.io/v1"
_ "github.com/rancher/system-upgrade-controller/pkg/generated/controllers/upgrade.cattle.io/v1"
"github.com/rancher/wrangler/pkg/crd"
)
func main() {
plan := crd.NamespacedType("Plan.upgrade.cattle.io/v1").
WithSchemaFromStruct(v1.Plan{}).
WithColumn("Image", ".spec.upgrade.image").
WithColumn("Channel", ".spec.channel").
WithColumn("Version", ".spec.version")
crd.Print(os.Stdout, []crd.CRD{plan})
}
...@@ -35,4 +35,5 @@ if [ "$ARCH" = "amd64" ]; then ...@@ -35,4 +35,5 @@ if [ "$ARCH" = "amd64" ]; then
trap reset-kustomization EXIT trap reset-kustomization EXIT
kustomize edit set image "rancher/system-upgrade-controller=${REPO}/system-upgrade-controller:${VERSION}" kustomize edit set image "rancher/system-upgrade-controller=${REPO}/system-upgrade-controller:${VERSION}"
kustomize build --reorder=none --output ./dist/artifacts/system-upgrade-controller.yaml kustomize build --reorder=none --output ./dist/artifacts/system-upgrade-controller.yaml
go run hack/crdgen.go > ./dist/artifacts/crd.yaml
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment