Test timeout client - #323
Closed
Jakob-Naucke wants to merge 15 commits into
Closed
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 |
Jakob-Naucke
force-pushed
the
timed-client-ci
branch
from
July 29, 2026 18:22
8333071 to
22493f3
Compare
Reviewer's GuideIntroduce a timed Kubernetes client alongside a separate watch client, refactor operator/tests/VM helpers to use the dual-client model for timeouts vs watches, improve logging and test diagnostics, and adjust CI and images for more reliable integration tests. Sequence diagram for controller using watch and timed clientssequenceDiagram
participant OperatorMain
participant LibRoot
participant ReferenceValues
participant Controller
participant KubernetesAPI
OperatorMain->>LibRoot: timed_client()
LibRoot-->>OperatorMain: Client (timed)
OperatorMain->>KubernetesAPI: Client::try_default()
KubernetesAPI-->>OperatorMain: Client (watch)
OperatorMain->>ReferenceValues: launch_rv_image_controller(clients)
ReferenceValues->>KubernetesAPI: Api::default_namespaced(clients.watch)
ReferenceValues->>Controller: Controller::new(images, Config::default())
ReferenceValues->>Controller: owns(jobs, watcher::Config)
ReferenceValues->>Controller: run(image_reconcile, controller_error_policy, Arc::new(clients.client))
loop watch stream
Controller->>KubernetesAPI: watch(images) via clients.watch
Controller-->>ReferenceValues: image_reconcile(job, Arc<Client>)
ReferenceValues->>KubernetesAPI: request/response via clients.client
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
All trustee resources, including the resource policy, attestation policy, RV, LUKS key, and AK, are now synchronized using the KBS API.
The main motivation for this is replacing the patch mechanism that causes a restart of the trustee deployment.
Also, this abstraction over the trustee backend simplifies the process of upgrading to future versions of trustee.
Config:
- Update kbs-config.toml to v0.20.0 format
- Store reference values in dedicated ConfigMap (trustee-rv-data)
instead of trustee-data
API-driven resource management:
- Add KBS API client functions: send_secret, delete_secret,
register_ak, sync_resource_policy, sync_attestation_policy,
sync_reference_values
- Replace volume-mount approach for secrets with KBS API calls
- Add trustee deployment reconciler that syncs policies, reference
values, and secrets when deployment becomes available
Dependencies:
- Add kbs-client and jsonwebtoken crates
- Bump trustee image tag to v0.20.0
Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
test_luks_key_sync - verify the initial LUKS key upload, re-sync after trustee restart, and LUKS key deletion on machine removal. test_attestation_key_sync - verify that attestation keys are registered with the KBS and re-registered after trustee restarts. Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
Tested functions: - sync_all_machine_luks_key - update_attestation_keys Signed-off-by: Roy Kaufman <rkaufman@redhat.com>
required on OpenShift SCC Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
for crates and testing Fixes: trusted-execution-clusters#227 Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
so that status is updated in a timely manner Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Jakob-Naucke
force-pushed
the
timed-client-ci
branch
from
July 30, 2026 10:00
22493f3 to
b696540
Compare
Default kube-rs client has no read timeout so that watch operations are supported. Some non-watch operations have been seen to hang. Use a timeout of 30 seconds for such operations. Introduce a structure to pass both clients where needed. Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: AI
GET on trustedexecutionclusters is known to fail occasionally. This should return an error, which will lead to a requeue. Thus, also increase base deletion timeout to 120s (30s timeout on failure, 60s requeue). Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Signed-off-by: Jakob Naucke <jnaucke@redhat.com> Assisted-by: AI
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
to fail fast Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Jakob-Naucke
force-pushed
the
timed-client-ci
branch
from
July 30, 2026 10:10
b696540 to
690f50a
Compare
Member
Author
|
Failure brought up in #248 (comment) but after 5h of successful tests I've seen enough here |
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.
follow up #313
Summary by Sourcery
Introduce a Kubernetes client with read timeouts and refactor operator, test utilities, and controllers to use separate clients for request/response calls and long‑lived watches, improving reliability of integrations and controllers.
New Features:
Bug Fixes:
Enhancements:
Build:
humantimefeature on env_logger for improved log formatting.CI:
Deployment:
Tests: