Skip to content

Commit

Permalink
operator: generate deepcopy, rbac and crds
Browse files Browse the repository at this point in the history
This commit adds the controller-gen tool as a Bazel dep and adds the
equivalent of `make manifests` to //:generate.
  • Loading branch information
burgerdev committed Jan 22, 2024
1 parent f4276d3 commit f92823a
Show file tree
Hide file tree
Showing 8 changed files with 936 additions and 18 deletions.
2 changes: 2 additions & 0 deletions bazel/ci/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,12 @@ sh_template(
"//internal/attestation/measurements/measurement-generator",
"//internal/versions/hash-generator",
"@go_sdk//:bin/go",
"@io_k8s_sigs_controller_tools//cmd/controller-gen",
"@org_golang_x_tools//cmd/stringer",
"@yq_toolchains//:resolved_toolchain",
],
substitutions = {
"@@CONTROLLER_GEN@@": "$(rootpath @io_k8s_sigs_controller_tools//cmd/controller-gen)",
"@@DOCGEN@@": "$(rootpath :com_github_siderolabs_talos_hack_docgen)",
"@@GO@@": "$(rootpath @go_sdk//:bin/go)",
"@@HASH_GENERATOR@@": "$(rootpath //internal/versions/hash-generator:hash-generator)",
Expand Down
3 changes: 3 additions & 0 deletions bazel/ci/go_generate.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ measurement_generator=$(realpath @@MEASUREMENT_GENERATOR@@)
stat "${measurement_generator}" >> /dev/null
yq=$(realpath @@YQ@@)
stat "${yq}" >> /dev/null
controller_gen=$(realpath @@CONTROLLER_GEN@@)
stat "${controller_gen}" >> /dev/null

cd "${BUILD_WORKSPACE_DIRECTORY}"

Expand All @@ -37,6 +39,7 @@ PATH=$(dirname "${helm}"):${PATH}
PATH=$(dirname "${hash_generator}"):${PATH}
PATH=$(dirname "${measurement_generator}"):${PATH}
PATH=$(dirname "${yq}"):${PATH}
PATH=$(dirname "${controller_gen}"):${PATH}
export PATH

submodules=$(${go} list -f '{{.Dir}}' -m)
Expand Down
Loading

0 comments on commit f92823a

Please sign in to comment.