Skip to content

Commit

Permalink
Updating kodata/release.yaml to v0.13.0 release version
Browse files Browse the repository at this point in the history
We currently have a v0.12.x version in-tree which includes
the webhook rolebindings. We are updating the
`kodata/release.yaml`
with the latest v0.13.0 release.

Signed-off by : Ayush Satyam<[email protected]>
  • Loading branch information
ayushsatyam146 committed Jun 7, 2024
1 parent 40e98ba commit fcca417
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 112 deletions.
4 changes: 3 additions & 1 deletion controllers/shipwrightbuild_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,14 @@ func (r *ShipwrightBuildReconciler) Reconcile(ctx context.Context, req ctrl.Requ
return RequeueWithError(err)
}

// Builds 0.12.0 created a ClusterRole and ClusterRolebinding for the Build API conversion webhook.
// These were removed in v0.13.0 - when upgrading, these should be removed if present.
err = deleteObjectsIfPresent(ctx, r.Client, []client.Object{
&rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "shipwright-build-webhook"}},
&rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "shipwright-build-webhook"}},
})
if err != nil {
logger.Error(err, "deleting'shipwright-build-webhook' role and cluster role binding")
logger.Error(err, "deleting shipwright-build-webhook ClusterRole and ClusterRoleBinding")
return RequeueWithError(err)
}

Expand Down
Loading

0 comments on commit fcca417

Please sign in to comment.