Repository navigation
Conversation
Server-Side Apply removes status from the main-resource payload, so synchronize forward status separately through the status subresource. Signed-off-by: Arnaud FEVRIER <arnaud.fevrier@orange.com>
Signed-off-by: Arnaud FEVRIER <arnaud.fevrier@orange.com>
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
Hi @arfevrier. Thanks for your PR. I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
/ok-to-test |
|
/retest-required |
Summary
Related resources currently synchronize their
.statusonly in the same direction as their spec (with MR #175).This prevents using related resources when their desired state is produced on one side and their observed state is produced on the other. This PR allows the authoritative side for the status to be configured independently from the resource origin.
The following four configurations are supported:
When syncStatus is omitted,
.statussynchronization remains disabled.Use Case
The diagram shows two providers collaborating through a customer workspace. APIExports and
APIBindings are intentionally omitted to keep the overview clear.
The spec and status therefore flow in opposite directions without requiring direct connectivity
between the providers' service clusters. And the
Databaseis owned by the customer.Current Limitations and Possible Improvements
The current validation permits
origin: kcpwithsyncStatus: kcpwithoutwatch. In that case, the status present during a primary reconciliation is synchronized, but later status changes do not trigger reconciliation by themselves. Configuringwatchis therefore still necessary when continuous event-driven status synchronization is expected. (I keep the same behavior as before, but perhaps that doesn’t make much sense any more.)Related resources are not watched automatically. Without a
watchconfiguration, related resources are read and synchronized only when another event causes their primary resource to be reconciled.byOwnercan target one primary, but owner references are cluster-local and are not copied between clusters, whilebySelectormay reconcile several primaries. A future improvement could use the provenance annotations already present on generated copies to identify theexact primary?
Changes
@iakmc, what do you think of the changes ? As it directly impacts your MR !175.
Testing
Lint:
make lint
0 issues.
Focused status synchronization scenarios:
--- PASS: TestSyncRelatedObjectStatusFromKcp
--- PASS: TestSyncRelatedObjectStatusBackToKcp
--- PASS: TestSyncRelatedObjectStatusFromService
--- PASS: TestSyncRelatedObjectStatusNotSyncedByDefault
--- PASS: TestSyncRelatedObjectStatusFromKcpWithServiceOrigin
Full build and e2e suite:
make clean build test-e2e
PASS
All e2e packages and scenarios pass, including the related-resource synchronization and cleanup
tests.
What Type of PR Is This?
/kind feature
/kind api-change
Related Issue(s)
Fixes #193
Release Notes
Related resource status synchronization can now use kcp or the service cluster as its authoritative
source independently from the resource origin.