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 CAPI book section on clusterctl alpha rollout #4328

Merged

Conversation

Arvinderpal
Copy link
Contributor

What this PR does / why we need it:

Documents the clusterctl alpha rollout feature.

Related Issue:
#3439

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 16, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @Arvinderpal. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 16, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 16, 2021
@Arvinderpal Arvinderpal mentioned this pull request Mar 16, 2021
9 tasks
@fabriziopandini
Copy link
Member

/milestone v0.4.0
/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 16, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4.0 milestone Mar 16, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 16, 2021
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

overall lgtm, only few nits


### Restart

Use the `restart` sub-command to force an immediate rollout. For example, here the MchineDeployment `my-md-0` will be immediately rolled out:
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a note explaining what rollout means: deleting machines (including cordon/drain of workloads), recreating new ones according to maxUnavailable/maxSurge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


### Undo

Use the `undo` sub-command to rollback to an ealier revision. For example, here the MachineDeployment `my-md-0` will be rolled back to revison number 3. If the `--to-revision` flag is omited, the MachineDeployment will be rolled back to the revision immediately preceding the current one.
Copy link
Member

Choose a reason for hiding this comment

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

should we document what happen if the requested revision/the immediate preceding revision does not exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added: "If the desired revision does not exist, the undo will return an error."


### Pause/Resume

Use the `pause` sub-command to pause a Cluster API resource.
Copy link
Member

Choose a reason for hiding this comment

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

Should we document what happens if if are pausing an already paused rollout (or if we are unpausing something not currently paused)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


<h1> Warning </h1>

Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again.
Copy link
Member

Choose a reason for hiding this comment

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

Are we using paused at object level or machineDeployments.spec.Paused?
In case we are using the first, should we document that pausing could imply also some undesired side effects because nothing gets updated, including e.g. the ObservedGeneration, replica counters etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this comment: "Note that internally, this command sets the Paused field within the resource spec (e.g. MachineDeployment.Spec.Paused) to true."

Copy link
Member

@furkatgofurov7 furkatgofurov7 left a comment

Choose a reason for hiding this comment

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

Overall looks good, really like the idea and also +1 to the idea if we can make this to work in kubectl!
There are few nits, please see below:

docs/book/src/clusterctl/commands/alpha-rollout.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-rollout.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-rollout.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-rollout.md Outdated Show resolved Hide resolved
docs/book/src/clusterctl/commands/alpha-rollout.md Outdated Show resolved Hide resolved
@@ -0,0 +1,51 @@
# clusterctl alpha rollout

The `clusterctl alpha rollout` command manages the rollout of a cluster-api resource. It consists of several sub-commands which are documented below.
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should make cluster-api OR Cluster API word consistent throughout this document? (Cluster API seems to be more frequently used in the repo)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using Cluster API now.

@vincepri
Copy link
Member

vincepri commented Mar 31, 2021

@Arvinderpal Are you able to address the comments above?

Copy link
Contributor Author

@Arvinderpal Arvinderpal left a comment

Choose a reason for hiding this comment

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

@fabriziopandini @furkatgofurov7 I addressed your comments. PTAL

@@ -0,0 +1,51 @@
# clusterctl alpha rollout

The `clusterctl alpha rollout` command manages the rollout of a cluster-api resource. It consists of several sub-commands which are documented below.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using Cluster API now.


### Restart

Use the `restart` sub-command to force an immediate rollout. For example, here the MchineDeployment `my-md-0` will be immediately rolled out:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


### Undo

Use the `undo` sub-command to rollback to an ealier revision. For example, here the MachineDeployment `my-md-0` will be rolled back to revison number 3. If the `--to-revision` flag is omited, the MachineDeployment will be rolled back to the revision immediately preceding the current one.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added: "If the desired revision does not exist, the undo will return an error."


### Pause/Resume

Use the `pause` sub-command to pause a Cluster API resource.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


<h1> Warning </h1>

Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this comment: "Note that internally, this command sets the Paused field within the resource spec (e.g. MachineDeployment.Spec.Paused) to true."

@Arvinderpal Arvinderpal force-pushed the clusterctl-alpha-rollout-book branch from a1e0e24 to b323861 Compare March 31, 2021 15:30
@Arvinderpal
Copy link
Contributor Author

@Arvinderpal Are you able to address the comments above?

@vincepri I just did. PTAL

@Arvinderpal
Copy link
Contributor Author

/retest

@fabriziopandini
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 2, 2021
@fabriziopandini
Copy link
Member

/retest

@detiber
Copy link
Member

detiber commented Apr 2, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: detiber

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 2, 2021
@detiber
Copy link
Member

detiber commented Apr 2, 2021

/test pull-cluster-api-test-main

@k8s-ci-robot k8s-ci-robot merged commit 8a54688 into kubernetes-sigs:master Apr 2, 2021
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants