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 v1beta2 RollingOut condition #11463

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
Part of #11105

/area conditions

@k8s-ci-robot k8s-ci-robot added area/conditions Issues or PRs related to conditions cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 21, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from fabriziopandini. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 21, 2024
ClusterRollingOutV1Beta2Condition = RollingOutV1Beta2Condition

// ClusterRollingOutV1Beta2Reason surfaces when at least one of the Cluster's control plane, MachineDeployments,
// and MachinePools are rolling out.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// and MachinePools are rolling out.
// or MachinePools are rolling out.

ClusterRollingOutV1Beta2Reason = RollingOutV1Beta2Reason

// ClusterNotRollingOutV1Beta2Reason surfaces when none of the Cluster's control plane, MachineDeployments,
// and MachinePools are rolling out.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// and MachinePools are rolling out.
// or MachinePools are rolling out.

ClusterNotRollingOutV1Beta2Reason = NotRollingOutV1Beta2Reason

// ClusterRollingOutUnknownV1Beta2Reason surfaces when one of the Cluster's control plane, MachineDeployments,
// and MachinePools rolling out condition is unknown, and none true.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// and MachinePools rolling out condition is unknown, and none true.
// or MachinePools rolling out condition is unknown, and none true.

@@ -148,6 +148,21 @@ const (
MachineDeploymentMachinesUpToDateInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// MachineDeployment's RollingOut condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// MachineDeploymentRollingOutV1Beta2Condition is true if there is at least one machine not up-to-date.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// MachineDeploymentRollingOutV1Beta2Condition is true if there is at least one machine not up-to-date.
// MachineDeploymentRollingOutV1Beta2Condition is true if there is at least one machine not up-to-date.

// MachineDeploymentRollingOutV1Beta2Condition is true if there is at least one machine not up-to-date.
MachineDeploymentRollingOutV1Beta2Condition = RollingOutV1Beta2Condition

// MachineDeploymentRollingOutV1Beta2Reason surfaces when there is at least one machine not up-to-date.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// MachineDeploymentRollingOutV1Beta2Reason surfaces when there is at least one machine not up-to-date.
// MachineDeploymentRollingOutV1Beta2Reason surfaces when there is at least one machine not up-to-date.

@@ -210,6 +211,63 @@ func setInitializedCondition(_ context.Context, kcp *controlplanev1.KubeadmContr
})
}

func setRollingOutCondition(_ context.Context, kcp *controlplanev1.KubeadmControlPlane, machines collections.Machines) {
// Count machines rolling out and collect reasons why a rollout is happening.
// Note: We collects all reasons for which at least a machine is rolling out; under normal circumstances
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Note: We collects all reasons for which at least a machine is rolling out; under normal circumstances
// Note: We collect all reasons for which at least a machine is rolling out; under normal circumstances

},
},
{
name: "one up-to-date, two not up-to-date, onr reporting up-to-date unknown",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: "one up-to-date, two not up-to-date, onr reporting up-to-date unknown",
name: "one up-to-date, two not up-to-date, one reporting up-to-date unknown",

},
},
{
name: "one up-to-date, two not up-to-date, onr reporting up-to-date unknown",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: "one up-to-date, two not up-to-date, onr reporting up-to-date unknown",
name: "one up-to-date, two not up-to-date, one reporting up-to-date unknown",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/conditions Issues or PRs related to conditions cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants