-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
🌱 Add v1beta2 RollingOut condition #11463
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
api/v1beta1/cluster_types.go
Outdated
ClusterRollingOutV1Beta2Condition = RollingOutV1Beta2Condition | ||
|
||
// ClusterRollingOutV1Beta2Reason surfaces when at least one of the Cluster's control plane, MachineDeployments, | ||
// and MachinePools are rolling out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// and MachinePools are rolling out. | |
// or MachinePools are rolling out. |
api/v1beta1/cluster_types.go
Outdated
ClusterRollingOutV1Beta2Reason = RollingOutV1Beta2Reason | ||
|
||
// ClusterNotRollingOutV1Beta2Reason surfaces when none of the Cluster's control plane, MachineDeployments, | ||
// and MachinePools are rolling out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// and MachinePools are rolling out. | |
// or MachinePools are rolling out. |
api/v1beta1/cluster_types.go
Outdated
ClusterNotRollingOutV1Beta2Reason = NotRollingOutV1Beta2Reason | ||
|
||
// ClusterRollingOutUnknownV1Beta2Reason surfaces when one of the Cluster's control plane, MachineDeployments, | ||
// and MachinePools rolling out condition is unknown, and none true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
51a3573
to
3fb816d
Compare
What this PR does / why we need it:
Part of #11105
/area conditions