Skip to content

Commit ab29912

Browse files
committed
rename deprecated status to v1beta1
1 parent 943695e commit ab29912

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exp/runtime/api/v1alpha1/conversion.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ func Convert_v1beta2_ExtensionConfigStatus_To_v1alpha1_ExtensionConfigStatus(in
4343
}
4444

4545
// Reset conditions from autogenerated conversions
46-
// NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1alpha1).
46+
// NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1beta1).
4747
out.Conditions = nil
4848

49-
// Retrieve legacy conditions (v1alpha1) from the deprecated field.
50-
if in.Deprecated != nil && in.Deprecated.V1Alpha1 != nil {
51-
if in.Deprecated.V1Alpha1.Conditions != nil {
52-
out.Conditions = in.Deprecated.V1Alpha1.Conditions
49+
// Retrieve legacy conditions (v1beta1) from the deprecated field.
50+
if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil {
51+
if in.Deprecated.V1Beta1.Conditions != nil {
52+
out.Conditions = in.Deprecated.V1Beta1.Conditions
5353
}
5454
}
5555

@@ -68,27 +68,27 @@ func Convert_v1alpha1_ExtensionConfigStatus_To_v1beta2_ExtensionConfigStatus(in
6868
}
6969

7070
// Reset conditions from autogenerated conversions
71-
// NOTE: v1alpha1 conditions should not be automatically be converted into v1beta2 conditions.
71+
// NOTE: v1beta1 conditions should not be automatically be converted into v1beta2 conditions.
7272
out.Conditions = nil
7373

7474
// Retrieve new conditions (v1beta2) from the v1beta2 field.
7575
if in.V1Beta2 != nil {
7676
out.Conditions = in.V1Beta2.Conditions
7777
}
7878

79-
// Move legacy conditions (v1alpha1) to the deprecated field.
79+
// Move legacy conditions (v1beta1) to the deprecated field.
8080
if in.Conditions == nil {
8181
return nil
8282
}
8383

8484
if out.Deprecated == nil {
8585
out.Deprecated = &runtimev1.ExtensionConfigDeprecatedStatus{}
8686
}
87-
if out.Deprecated.V1Alpha1 == nil {
88-
out.Deprecated.V1Alpha1 = &runtimev1.ExtensionConfigV1Alpha1DeprecatedStatus{}
87+
if out.Deprecated.V1Beta1 == nil {
88+
out.Deprecated.V1Beta1 = &runtimev1.ExtensionConfigV1Beta1DeprecatedStatus{}
8989
}
9090
if in.Conditions != nil {
91-
out.Deprecated.V1Alpha1.Conditions = in.Conditions
91+
out.Deprecated.V1Beta1.Conditions = in.Conditions
9292
}
9393
return nil
9494
}

exp/runtime/api/v1beta2/extensionconfig_types.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,20 @@ type ExtensionConfigStatus struct {
138138

139139
// ExtensionConfigDeprecatedStatus groups all the status fields that are deprecated and will be removed in a future version.
140140
type ExtensionConfigDeprecatedStatus struct {
141-
// v1alpha1 groups all the status fields that are deprecated and will be removed when support for v1alpha1 will be dropped.
141+
// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
142142
//
143-
// Deprecated: This field is deprecated and is going to be removed when support for v1alpha1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
143+
// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
144144
//
145145
// +optional
146-
V1Alpha1 *ExtensionConfigV1Alpha1DeprecatedStatus `json:"v1alpha1,omitempty"`
146+
V1Beta1 *ExtensionConfigV1Beta1DeprecatedStatus `json:"v1beta1,omitempty"`
147147
}
148148

149-
// ExtensionConfigV1Alpha1DeprecatedStatus groups all the status fields that are deprecated and will be removed when support for v1alpha1 will be dropped.
149+
// ExtensionConfigV1Beta1DeprecatedStatus groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
150150
// See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.
151-
type ExtensionConfigV1Alpha1DeprecatedStatus struct {
151+
type ExtensionConfigV1Beta1DeprecatedStatus struct {
152152
// conditions defines current service state of the Machine.
153153
//
154-
// Deprecated: This field is deprecated and is going to be removed when support for v1alpha1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
154+
// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
155155
//
156156
// +optional
157157
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
@@ -238,21 +238,21 @@ type ExtensionConfig struct {
238238

239239
// GetV1Beta1Conditions returns the set of conditions for this object.
240240
func (m *ExtensionConfig) GetV1Beta1Conditions() clusterv1.Conditions {
241-
if m.Status.Deprecated == nil || m.Status.Deprecated.V1Alpha1 == nil {
241+
if m.Status.Deprecated == nil || m.Status.Deprecated.V1Beta1 == nil {
242242
return nil
243243
}
244-
return m.Status.Deprecated.V1Alpha1.Conditions
244+
return m.Status.Deprecated.V1Beta1.Conditions
245245
}
246246

247247
// SetV1Beta1Conditions sets the conditions on this object.
248248
func (m *ExtensionConfig) SetV1Beta1Conditions(conditions clusterv1.Conditions) {
249249
if m.Status.Deprecated == nil {
250250
m.Status.Deprecated = &ExtensionConfigDeprecatedStatus{}
251251
}
252-
if m.Status.Deprecated.V1Alpha1 == nil {
253-
m.Status.Deprecated.V1Alpha1 = &ExtensionConfigV1Alpha1DeprecatedStatus{}
252+
if m.Status.Deprecated.V1Beta1 == nil {
253+
m.Status.Deprecated.V1Beta1 = &ExtensionConfigV1Beta1DeprecatedStatus{}
254254
}
255-
m.Status.Deprecated.V1Alpha1.Conditions = conditions
255+
m.Status.Deprecated.V1Beta1.Conditions = conditions
256256
}
257257

258258
// GetConditions returns the set of conditions for this object.

exp/runtime/api/v1beta2/zz_generated.deepcopy.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)