forked from openshift/machine-api-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#257 from ingvagabund/generate-crds
Generate crds
- Loading branch information
Showing
70 changed files
with
12,431 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
echo "Building controller-gen tool..." | ||
go build -o bin/controller-gen github.com/openshift/machine-api-operator/vendor/sigs.k8s.io/controller-tools/cmd/controller-gen | ||
|
||
dir=$(mktemp -d -t XXXXXXXX) | ||
echo $dir | ||
mkdir -p $dir/src/github.com/openshift/machine-api-operator/pkg/apis | ||
mkdir -p $dir/src/github.com/openshift/machine-api-operator/vendor | ||
|
||
cp -r pkg/apis/healthchecking $dir/src/github.com/openshift/machine-api-operator/pkg/apis/. | ||
cp -r vendor/github.com/openshift/cluster-api/pkg/apis/machine $dir/src/github.com/openshift/machine-api-operator/pkg/apis | ||
# Some dependencies need to be coppied as well. Othwerwise, controller-gen will complain about non-existing kind Unsupported | ||
cp -r vendor/k8s.io $dir/src/github.com/openshift/machine-api-operator/vendor/. | ||
cp -r vendor/github.com $dir/src/github.com/openshift/machine-api-operator/vendor/. | ||
|
||
cwd=$(pwd) | ||
pushd $dir/src/github.com/openshift/machine-api-operator | ||
GOPATH=$dir ${cwd}/bin/controller-gen crd --domain openshift.io | ||
popd | ||
|
||
echo "Coping generated CRDs" | ||
cp $dir/src/github.com/openshift/machine-api-operator/config/crds/healthchecking_v1alpha1_machinehealthcheck.yaml install/0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml | ||
cp $dir/src/github.com/openshift/machine-api-operator/config/crds/machine_v1beta1_machinedeployment.yaml install/0000_30_machine-api-operator_04_machinedeployment.crd.yaml | ||
cp $dir/src/github.com/openshift/machine-api-operator/config/crds/machine_v1beta1_machineset.yaml install/0000_30_machine-api-operator_03_machineset.crd.yaml | ||
cp $dir/src/github.com/openshift/machine-api-operator/config/crds/machine_v1beta1_machine.yaml install/0000_30_machine-api-operator_02_machine.crd.yaml | ||
|
||
rm -rf $dir |
Oops, something went wrong.