Closed serngawy closed 12 months ago
LGTM. I will add more addon + rollout API examples in addon page.
This is exactly what I wanted to know and I appreciate the attempt to document it.
By the way, what does "the successful state" mean?
Is it AppliedManifestComplete: true
, ResourceAvailable: true
, or something else?
After examining the code, it seems to be determined from ResourcesAvailable: true
in status.conditions
. That true/false seems to use all of the resourceStatus
fields.
https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/hub/controllers/manifestworkreplicasetcontroller/manifestworkreplicaset_deploy_reconcile.go#L198
https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go#L196
https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go#L133C107-L133C121
It might be a good idea to briefly mention that in the documentation.
This is exactly what I wanted to know and I appreciate the attempt to document it. By the way, what does "the successful state" mean? Is it
AppliedManifestComplete: true
,ResourceAvailable: true
, or something else?
mentioned "the successful state" in placement as successful state cause the definition is different from one API to another; like for manifestwork successful mean resource is available, for other APIs is something else.
After examining the code, it seems to be determined from
ResourcesAvailable: true
instatus.conditions
. That true/false seems to use all of theresourceStatus
fields. https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/hub/controllers/manifestworkreplicasetcontroller/manifestworkreplicaset_deploy_reconcile.go#L198 https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go#L196 https://github.com/open-cluster-management-io/ocm/blob/29ffff020fafa88b8fbc898711313bc3eabeb6ef/pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go#L133C107-L133C121It might be a good idea to briefly mention that in the documentation.
okay will add more info for that in the manifestWorkReplicaSet
/approve /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: qiujian16, serngawy
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/assign @haoqing0110 @qiujian16