Operator upgrades and approvedimage pcr storage - #359
Conversation
…tion is written to ApprovedImage status This commit removes the image-pcr configmap as discussed, and instead proceeds storing pcr values and events in ApprovedImage status. It also adds a few tests for testing combination pcrs, and whether events are stored and hex hashes can be reconstructed. Assisted by: Cursor Signed-off-by: Chirag Rao <crao@redhat.com>
There was a problem hiding this comment.
Sorry @SpaceFace02, your pull request is larger than the review limit of 150,000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SpaceFace02 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 |
|
Please let me know if I need to split this PR somehow, I couldn't figure out how to split it further. |
ed89f22 to
32bf05c
Compare
|
This PR is big and from the commit messages looks to be doing several distinct things. How is the image-pcr configmap removal related to the operator upgrade? looks to me like it can be an independent PR. The commit named "feat: operator upgrades, changes to trustee rvmap and rv config, attestationkey improvements" looks like it includes many different change that might not be at all related? the commit message lists the changes:
|
32bf05c to
eabe5d5
Compare
They are not directly related, but since I am upgrading from 0.2.2 (with image-pcrs) to the current version (without image-pcrs), it does tie in together with upgrades. I have tried to split it in 2 commits instead of 2 PRs.
yes, all helpers are related to operator upgrades.
Kind of hard to split it in multiple PRs because all these changes are so coupled, although can do if needed
This is the Quality of Life improvement for attestation key, which ties in with upgrades. TLDR: It does make sense to split this PR considering even Sourcery's limit has been reached and to make it easier for review. |
|
I plan to split it like this:
|
…stationkey improvements This commit adds operator upgrades: the operator's reconcile loop will attempt to converge all dependant images on an upgrade, either manually applied or via OLM. It also includes integration tests for the same, testing a real version upgrade, from a old tag on quay, to your locally built artifacts and binaries. Various helpers have been added to make the code more readable. Reference value configmap is removed as we have moved to trustee version 0.20.0. These reference values are managed by trustee and are ephemeral for the duration of the deployment. It also includes some Quality of Life improvements for attestation keys to make them a bit less prone to race conditions. AttestationKeys finalizers return immediately if trustee is also being deleted (via TEC deletion). And upgrades from older versions fail unless labels are attached to the secrets. Assisted by: Cursor Signed-off-by: Chirag Rao <crao@redhat.com>
eabe5d5 to
faaffd2
Compare
What are the "attestation key improvements"? do they make sense without the context of the upgrades? sounds like they belong in their own PR that the Upgrades PR will be dependent upon
are the pcr values and events in ApprovedImage related to each other of do they have individual value and viability? |
They are tied in to upgrades, because in version 0.2.2, we did not have a label on secrets (refer this, and while upgrading we need to make sure the label is present. Otherwise this change is not needed, if we are upgrading from version 0.2.3 onwards.
Yes, this PR removed image-pcrs configmap in favour of storing pcr values and events in ApprovedImage status itself, to prevent the race condtion of multiple jobs updating the image-pcrs cm. Not sure I understand the second part of your question |
Then it sounds like he 3 PRs you suggested are the right breakdown, if the Upgrades PR is still too big we could split it and have the label be in a seperate PR, but I hope a separate commit will be enough. |
Sounds good, I had a general question to everyone: Do we need each commit to pass the GHA pipeline? Because then the effort would increase to make sure each commit passes all checks, instead of just the PR passing all checks. edit: nvm, looks like the pipeline runs on only the latest commit in the PR |
this isn't enforced and I don't think GHA really supports it, but it is preferred so that bisects work |
|
@SpaceFace02: 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. |
This PR adds operator upgrades and removing image-pcr cm in favour of storing pcr events and values in approvedimagestatus.
5.Reference value configmap is removed as we have moved to trustee version 0.20.0. These reference values are managed by trustee and are ephemeral for the duration of the deployment.
itions.
ructed.
provedImage status.