@@ -8,23 +8,26 @@ go build -o bin/controller-gen github.com/openshift/machine-api-operator/vendor/
8
8
dir=$( mktemp -d -t XXXXXXXX)
9
9
echo $dir
10
10
mkdir -p $dir /src/github.com/openshift/machine-api-operator/pkg/apis
11
- mkdir -p $dir /src/github.com/openshift/machine-api-operator/vendor
12
11
13
12
cp -r pkg/apis/healthchecking $dir /src/github.com/openshift/machine-api-operator/pkg/apis/.
14
13
cp -r vendor/github.com/openshift/cluster-api/pkg/apis/machine $dir /src/github.com/openshift/machine-api-operator/pkg/apis
15
- # Some dependencies need to be coppied as well. Othwerwise, controller-gen will complain about non-existing kind Unsupported
16
- cp -r vendor/k8s.io $dir /src/github.com/openshift/machine-api-operator/vendor/.
17
- cp -r vendor/github.com $dir /src/github.com/openshift/machine-api-operator/vendor/.
14
+ # Some dependencies need to be copied as well. Othwerwise, controller-gen will complain about non-existing kind Unsupported
15
+ cp -r vendor $dir /src/github.com/openshift/machine-api-operator/
16
+ cp go.mod go.sum $dir /src/github.com/openshift/machine-api-operator/
18
17
19
18
cwd=$( pwd)
20
19
pushd $dir /src/github.com/openshift/machine-api-operator
21
- GOPATH=$dir ${cwd} /bin/controller-gen crd --domain openshift.io
20
+ GOPATH=$dir ${cwd} /bin/controller-gen crd \
21
+ paths=$dir /src/github.com/openshift/machine-api-operator/pkg/apis/... \
22
+ output:crd:dir=$dir /src/github.com/openshift/machine-api-operator/config/crds/
23
+
24
+ # ${cwd}/bin/controller-gen crd paths=$dir/src/github.com/openshift/machine-api-operator/pkg/apis/... output:crd:dir=$dir/src/github.com/openshift/machine-api-operator/config/crds/
22
25
popd
23
26
24
27
echo " Coping generated CRDs"
25
- 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
26
- cp $dir /src/github.com/openshift/machine-api-operator/config/crds/healthchecking_v1alpha1_machinedisruptionbudget .yaml install/0000_30_machine-api-operator_08_machinedisruptionbudget.crd.yaml
27
- 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
28
- 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
28
+ cp $dir /src/github.com/openshift/machine-api-operator/config/crds/healthchecking.openshift.io_machinehealthchecks .yaml install/0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml
29
+ cp $dir /src/github.com/openshift/machine-api-operator/config/crds/healthchecking.openshift.io_machinedisruptionbudgets .yaml install/0000_30_machine-api-operator_08_machinedisruptionbudget.crd.yaml
30
+ cp $dir /src/github.com/openshift/machine-api-operator/config/crds/machine.openshift.io_machinesets .yaml install/0000_30_machine-api-operator_03_machineset.crd.yaml
31
+ cp $dir /src/github.com/openshift/machine-api-operator/config/crds/machine.openshift.io_machines .yaml install/0000_30_machine-api-operator_02_machine.crd.yaml
29
32
30
33
rm -rf $dir
0 commit comments