-
Notifications
You must be signed in to change notification settings - Fork 1.4k
⚠️ Promote v1beta2 condition in CAPD #12362
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
[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 |
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
/cc @sbueringer @fabriziopandini Ready for review 👍 |
/assign @fabriziopandini |
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.
Thanks @sivchari for this work, just a few nits from my side
|
||
// v1beta2 groups all the fields that will be added or modified in DevCluster's status with the V1Beta2 version. | ||
// deprecated groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped. |
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.
nit In order to distinguish this from deprecated.v1beta1 we used
// deprecated groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped. | |
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.. |
(same for the struct + other types)
@@ -119,24 +119,35 @@ type DevClusterStatus struct { | |||
// +optional | |||
FailureDomains clusterv1beta1.FailureDomains `json:"failureDomains,omitempty"` | |||
|
|||
// conditions defines current service state of the DevCluster. | |||
// conditions represents the observations of a DevCluster's current state. |
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.
Let's move conditions as a first field in status + add a sentence about know conditions, e.g.
// conditions represents the observations of a DevCluster's current state. | |
// conditions represents the observations of a DevCluster's current state. | |
// Known condition types are Ready, ..., Paused. |
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.
Same for other types
// InfrastructureMachineKind is the kind of the infrastructure resources behind MachinePool Machines. | ||
// +optional | ||
InfrastructureMachineKind string `json:"infrastructureMachineKind,omitempty"` | ||
|
||
// conditions represents the observations of a DevCluster's current state. |
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.
// conditions represents the observations of a DevCluster's current state. | |
// conditions represents the observations of a DockerMachinePool's current state. |
if in.Conditions != nil { | ||
out.Deprecated.V1Beta1.Conditions = in.Conditions | ||
} |
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.
if in.Conditions != nil { | |
out.Deprecated.V1Beta1.Conditions = in.Conditions | |
} | |
out.Deprecated.V1Beta1.Conditions = in.Conditions |
We already know conditions is not nil due to the test in L148
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.
Same for all the other Convert_v1beta1_*Status_To_v1beta2_*Status func
if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil { | ||
if in.Deprecated.V1Beta1.Conditions != nil { | ||
out.Conditions = in.Deprecated.V1Beta1.Conditions | ||
} | ||
} |
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.
if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil { | |
if in.Deprecated.V1Beta1.Conditions != nil { | |
out.Conditions = in.Deprecated.V1Beta1.Conditions | |
} | |
} | |
if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil && in.Deprecated.V1Beta1.Conditions != nil { | |
out.Conditions = in.Deprecated.V1Beta1.Conditions | |
} |
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.
Same for all the Convert_v1beta2_*Status_To_v1beta1_*Status func
What this PR does / why we need it:
Part of #11947
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #