Use reflector for all repeated read operations & set kube timeouts less than test timeouts, CI stress edition - #330
Draft
Jakob-Naucke wants to merge 5 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
|
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>
Read defaults to None, write to 295s. Set 30s which is less than test timeouts, so each test case has a chance for a retry. Note that since kube-rs v4, the None read_timeout is no longer required for watchers (which we do use), although still for exec & attach (which we do not). 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 11, 2026 16:08
ee8469d to
0a80458
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
Unify controller context around a shared OperatorContext using reflector-backed caches, switch Kubernetes write operations to server-side apply with a bounded write timeout, and adjust CI integration tests for stress-style repeated runs and updated images.
New Features:
Bug Fixes:
Enhancements:
CI: