Skip to content

Conversation

@JoelSpeed
Copy link
Contributor

@JoelSpeed JoelSpeed commented Jul 4, 2022

This reintroduces the ControlPlaneMachineSet API originally introduced in 4.11 via #1112, but then later reverted.

As we have updated the conventions over time and been working on the implementation, there are a few changes I've made which I've tried to make atomic:

  • Unions should have required discriminants (see failure domains)
  • Unions should have PascalCase discriminant values (see AWSResourceReference)
  • Updates to the comments to make sure they're consistently punctuated

My suggestion would be to review this commit wise as the first commit is large and is simply a revert of the revert to pull the API out of 4.11.

JoelSpeed added 4 commits July 4, 2022 10:01
This reverts c9a0b0b which removed the 
API from the 4.11 release.
We will be shipping this feature in 4.12 so now is the time to 
reintroduce the API.
We've learnt since this was initially implemented that discriminants 
should be required in unions. I tested this manually and if failure 
domains are omitted completely, this works, if failuredomains are 
present at all, the value is required as expected.
Mostly nits and adding full stops, but found a few bits along the way to
update
The discriminant values should be PascalCase by convention, this was 
missed in the previous review
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 4, 2022

Hello @JoelSpeed! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

For merging purposes, this repository follows the no-Feature-Freeze process which means that in addition to the standard lgtm and approved labels this repository requires either:

bugzilla/valid-bug - applied if your PR references a valid bugzilla bug

OR

qe-approved, docs-approved, and px-approved - these labels can be applied by anyone in the openshift org via the /label command.

Who should apply these qe/docs/px labels?

  • For a no-Feature-Freeze team who is merging a feature before code freeze, they need to get those labels applied to their api repo PR by the appropriate teams (i.e. qe, docs, px)
  • For a Feature Freeze (traditional) team who is merging a feature before FF, they can self-apply the labels (via /label commands), they are basically irrelevant for those teams
  • For a Feature Freeze team who is merging a feature after FF, the PR should be rejected barring an exception

@JoelSpeed JoelSpeed changed the title Reintroduce and update ControlPlaneMachineSet API [OCPCLOUD-1586] Reintroduce and update ControlPlaneMachineSet API Jul 4, 2022
Copy link
Contributor

@alexander-demicev alexander-demicev left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2022
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks for adding the new UpdatedReadyReplicas field!

// created by the ControlPlaneMachineSet controller that have the desired
// provider spec and are ready.
// +optional
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I spoke with @JoelSpeed about it on slack, the feedback I gave him is that this field seems unnecessary, since comparing controlplanemachineset with deployments and how it drives its rollout it should be possible to set UpdatedReplicas=0 when a new rollout starts, and update ReadyReplicas whenever the new machine is fully operational. There is no need to differentiate between UpdatedReadyReplicas and ReadyReplicas. It's important to note that during rollout ReadyReplicas can have values bigger than .spec.Replicas which is caused by the current surge of 1, and that should be call out explicitly in the field's description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The suggestion of adding this field was originally from @damdo. By adding it, we make it very explicit to users the number of machines with the current desired spec and of those, how many are ready. However, as this design is based heavily on deployments, I can see the arguments for keeping it more similar to the deployment API.

We ran through a bunch of examples on a call and in each scenario I believe you can infer from the combination of Ready, Updated and Replicas how many replicas are updated or not. So we should be fine without this for now.

It does create some confusion within the codebase because it's hard to define updated as "updated and ready" in the API, when the rest of the code it means something else, but we can deal with that

Copy link
Member

Choose a reason for hiding this comment

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

+1.
Thanks for your input on this @soltysh.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2022
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2022
@JoelSpeed
Copy link
Contributor Author

/label qe-approved
/label docs-approved
/label px-approved

This project is not a part of the no-ff process, therefore these labels shouldn't block us

@openshift-ci openshift-ci bot added qe-approved Signifies that QE has signed off on this PR docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Jul 4, 2022
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexander-demichev, damdo, JoelSpeed, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 4, 2022
@JoelSpeed
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 4, 2022

@JoelSpeed: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions 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/test-infra repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot merged commit 1d69d79 into openshift:master Jul 4, 2022
@JoelSpeed JoelSpeed deleted the cpms-api branch July 4, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants