Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add mwrSet rolloutStrategy #255

Merged

Conversation

serngawy
Copy link
Member

No description provided.

@serngawy
Copy link
Member Author

/hold

@serngawy
Copy link
Member Author

/cc @haoqing0110

@@ -86,6 +90,23 @@ type LocalPlacementReference struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`

// +optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should here add // +kubebuilder:default={type: All} ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its already there in the Rollout API definition here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the default value on the top of RolloutStrategy is to ensure even no RolloutStrategy field defined in yaml,
there's will be RolloutStrategy and "type: All" generated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, done.


// availableDecisionGroups shows number of decisionGroups having manifestWorks available regards total number of decisionGroups
// ex; 2/4 (2 out of 4)
AvailableDecisionGroups string `json:"availableDecisionGroups"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can have a discussion here, whether need a common way to show the rollout progress. Today, addon shows this message in condition Progressing.

status:
  installProgression:
  - name: aws-placement
    namespace: default
    configReferences
...
    conditions:
    - lastTransitionTime: "2022-11-02T05:48:12Z"
      message: 200/400 upgrading...
      reason: Upgrading
      status: "True"
      type: Progressing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have common condition but I guess it hard to happen. Like in ManifestWorkReplicaSet there is no progressing condition neither upgrading reason. As well as the Manifest has only apply/processing/available state.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might need to introduce progressing/upgrading in ManifestWorkReplicaSet for rollout strategy. We should be able to check whether a manifestwork is applied or not already (spec is changed but not applied yet). And in the long term, we should be able to define progress/degraded condition for manifestwork.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ManifestWorkReplicaSetSummary showing the applied/progrssing/available/degraded state for all clusters manifestworks. The PlacementSummary is more to shows the placement rollout state. Not sure, Do we need to add manifestWorkSummary for each placementSummary ?

Copy link
Member Author

@serngawy serngawy Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, added the ManifestWorkReplicaSetSummary to the placementSummary so every placement will has its own summary info AND added a condition for RollOut.

@serngawy
Copy link
Member Author

/unhold

@serngawy serngawy force-pushed the mwrSetRollout branch 2 times, most recently from 1f00f8c to e5c00af Compare August 16, 2023 15:23
AvailableClusters string `json:"availableClusters"`

// availableDecisionGroups shows number of decisionGroups having manifestWorks available regards total number of decisionGroups
// ex; 2/4 (2 out of 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is x/x a common format? how to validate it and do you expect some other controller to recognize it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is more like a descriptive message and yes, we can validate it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a more clear description of AvailableDecisionGroups? if not all manifestwork in this decision is available, is this an AvailableDecisionGroups?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it count the groups that have all clusters manifestwork in available state. I updated the comment


// availableDecisionGroups shows number of decisionGroups having manifestWorks available regards total number of decisionGroups
// ex; 2/4 (2 out of 4)
AvailableDecisionGroups string `json:"availableDecisionGroups"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might need to introduce progressing/upgrading in ManifestWorkReplicaSet for rollout strategy. We should be able to check whether a manifestwork is applied or not already (spec is changed but not applied yet). And in the long term, we should be able to define progress/degraded condition for manifestwork.

@serngawy serngawy changed the title Add mwrSet rolloutStrategy ✨ Add mwrSet rolloutStrategy Aug 21, 2023
@serngawy serngawy force-pushed the mwrSetRollout branch 2 times, most recently from 75801e8 to a2e8c33 Compare August 22, 2023 08:39
Signed-off-by: melserngawy <melserng@redhat.com>
@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 23, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 23, 2023

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit b099eba into open-cluster-management-io:main Aug 23, 2023
10 checks passed
@serngawy serngawy deleted the mwrSetRollout branch August 23, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants