Skip to content

Commit 5f0e408

Browse files
authored
Adapt release generator to controller-gen 0.14.0 new format (#500)
Since controller-tools v0.12.0 release - the `controller-gen` binary no longer injects a null creation timestamp in the CRDs, RBACs and webhooks. This slightly impacts our code generation process. This patch fixes a bug that started triming the `rules` directive from generated RBACs Signed-off-by: Amine Hilaly <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 20a46eb commit 5f0e408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build-controller-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ controller-gen rbac:roleName="$K8S_RBAC_ROLE_NAME" paths=./... output:rbac:artif
255255
# this will leave us the rules section of the role.yaml file. We then append the rules section to the
256256
# _helpers-patch.yaml file which is a file that will be included in the _helpers.tpl file. This will
257257
# allow us to use the rules section in the _helpers.tpl file to generate the correct role/clusterrole.
258-
tail -n +7 "$helm_output_dir/templates/role.yaml" > "$helm_output_dir/templates/_helpers-patch.yaml"
258+
tail -n +6 "$helm_output_dir/templates/role.yaml" > "$helm_output_dir/templates/_helpers-patch.yaml"
259259
helpers_patch_path="$helm_output_dir/templates/_helpers-patch.yaml"
260260

261261
# Some sed-fu to fill the "controller-role-rules" section. Urgh.

0 commit comments

Comments
 (0)