You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- the `conditions` package provides access to utils for managing `metav1.Conditions` in `status.conditions`
687
-
- the `v1beta1conditions` package alias provides access to utils for managing `clusterv1beta2.Conditions` in `status.deprecated.v1beta1.conditions`
703
+
- the `deprecatedv1beta1conditions` package alias provides access to utils for managing `clusterv1.Conditions` in `status.deprecated.v1beta1.conditions`
688
704
- the `patch` package provides access to utils for patching objects in this phase
689
705
690
706
Important!
691
-
The package `sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1`" is going to be removed from CAPI when the
692
-
v1beta1 removal will happen (tentative Aug 2026).
707
+
- Please pay special attention to use `sigs.k8s.io/cluster-api/util/patch` import everywhere,
708
+
because using `sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch` by mistake could in some cases lead to dropping conditions at runtime
709
+
(note: `sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch` is the package you were using in stage 1, it should not be used in stage 2).
710
+
- The package `sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1`" is going to be removed from CAPI when the
711
+
v1beta1 removal will happen (tentative Aug 2026).
693
712
694
713
#### Stage 3
695
714
@@ -707,3 +726,27 @@ import (
707
726
708
727
- the `conditions` package provides access to utils for managing `metav1.Conditions` in `status.conditions`
709
728
- the `patch` package provides access to utils for patching objects in this phase
729
+
730
+
Important!
731
+
- Please pay special attention to use `sigs.k8s.io/cluster-api/util/patch` import everywhere,
732
+
because using `sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch` by mistake could in some cases lead to dropping conditions at runtime
733
+
(note: `sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch` is the package in stage 1, if should not be used in following stages).
734
+
735
+
## Annex
736
+
737
+
### Imports for conditions and patch helper utils
738
+
739
+
In order to help users to transition away from the CAPI conditions type, CAPI v1.11 supports
740
+
different versions of conditions and patch helper utils.
741
+
742
+
Following table should help to pick the right utils.
743
+
744
+
| Field to change | Import for condition util | Import for patch helper |
|`status.conditions` of type `clusterv1beta1.Conditions`|`v1beta1conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions"`|`v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch"`|
747
+
|`status.v1beta2.conditions` of type `[]metav1.Conditions`|`v1beta2conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2"`|`v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch"`|
748
+
|`status.deprecated.v1beta1.conditions` of type `clusterv1.Conditions`|`deprecatedv1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"`|`"sigs.k8s.io/cluster-api/util/patch"`|
749
+
|`status.conditions` of type `[]metav1.Conditions`|`"sigs.k8s.io/cluster-api/util/conditions"`|`"sigs.k8s.io/cluster-api/util/patch"`|
750
+
Important!
751
+
- Please pay special attention to use the correct patch helper import everywhere, because using a wrong
752
+
one could in some cases lead to dropping conditions at runtime while not having compile errors.
0 commit comments