Skip to content

add azure machine pool machine proposal#1191

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
devigned:ampm-proposal
Mar 25, 2021
Merged

add azure machine pool machine proposal#1191
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
devigned:ampm-proposal

Conversation

@devigned
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind design

What this PR does / why we need it:
The scope of work for implementing safe rolling upgrades for AzureMachinePool with MaxUnavailable and MaxSurge has grown to warrant a proposal. This proposal provides background, tradeoffs and the design strategy to explain why we want to break out AzureMachinePoolMachines from AzureMachinePools.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related to #1105

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Add AzureMachinePoolMachine proposal which describes the design strategy for implementing rolling upgrades for AzureMachinePools

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/design Categorizes issue or PR as related to design. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 23, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 2021
Copy link
Copy Markdown
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

Thank you so much for taking the time to write this down. It helped me understand better what the goals are in #1105, and I'm sure it will help future contributors and users as well.

Overall this looks good to me but I challenged some of the assumptions / implied design choices that might not be obvious to others. My main concern is around the delete scenario and how the sync works between Azure resource deletions and k8s CR deletions.

Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
}

// AzureMachinePoolMachineSpec defines the desired state of AzureMachinePoolMachine
AzureMachinePoolMachineSpec struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How do we make it clear to the users that they are not responsible for creating the AzureMachinePoolMachines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a great question. Do you have any suggestions?

My first inclination is to add documentation.

There really isn't anything that stops someone from creating an AMPM. It won't hurt anything.

Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
Comment thread docs/proposals/20210222-azure-machinepool-machine.md
Comment thread docs/proposals/20210222-azure-machinepool-machine.md
Comment thread docs/proposals/20210222-azure-machinepool-machine.md
Comment thread docs/proposals/20210222-azure-machinepool-machine.md Outdated
@nader-ziada
Copy link
Copy Markdown
Contributor

Thank you @devigned for this doc, very helpful in understanding how all this works

@devigned devigned force-pushed the ampm-proposal branch 2 times, most recently from f622249 to 983aa33 Compare March 4, 2021 22:57
@fiunchinho
Copy link
Copy Markdown
Contributor

Looking at how the upgrade process is implemented in KCP we could try to make the two look even more similar. There are two fields that I believe could be useful here:

  • nodeDrainTimeout introduced in KCP here, it allows the user to specify the amount of time we want to wait for a node to be drained. If capz is taking care of draining, I believe it should allow users to specify this.
  • upgradeAfter introduced in KCP here, is a field to indicate an upgrade should be performed after the specified time, to allow users to schedule upgrades.

What do you think?

@devigned devigned force-pushed the ampm-proposal branch 2 times, most recently from 8dd3a94 to 45afafe Compare March 24, 2021 16:25
@devigned
Copy link
Copy Markdown
Contributor Author

upgradeAfter introduced in KCP here, is a field to indicate an upgrade should be performed after the specified time, to allow users to schedule upgrades.

@fiunchinho I don't think that upgradeAfter makes sense for AzureMachinePool since if there are no changes to the underlying model, then there will be nothing to upgrade.

I added the NodeDrainTimeout. Thank you!

@fiunchinho
Copy link
Copy Markdown
Contributor

upgradeAfter introduced in KCP here, is a field to indicate an upgrade should be performed after the specified time, to allow users to schedule upgrades.

@fiunchinho I don't think that upgradeAfter makes sense for AzureMachinePool since if there are no changes to the underlying model, then there will be nothing to upgrade.

I added the NodeDrainTimeout. Thank you!

Totally with you. I miss understood the upgradeAfter field. Thanks.

// The default value is 0, meaning that the node can be drained without any time limitations.
// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
// +optional
NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: indent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 24, 2021
@nader-ziada
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nader-ziada

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit 4c8293f into kubernetes-sigs:master Mar 25, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.5.0 milestone Mar 25, 2021
@devigned devigned deleted the ampm-proposal branch March 25, 2021 20:20
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. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/design Categorizes issue or PR as related to design. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants