Closed yuwenma closed 1 year ago
/assign @justinsb
/test pull-declarative-test
A few nits/thoughts but nothing blocking - thanks for doing this.
/label tide/merge-method-squash
/approve /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: justinsb, yuwenma
The full list of commands accepted by this bot can be found here.
The pull request process is described here
This change improves the status.conditions for the following 3 scenarios:
Case 1. No
status.condition
(backward compatible)Current behavior
If users update the k-d-p in their operator, they have to regenerate the CRD because by default the api schema contains the
status.conditions
field in the defaultcommonstatus
. users don't need to change their api schema.New behavior
If users do not want to add the patchable conditions, after they update the k-d-p they can keep their existing behavior and the CR object will not have
.status.conditions
field.Case 2: Default
status.conditions
users can use the new
status.conditions
simply by adding thePatchableConditions
to their CR obejcts'Status
api (see below). They should re-generate the CRD and DeepCopy objects to contain newstatus.conditions
, but they don't need to implement theaddonsv1alpha1.ConditionGetterSetter
interface.Case 3: Customize the
status.conditions
If users add the patchable conditions and want to implement their own condition setter/getter (
addonsv1alpha1.ConditionGetterSetter
) to their declarative object, they should expect the customize getter/setter being used.TODO: Add the patchableConditions to guestbook example.