Skip to content

⚠️ 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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sivchari
Copy link
Member

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 #

sivchari added 5 commits June 15, 2025 11:26
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>
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 15, 2025
@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 assign neolit123 for approval. For more information see the 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 requested a review from elmiko June 15, 2025 13:16
@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label Jun 15, 2025
@k8s-ci-robot k8s-ci-robot requested a review from richardcase June 15, 2025 13:16
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 15, 2025
sivchari added 3 commits June 18, 2025 11:52
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
@sivchari sivchari changed the title [WIP] ⚠️ Promote v1beta2 condition ⚠️ Promote v1beta2 condition Jun 18, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2025
@sivchari
Copy link
Member Author

/cc @sbueringer @fabriziopandini

Ready for review 👍

@sbueringer sbueringer added the area/provider/infrastructure-docker Issues or PRs related to the docker infrastructure provider label Jun 18, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Jun 18, 2025
@sbueringer
Copy link
Member

/assign @fabriziopandini
Can you do a first round please?

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.

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.
Copy link
Member

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

Suggested change
// 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.
Copy link
Member

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.

Suggested change
// 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.

Copy link
Member

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.
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
// conditions represents the observations of a DevCluster's current state.
// conditions represents the observations of a DockerMachinePool's current state.

Comment on lines +158 to +160
if in.Conditions != nil {
out.Deprecated.V1Beta1.Conditions = in.Conditions
}
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
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

Copy link
Member

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

Comment on lines +175 to +179
if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil {
if in.Deprecated.V1Beta1.Conditions != nil {
out.Conditions = in.Deprecated.V1Beta1.Conditions
}
}
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
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
}

Copy link
Member

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

@fabriziopandini fabriziopandini changed the title ⚠️ Promote v1beta2 condition ⚠️ Promote v1beta2 condition in CAPD Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/infrastructure-docker Issues or PRs related to the docker infrastructure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants