Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing rbacs #54

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Add missing rbacs #54

merged 1 commit into from
Aug 12, 2024

Conversation

oshoval
Copy link
Collaborator

@oshoval oshoval commented Aug 11, 2024

What this PR does / why we need it:
Lately blockOwnerDeletion was added (finalizer fix PR).
On OpenShift there is an additional protection, that setting blockOwnerDeletion requires
to be able to set finalizers on the owner.
The owner might be either VM or VMI.
Add the missing rbacs.

2024-08-11T10:41:43Z	ERROR	Reconciler error	{"controller": "virtualmachineinstance", "controllerGroup": "kubevirt.io", "controllerKind": "VirtualMachineInstance", "VirtualMachineInstance": {"name":"vma-localnet-ipam-medium-pool","namespace":"localnet-ipam"}, "namespace": "localnet-ipam", "name": "vma-localnet-ipam-medium-pool", "reconcileID": "9d6cb8f1-87be-410b-8b92-3efce065cd2d", "error": "ipamclaims.k8s.cni.cncf.io \"vma-localnet-ipam-medium-pool.ipam-network\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:
https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement

Seems it will be good to enable OwnerReferencesPermissionEnforcement on kind,
ovn-org/ovn-kubernetes#4608
For now just used it to make sure i can simulate the bug on kind, and that this PR does solve it.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note:


@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Aug 11, 2024
@oshoval oshoval marked this pull request as ready for review August 11, 2024 10:46
@oshoval oshoval changed the title WIP: add missing rbacs Add missing rbacs Aug 11, 2024
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2024
@oshoval
Copy link
Collaborator Author

oshoval commented Aug 11, 2024

lanes failed due to backoff polling quay.io/kubevirtci/alpine-container-disk-demo:devel_alt
which is weird

/retest

@oshoval
Copy link
Collaborator Author

oshoval commented Aug 11, 2024

clean main is also broken #55

@oshoval
Copy link
Collaborator Author

oshoval commented Aug 11, 2024

seems #56 fix main branch state
(well at least some tests passed there and didnt before, lets wait for it to finish)

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2024
@oshoval
Copy link
Collaborator Author

oshoval commented Aug 12, 2024

Thanks Miguel, we would need please #56 first as it blocks the whole CI on this repo
EDIT - we would also need /approve please

Lately blockOwnerDeletion was added (finalizer fix PR).
On OpenShift there is an additional protection, that setting blockOwnerDeletion requires
to be able to set finalizers on the owner.
The owner might be either VM or VMI.
Add the missing rbacs.

Signed-off-by: Or Shoval <oshoval@redhat.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2024
@oshoval
Copy link
Collaborator Author

oshoval commented Aug 12, 2024

rebased to take the main branch fix

@oshoval oshoval requested a review from maiqueb August 12, 2024 07:54
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2024
@oshoval oshoval added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2024
@kubevirt-bot kubevirt-bot merged commit 31dd1cd into kubevirt:main Aug 12, 2024
4 checks passed
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants