Skip to content

Commit

Permalink
Add more debugging log on generating crd related code. (#6117)
Browse files Browse the repository at this point in the history
Signed-off-by: Lubron Zhan <[email protected]>
  • Loading branch information
lubronzhan authored Jan 23, 2024
1 parent 5c54c2b commit 3fa8ec4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions hack/actions/check-uncommitted-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ if git status -s ${TARGETS[@]} 2>&1 | grep -E -q '^\s+[MADRCU]'
then
echo Uncommitted changes in generated sources:
git status -s ${TARGETS[@]}
git --no-pager diff
exit 1
fi
3 changes: 3 additions & 0 deletions hack/generate-crd-deepcopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ readonly HEADER=$(mktemp)

boilerplate > "${HEADER}"

exec echo "controller-gen version: "
exec go run sigs.k8s.io/controller-tools/cmd/controller-gen --version

exec go run sigs.k8s.io/controller-tools/cmd/controller-gen \
"object:headerFile=${HEADER}" \
"paths=${PATHS}"
3 changes: 3 additions & 0 deletions hack/generate-crd-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ trap 'rm -rf "$TEMPDIR"; exit' 0 1 2 15

cd "${REPO}"

echo "controller-gen version: "
go run sigs.k8s.io/controller-tools/cmd/controller-gen --version

# Controller-gen seems to use an unstable sort for the order of output of the CRDs
# so, output them to separate files, then concatenate those files.
# That should give a stable sort.
Expand Down
3 changes: 3 additions & 0 deletions hack/generate-rbac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ cat > "${REPO}/examples/contour/02-role-contour.yaml" <<EOF
# files and re-render.
EOF

echo "controller-gen version: "
go run sigs.k8s.io/controller-tools/cmd/controller-gen --version

go run sigs.k8s.io/controller-tools/cmd/controller-gen \
rbac:roleName=contour \
output:stdout \
Expand Down

0 comments on commit 3fa8ec4

Please sign in to comment.