Skip to content

Commit 3038b25

Browse files
authored
Merge pull request #356 from DirectXMan12/feature/crd-v1
✨ CRD v1 support
2 parents d556e7d + 88a61ae commit 3038b25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5729
-5699
lines changed

.run-controller-gen.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# This builds and runs controller-gen in a particular context
4+
# it's the equivalent of `go run sigs.k8s.io/controller-tools/cmd/controller-gen`
5+
# if you could somehow do that without modifying your go.mod.
6+
7+
current_dir=$(pwd)
8+
if ! readlink -f . &>/dev/null; then
9+
echo "you're probably on OSX. Please install gnu readlink -- otherwise you're missing the most useful readlink flag."
10+
exit 1
11+
fi
12+
13+
cd $(dirname $(readlink -f ${BASH_SOURCE[0]}))
14+
go run -v -exec "./.run-in.sh ${current_dir} " ./cmd/controller-gen $@

.run-in.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
# run something in a directory
4+
# goes hand-in .run-controller-gen.sh
5+
6+
cd $1
7+
shift
8+
$@

0 commit comments

Comments
 (0)