Use reflector for all repeated read operations, set read timeout & a test timeout greater than that, CI stress edition - #330
Draft
Jakob-Naucke wants to merge 6 commits into
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 |
Reviewer's GuideRefactors the operator to use a unified OperatorContext backed by reflector caches for repeated reads, switches several config/deployment mutations to server-side apply patches, adjusts controllers and tests accordingly, and tightens CI and runtime timeouts for more reliable stress testing. Sequence diagram for keygen_reconcile using reflector-backed OperatorContextsequenceDiagram
actor Operator
participant Machine
participant KeygenController as keygen_reconcile
participant OperatorContext
participant Trustee as trustee
participant TecStore as tec_store
Operator->>Machine: create/update Machine
Machine-->>KeygenController: event
KeygenController->>OperatorContext: access client
KeygenController->>Machine: inspect spec.id
alt Event::Apply
KeygenController->>Machine: generate_owner_reference(machine)
KeygenController->>trustee: generate_secret(client, id, owner_reference)
KeygenController->>trustee: mount_secret(OperatorContext, id)
KeygenController-->>Operator: Action::await_change
else Event::Cleanup
KeygenController->>Machine: read owner_references
KeygenController->>TecStore: get(ObjectRef::new(tec_name).within(ns))
alt TEC deleting or missing
KeygenController-->>Operator: Action::await_change
else TEC active
KeygenController->>trustee: unmount_secret(OperatorContext, id)
KeygenController-->>Operator: Action::await_change
end
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Jakob-Naucke
force-pushed
the
get-cached-ci
branch
from
August 11, 2026 16:08
ee8469d to
0a80458
Compare
Extend the use of a reflector cache from attestation keys to the entire operator. Replace AkContextData with OperatorContext to pass caches. Use server-side apply patches instead of get+replace. - Updating image-pcrs without the cache is only used in compute-pcrs now, thus inline the macro - trustee::update_reference_values receives PCRs from argument, it is sometimes available from the call site anyhow Fixes: trusted-execution-clusters#251 Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: AI
so that status is updated in a timely manner Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Set read timeout of 295s (same as write) so that hanging operations can retry. Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Local network on GHA has been seen to be less reliable than local development and production clusters. Set a test timeout multiplier large enough to let one read time out and retry. Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Jakob-Naucke
force-pushed
the
get-cached-ci
branch
from
August 18, 2026 14:27
0a80458 to
7ec60fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Use shared reflector caches and server-side apply updates throughout the operator, with Kubernetes timeouts and CI behavior tuned for stress testing.
Enhancements:
CI:
Tests:
Chores: