Quit RV controllers upon TEC recreation#237
Quit RV controllers upon TEC recreation#237Jakob-Naucke wants to merge 1 commit intotrusted-execution-clusters:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Jakob-Naucke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Approved images are a bit independent from TEC, so I think they could be created head
We can debate a bit on this. But I think ApprovedImages can be defined by the cluster admin manually or by another operator so they shouldn't be cleaned up by our operator. Although, in the test probably they remain |
|
I think we need to review if the approved image should be owned by TEC. I personally don't think so anymore. Then, I don't think this solution is required |
is a quirk of this fix, not an existing one because the watcher should quit on TEC deletion not on recreation. converting to draft.
|
to prevent racing of controllers on server side apply. Skip computation on creation if no new TEC exists yet (cannot quit ApprovedImage controller on TEC deletion as its finalizer must still run). Add a test case (includes small refactoring for constants and imports). Fixes: trusted-execution-clusters#216 Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: Claude
|
Updated, back out of draft. Watcher should not quit on TEC deletion because it won't be able to remove the finalizer, instead, do not attempt computation on addition if no TEC present. @alicefr PTAL or delay that look until after CI revival if you prefer |
d453991 to
36414af
Compare
@Jakob-Naucke why do we need TEC for the computation? Is because the image of compute PCR is there? |
|
Indeed, the image-pcrs configmap is owned by the TEC object, so the computed PCRs have nowhere to go without a TEC present |
|
Then maybe we could prioritize this #215 , and make approved images independent from the TEC CR UPDATE: what if we just create the configmap independently of TEC and then let adopted by TEC CR when created |
|
In general, I think it is easier to react when objects are created rather the retroactively. Otherwise, we need a way to understand when the approved images existed but they weren't calculated yet |
|
@Jakob-Naucke: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Closing in favour of #246 |
to prevent racing of controllers on server side apply
Fixes: #216
@alicefr quirks discovered, lmk if they should be bugs: