diff --git a/api/v1alpha3/conditions.go b/api/v1alpha3/conditions.go index 780ee01..d4b553b 100644 --- a/api/v1alpha3/conditions.go +++ b/api/v1alpha3/conditions.go @@ -6,7 +6,7 @@ // +groupName=controlplane.cluster.x-k8s.io package v1alpha3 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" // Conditions and condition Reasons for the TalosControlPlane object diff --git a/api/v1alpha3/taloscontrolplane_types.go b/api/v1alpha3/taloscontrolplane_types.go index f97e58b..02d84b6 100644 --- a/api/v1alpha3/taloscontrolplane_types.go +++ b/api/v1alpha3/taloscontrolplane_types.go @@ -9,7 +9,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) const ( @@ -162,7 +161,7 @@ type TalosControlPlaneStatus struct { // Conditions defines current service state of the KubeadmControlPlane. // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` + Conditions []metav1.Condition `json:"conditions,omitempty"` // version represents the minimum Kubernetes version for the control plane machines // in the cluster. @@ -191,12 +190,12 @@ type TalosControlPlane struct { } // GetConditions returns the set of conditions for this object. -func (r *TalosControlPlane) GetConditions() clusterv1.Conditions { +func (r *TalosControlPlane) GetConditions() []metav1.Condition { return r.Status.Conditions } // SetConditions sets the conditions on this object. -func (r *TalosControlPlane) SetConditions(conditions clusterv1.Conditions) { +func (r *TalosControlPlane) SetConditions(conditions []metav1.Condition) { r.Status.Conditions = conditions } diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go index cac10da..8e6dafc 100644 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ b/api/v1alpha3/zz_generated.deepcopy.go @@ -9,9 +9,9 @@ package v1alpha3 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/cluster-api/api/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -172,7 +172,7 @@ func (in *TalosControlPlaneStatus) DeepCopyInto(out *TalosControlPlaneStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(v1beta1.Conditions, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/controllers/configs.go b/controllers/configs.go index d918169..aa43d1f 100644 --- a/controllers/configs.go +++ b/controllers/configs.go @@ -18,7 +18,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -105,7 +105,7 @@ func (r *TalosControlPlaneReconciler) talosconfigFromWorkloadCluster(ctx context return nil, fmt.Errorf("at least one machine should be provided") } - c, err := r.Tracker.GetClient(ctx, cluster) + c, err := r.ClusterCache.GetClient(ctx, cluster) if err != nil { return nil, err } @@ -115,14 +115,14 @@ func (r *TalosControlPlaneReconciler) talosconfigFromWorkloadCluster(ctx context var t *talosconfig.Config for _, machine := range machines { - if machine.Status.NodeRef == nil { + if !machine.Status.NodeRef.IsDefined() { return nil, fmt.Errorf("%q machine does not have a nodeRef", machine.Name) } var node v1.Node // grab all addresses as endpoints - err := c.Get(ctx, types.NamespacedName{Name: machine.Status.NodeRef.Name, Namespace: machine.Status.NodeRef.Namespace}, &node) + err := c.Get(ctx, types.NamespacedName{Name: machine.Status.NodeRef.Name}, &node) if err != nil { return nil, err } diff --git a/controllers/controllers_test.go b/controllers/controllers_test.go index 46b6242..8d1739d 100644 --- a/controllers/controllers_test.go +++ b/controllers/controllers_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" @@ -75,19 +75,16 @@ func (suite *ControllersSuite) TestClusterToTalosControlPlane() { cluster := newCluster(&types.NamespacedName{Name: "foo", Namespace: metav1.NamespaceDefault}) cluster.Spec = clusterv1.ClusterSpec{ - ControlPlaneRef: &corev1.ObjectReference{ - Kind: "TalosControlPlane", - Namespace: metav1.NamespaceDefault, - Name: "tcp-foo", - APIVersion: controlplanev1.GroupVersion.String(), + ControlPlaneRef: clusterv1.ContractVersionedObjectReference{ + Kind: "TalosControlPlane", + Name: "tcp-foo", + APIGroup: controlplanev1.GroupVersion.Group, }, } expectedResult := []ctrl.Request{ { - NamespacedName: client.ObjectKey{ - Namespace: cluster.Spec.ControlPlaneRef.Namespace, - Name: cluster.Spec.ControlPlaneRef.Name}, + NamespacedName: client.ObjectKey{Name: cluster.Spec.ControlPlaneRef.Name}, }, } @@ -115,11 +112,10 @@ func (suite *ControllersSuite) TestClusterToTalosControlPlaneOtherControlPlane() cluster := newCluster(&types.NamespacedName{Name: "foo", Namespace: metav1.NamespaceDefault}) cluster.Spec = clusterv1.ClusterSpec{ - ControlPlaneRef: &corev1.ObjectReference{ - Kind: "OtherControlPlane", - Namespace: metav1.NamespaceDefault, - Name: "other-foo", - APIVersion: controlplanev1.GroupVersion.String(), + ControlPlaneRef: clusterv1.ContractVersionedObjectReference{ + Kind: "OtherControlPlane", + Name: "other-foo", + APIGroup: controlplanev1.GroupVersion.Group, }, } @@ -139,7 +135,10 @@ func (suite *ControllersSuite) TestReconcilePaused() { // Test: cluster is paused and tcp is not cluster := newCluster(&types.NamespacedName{Namespace: metav1.NamespaceDefault, Name: clusterName}) - cluster.Spec.Paused = true + + var paused = false + cluster.Spec.Paused = &paused + tcp := &controlplanev1.TalosControlPlane{ ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, @@ -170,7 +169,7 @@ func (suite *ControllersSuite) TestReconcilePaused() { g.Expect(machineList.Items).To(BeEmpty()) // Test: tcp is paused and cluster is not - cluster.Spec.Paused = false + cluster.Spec.Paused = &paused tcp.ObjectMeta.Annotations = map[string]string{} tcp.ObjectMeta.Annotations[clusterv1.PausedAnnotation] = "paused" _, err = r.Reconcile(suite.ctx, ctrl.Request{NamespacedName: util.ObjectKey(tcp)}) @@ -181,7 +180,13 @@ func (suite *ControllersSuite) TestReconcileClusterNoEndpoints() { g := NewWithT(suite.T()) cluster := newCluster(&types.NamespacedName{Name: "foo", Namespace: metav1.NamespaceDefault}) - cluster.Status = clusterv1.ClusterStatus{InfrastructureReady: true} + cluster.Status = clusterv1.ClusterStatus{ + Conditions: []metav1.Condition{ + { + Type: string(clusterv1.InfrastructureReadyV1Beta1Condition), + }, + }, + } tcp := &controlplanev1.TalosControlPlane{ ObjectMeta: metav1.ObjectMeta{ @@ -340,7 +345,7 @@ func (suite *ControllersSuite) TestReconcileInitializeControlPlane() { g.Expect(tcp.Status.Selector).NotTo(BeEmpty()) g.Expect(tcp.Status.Replicas).To(BeEquivalentTo(1)) - g.Expect(conditions.IsTrue(tcp, controlplanev1.AvailableCondition)).To(BeTrue()) + g.Expect(conditions.IsTrue(tcp, string(controlplanev1.AvailableCondition))).To(BeTrue()) g.Expect(tcp.Status.ReadyReplicas).To(BeEquivalentTo(1)) machineList := &clusterv1.MachineList{} @@ -399,7 +404,7 @@ func (suite *ControllersSuite) TestRollingUpdate() { g.Expect(tcp.Status.Selector).NotTo(BeEmpty()) g.Expect(tcp.Status.Replicas).To(BeEquivalentTo(2)) - g.Expect(conditions.IsTrue(tcp, controlplanev1.AvailableCondition)).To(BeTrue()) + g.Expect(conditions.IsTrue(tcp, string(controlplanev1.AvailableCondition))).To(BeTrue()) g.Expect(tcp.Status.ReadyReplicas).To(BeEquivalentTo(2)) machineList := &clusterv1.MachineList{} @@ -425,14 +430,14 @@ func (suite *ControllersSuite) TestRollingUpdate() { machines := suite.getMachines(fakeClient, cluster) for _, machine := range machines { g.Expect(machine.Spec.Version).ToNot(BeNil()) - g.Expect(*machine.Spec.Version).To(BeEquivalentTo(tcp.Spec.Version)) + g.Expect(machine.Spec.Version).To(BeEquivalentTo(tcp.Spec.Version)) } }, time.Minute).Should(Succeed()) for _, machine := range suite.getMachines(fakeClient, cluster) { talosconfig := &bootstrapv1alpha3.TalosConfig{} - g.Expect(fakeClient.Get(suite.ctx, client.ObjectKey{Name: machine.Spec.Bootstrap.ConfigRef.Name, Namespace: machine.Spec.Bootstrap.ConfigRef.Namespace}, talosconfig)).NotTo(HaveOccurred()) + g.Expect(fakeClient.Get(suite.ctx, client.ObjectKey{Name: machine.Spec.Bootstrap.ConfigRef.Name, Namespace: cluster.Namespace}, talosconfig)).NotTo(HaveOccurred()) patchHelper, err := patch.NewHelper(talosconfig, fakeClient) talosconfig.Spec.TalosVersion = "v1.5.0" @@ -450,7 +455,7 @@ func (suite *ControllersSuite) TestRollingUpdate() { machines := suite.getMachines(fakeClient, cluster) for _, machine := range machines { g.Expect(machine.Spec.Version).ToNot(BeNil()) - g.Expect(*machine.Spec.Version).To(BeEquivalentTo(tcp.Spec.Version)) + g.Expect(machine.Spec.Version).To(BeEquivalentTo(tcp.Spec.Version)) } }, time.Minute).Should(Succeed()) @@ -505,7 +510,7 @@ func (suite *ControllersSuite) TestUppercaseHostnames() { g.Expect(tcp.Status.Selector).NotTo(BeEmpty()) g.Expect(tcp.Status.Replicas).To(BeEquivalentTo(3)) - g.Expect(conditions.IsTrue(tcp, controlplanev1.AvailableCondition)).To(BeTrue()) + g.Expect(conditions.IsTrue(tcp, string(controlplanev1.AvailableCondition))).To(BeTrue()) g.Expect(tcp.Status.ReadyReplicas).To(BeEquivalentTo(3)) machineList := &clusterv1.MachineList{} @@ -560,10 +565,8 @@ func (suite *ControllersSuite) runUpdater(ctx context.Context, fakeClient client Type: clusterv1.MachineInternalIP, }, } - machine.Status.NodeRef = &corev1.ObjectReference{ - Kind: "Node", - APIVersion: corev1.SchemeGroupVersion.String(), - Name: machine.Name, + machine.Status.NodeRef = clusterv1.MachineNodeReference{ + Name: machine.Name, } g.Expect(err).To(BeNil()) @@ -733,7 +736,13 @@ func (suite *ControllersSuite) setupCluster(fakeClient client.Client, ns string, g.Expect(fakeClient.Create(suite.ctx, cluster)).To(Succeed()) patchHelper, err := patch.NewHelper(cluster, fakeClient) g.Expect(err).To(BeNil()) - cluster.Status = clusterv1.ClusterStatus{InfrastructureReady: true} + cluster.Status = clusterv1.ClusterStatus{ + Conditions: []metav1.Condition{ + { + Type: string(clusterv1.InfrastructureReadyV1Beta1Condition), + }, + }, + } g.Expect(patchHelper.Patch(suite.ctx, cluster)).To(Succeed()) genericInfrastructureMachineTemplate := &unstructured.Unstructured{ diff --git a/controllers/controlplane.go b/controllers/controlplane.go index b9c856e..ae3ee2f 100644 --- a/controllers/controlplane.go +++ b/controllers/controlplane.go @@ -16,7 +16,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/controller-runtime/pkg/client" @@ -38,7 +38,7 @@ type ControlPlane struct { // newControlPlane returns an instantiated ControlPlane. func newControlPlane(ctx context.Context, client client.Client, cluster *clusterv1.Cluster, tcp *controlplanev1.TalosControlPlane, machines collections.Machines) (*ControlPlane, error) { - infraObjects, err := getInfraResources(ctx, client, machines) + infraObjects, err := getInfraResources(ctx, client, machines, cluster.Namespace) if err != nil { return nil, err } @@ -93,10 +93,10 @@ func (c *ControlPlane) MachinesNeedingRollout() collections.Machines { } // getInfraResources fetches the external infrastructure resource for each machine in the collection and returns a map of machine.Name -> infraResource. -func getInfraResources(ctx context.Context, cl client.Client, machines collections.Machines) (map[string]*unstructured.Unstructured, error) { +func getInfraResources(ctx context.Context, cl client.Client, machines collections.Machines, namespace string) (map[string]*unstructured.Unstructured, error) { result := map[string]*unstructured.Unstructured{} for _, m := range machines { - infraObj, err := external.Get(ctx, cl, &m.Spec.InfrastructureRef) + infraObj, err := external.GetObjectFromContractVersionedRef(ctx, cl, m.Spec.InfrastructureRef, namespace) if err != nil { if apierrors.IsNotFound(errors.Cause(err)) { continue @@ -114,7 +114,7 @@ func getTalosConfigs(ctx context.Context, cl client.Client, machines collections for _, m := range machines { bootstrapRef := m.Spec.Bootstrap.ConfigRef - if bootstrapRef == nil { + if !bootstrapRef.IsDefined() { continue } diff --git a/controllers/etcd.go b/controllers/etcd.go index a4cc3fc..c7b2b46 100644 --- a/controllers/etcd.go +++ b/controllers/etcd.go @@ -13,7 +13,7 @@ import ( controlplanev1 "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3" machineapi "github.com/siderolabs/talos/pkg/machinery/api/machine" talosclient "github.com/siderolabs/talos/pkg/machinery/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -180,7 +180,7 @@ func (r *TalosControlPlaneReconciler) auditEtcd(ctx context.Context, tcp *contro for _, machine := range machines.Items { // nb: we'll assume any machine that doesn't have a noderef is new and we can audit later because // otherwise a new etcd member can get removed before even getting the noderef set by the CAPI controllers. - if machine.Status.NodeRef == nil { + if !machine.Status.NodeRef.IsDefined() { return fmt.Errorf("some CP machines do not have a noderef") } } @@ -188,7 +188,7 @@ func (r *TalosControlPlaneReconciler) auditEtcd(ctx context.Context, tcp *contro var designatedCPMachine clusterv1.Machine for _, machine := range machines.Items { - if !machine.ObjectMeta.DeletionTimestamp.IsZero() || machine.Status.NodeRef == nil { + if !machine.ObjectMeta.DeletionTimestamp.IsZero() || !machine.Status.NodeRef.IsDefined() { continue } diff --git a/controllers/health.go b/controllers/health.go index 7968db0..64e50a3 100644 --- a/controllers/health.go +++ b/controllers/health.go @@ -15,7 +15,7 @@ import ( machineapi "github.com/siderolabs/talos/pkg/machinery/api/machine" talosclient "github.com/siderolabs/talos/pkg/machinery/client" "google.golang.org/grpc/codes" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) type errServiceUnhealthy struct { diff --git a/controllers/helpers_test.go b/controllers/helpers_test.go index bdc0a7a..4150787 100644 --- a/controllers/helpers_test.go +++ b/controllers/helpers_test.go @@ -14,7 +14,6 @@ import ( "os" "strings" "sync" - "time" "github.com/gobuffalo/flect" "github.com/pkg/errors" @@ -44,8 +43,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/controllers/remote" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -71,7 +70,7 @@ func withCluster(key types.NamespacedName) reconcilerOption { } } -func newReconciler(client client.Client, opts ...reconcilerOption) *controllers.TalosControlPlaneReconciler { +func newReconciler(controllerClient client.Client, opts ...reconcilerOption) *controllers.TalosControlPlaneReconciler { logger := zap.New(zap.WriteTo(os.Stdout)) logf.SetLogger(logger) @@ -81,16 +80,16 @@ func newReconciler(client client.Client, opts ...reconcilerOption) *controllers. opt(&options) } - var tracker *remote.ClusterCacheTracker - if options.cluster != nil { - tracker = remote.NewTestClusterCacheTracker(logger, client, client, fakeScheme, *options.cluster) - } + clusterCache := clustercache.NewFakeClusterCache(controllerClient, client.ObjectKey{ + Namespace: options.cluster.Namespace, + Name: options.cluster.Name, + }) return &controllers.TalosControlPlaneReconciler{ - Client: client, - Log: logger, - APIReader: client, - Tracker: tracker, + Client: controllerClient, + Log: logger, + APIReader: controllerClient, + ClusterCache: clusterCache, } } @@ -172,20 +171,19 @@ func createMachineNodePair(name string, cluster *clusterv1.Cluster, tcp *control }, Spec: clusterv1.MachineSpec{ ClusterName: cluster.Name, - InfrastructureRef: corev1.ObjectReference{ - Kind: GenericInfrastructureMachineCRD.Kind, - APIVersion: GenericInfrastructureMachineCRD.APIVersion, - Name: GenericInfrastructureMachineCRD.Name, - Namespace: GenericInfrastructureMachineCRD.Namespace, + InfrastructureRef: clusterv1.ContractVersionedObjectReference{ + Kind: GenericInfrastructureMachineCRD.Kind, + APIGroup: GenericInfrastructureMachineCRD.Spec.Group, + Name: GenericInfrastructureMachineCRD.Name, + }, + Deletion: clusterv1.MachineDeletionSpec{ + NodeDrainTimeoutSeconds: pointer.Int32(10), }, - NodeDeletionTimeout: &metav1.Duration{Duration: 10 * time.Second}, - Version: pointer.String("v1.16.6"), + Version: "v1.16.6", }, Status: clusterv1.MachineStatus{ - NodeRef: &corev1.ObjectReference{ - Kind: "Node", - APIVersion: corev1.SchemeGroupVersion.String(), - Name: name, + NodeRef: clusterv1.MachineNodeReference{ + Name: name, }, Addresses: clusterv1.MachineAddresses{ { diff --git a/controllers/scale.go b/controllers/scale.go index 607022a..d37a779 100644 --- a/controllers/scale.go +++ b/controllers/scale.go @@ -12,8 +12,9 @@ import ( controlplanev1 "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" @@ -25,9 +26,12 @@ func (r *TalosControlPlaneReconciler) scaleUpControlPlane(ctx context.Context, c numMachines := len(controlPlane.Machines) desiredReplicas := tcp.Spec.GetReplicas() - conditions.MarkFalse(tcp, controlplanev1.ResizedCondition, controlplanev1.ScalingUpReason, clusterv1.ConditionSeverityWarning, - "Scaling up control plane to %d replicas (actual %d)", - desiredReplicas, numMachines) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ResizedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.ScalingUpReason, + Message: fmt.Sprintf("Scaling up control plane to %d replicas (actual %d)", desiredReplicas, numMachines), + }) // Create a new Machine w/ join r.Log.Info("scaling up control plane", "Desired", desiredReplicas, "Existing", numMachines) @@ -45,13 +49,20 @@ func (r *TalosControlPlaneReconciler) scaleDownControlPlane( numMachines := len(controlPlane.Machines) desiredReplicas := tcp.Spec.GetReplicas() - conditions.MarkFalse(tcp, controlplanev1.ResizedCondition, controlplanev1.ScalingDownReason, clusterv1.ConditionSeverityWarning, - "Scaling down control plane to %d replicas (actual %d)", - desiredReplicas, numMachines) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ResizedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.ScalingDownReason, + Message: fmt.Sprintf("Scaling down control plane to %d replicas (actual %d)", desiredReplicas, numMachines), + }) if numMachines == 1 { - conditions.MarkFalse(tcp, controlplanev1.ResizedCondition, controlplanev1.ScalingDownReason, clusterv1.ConditionSeverityError, - "Cannot scale down control plane nodes to 0") + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ResizedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.ScalingDownReason, + Message: "Cannot scale down control plane nodes to 0", + }) return ctrl.Result{}, nil } @@ -66,7 +77,7 @@ func (r *TalosControlPlaneReconciler) scaleDownControlPlane( return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } - if !conditions.IsTrue(tcp, controlplanev1.EtcdClusterHealthyCondition) { + if !conditions.IsTrue(tcp, string(controlplanev1.EtcdClusterHealthyCondition)) { r.Log.Info("waiting for etcd to become healthy before scaling down") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil @@ -74,7 +85,7 @@ func (r *TalosControlPlaneReconciler) scaleDownControlPlane( r.Log.Info("scaling down control plane", "Desired", desiredReplicas, "Existing", numMachines) - client, err := r.Tracker.GetClient(ctx, util.ObjectKey(cluster)) + client, err := r.ClusterCache.GetClient(ctx, util.ObjectKey(cluster)) if err != nil { return ctrl.Result{RequeueAfter: 20 * time.Second}, err } @@ -90,7 +101,7 @@ func (r *TalosControlPlaneReconciler) scaleDownControlPlane( // delete nodes for the machines which are being destroyed for _, machine := range controlPlane.Machines { // do not allow scaling down until all nodes have nodeRefs - if machine.Status.NodeRef == nil { + if !machine.Status.NodeRef.IsDefined() { r.Log.Info("one of machines does not have NodeRef", "machine", machine.Name) waitForNodeRefs = true @@ -144,7 +155,7 @@ func (r *TalosControlPlaneReconciler) scaleDownControlPlane( func (r *TalosControlPlaneReconciler) deleteNode(ctx context.Context, client client.Client, machine *clusterv1.Machine) (ctrl.Result, error) { var node v1.Node - name := types.NamespacedName{Name: machine.Status.NodeRef.Name, Namespace: machine.Status.NodeRef.Namespace} + name := types.NamespacedName{Name: machine.Status.NodeRef.Name} err := client.Get(ctx, name, &node) if err != nil { diff --git a/controllers/taloscontrolplane_controller.go b/controllers/taloscontrolplane_controller.go index 33c52c6..bb5a4de 100644 --- a/controllers/taloscontrolplane_controller.go +++ b/controllers/taloscontrolplane_controller.go @@ -32,9 +32,9 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apiserver/pkg/storage/names" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" - "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/certs" @@ -57,10 +57,10 @@ const requeueDuration = 30 * time.Second // TalosControlPlaneReconciler reconciles a TalosControlPlane object type TalosControlPlaneReconciler struct { client.Client - APIReader client.Reader - Log logr.Logger - Scheme *runtime.Scheme - Tracker *remote.ClusterCacheTracker + APIReader client.Reader + Log logr.Logger + Scheme *runtime.Scheme + ClusterCache clustercache.ClusterCache } func (r *TalosControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error { @@ -120,7 +120,7 @@ func (r *TalosControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Re } // Wait for the cluster infrastructure to be ready before creating machines - if !cluster.Status.InfrastructureReady { + if !conditions.IsTrue(cluster, string(clusterv1.InfrastructureReadyV1Beta1Condition)) { logger.Info("cluster infra not ready") return ctrl.Result{Requeue: true}, nil @@ -208,13 +208,29 @@ func (r *TalosControlPlaneReconciler) reconcile(ctx context.Context, cluster *cl return ctrl.Result{}, err } - conditionGetters := make([]conditions.Getter, len(ownedMachines.Items)) - + var conditionOptions = make([]*metav1.Condition, len(ownedMachines.Items)) for i, v := range ownedMachines.Items { - conditionGetters[i] = &v + var getter conditions.Getter = &v + + condition := conditions.Get(getter, string(controlplanev1.MachinesReadyCondition)) + conditionOptions[i] = condition } - conditions.SetAggregate(tcp, controlplanev1.MachinesReadyCondition, conditionGetters, conditions.AddSourceRef(), conditions.WithStepCounterIf(false)) + var conditionOptionTypes = make([]string, len(conditionOptions)) + for i, v := range conditionOptions { + conditionOptionTypes[i] = v.Type + } + + var summaryOptions conditions.ForConditionTypes = conditionOptionTypes + err = conditions.SetSummaryCondition( + tcp, + tcp, + string(controlplanev1.MachinesReadyCondition), + summaryOptions, + ) + if err != nil { + return ctrl.Result{}, errors.Wrap(err, "failed to set summary Machine Ready condition") + } var ( errs error @@ -259,8 +275,8 @@ func (r *TalosControlPlaneReconciler) ClusterToTalosControlPlane(_ context.Conte } controlPlaneRef := c.Spec.ControlPlaneRef - if controlPlaneRef != nil && controlPlaneRef.Kind == "TalosControlPlane" { - return []ctrl.Request{{NamespacedName: client.ObjectKey{Namespace: controlPlaneRef.Namespace, Name: controlPlaneRef.Name}}} + if controlPlaneRef.IsDefined() && controlPlaneRef.Kind == "TalosControlPlane" { + return []ctrl.Request{{NamespacedName: client.ObjectKey{Namespace: c.Namespace, Name: controlPlaneRef.Name}}} } return nil @@ -293,7 +309,12 @@ func (r *TalosControlPlaneReconciler) reconcileDelete(ctx context.Context, clust } } - conditions.MarkFalse(tcp, controlplanev1.ResizedCondition, clusterv1.DeletingReason, clusterv1.ConditionSeverityInfo, "") + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ResizedCondition), + Status: metav1.ConditionFalse, + Reason: clusterv1.DeletingReason, + }) + // Requeue the deletion so we can check to make sure machines got cleaned up return ctrl.Result{RequeueAfter: requeueDuration}, nil } @@ -324,8 +345,8 @@ func (r *TalosControlPlaneReconciler) getFailureDomain(_ context.Context, cluste } retList := []string{} - for key := range cluster.Status.FailureDomains { - retList = append(retList, key) + for _, domain := range cluster.Status.FailureDomains { + retList = append(retList, domain.Name) } return retList } @@ -341,7 +362,7 @@ func (r *TalosControlPlaneReconciler) bootControlPlane(ctx context.Context, clus } // Clone the infrastructure template - infraRef, err := external.CreateFromTemplate(ctx, &external.CreateFromTemplateInput{ + _, infraRef, err := external.CreateFromTemplate(ctx, &external.CreateFromTemplateInput{ Client: r.Client, TemplateRef: &tcp.Spec.InfrastructureTemplate, Namespace: tcp.Namespace, @@ -352,8 +373,12 @@ func (r *TalosControlPlaneReconciler) bootControlPlane(ctx context.Context, clus }, }) if err != nil { - conditions.MarkFalse(tcp, controlplanev1.MachinesCreatedCondition, controlplanev1.InfrastructureTemplateCloningFailedReason, - clusterv1.ConditionSeverityError, "%s", err.Error()) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesCreatedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.InfrastructureTemplateCloningFailedReason, + Message: fmt.Sprintf("Failed to clone infrastructure template: %v", err), + }) return ctrl.Result{}, err } @@ -366,8 +391,12 @@ func (r *TalosControlPlaneReconciler) bootControlPlane(ctx context.Context, clus // Clone the bootstrap configuration bootstrapRef, err := r.generateTalosConfig(ctx, tcp, bootstrapConfig) if err != nil { - conditions.MarkFalse(tcp, controlplanev1.MachinesCreatedCondition, controlplanev1.BootstrapTemplateCloningFailedReason, - clusterv1.ConditionSeverityError, "%s", err.Error()) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesCreatedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.BootstrapTemplateCloningFailedReason, + Message: fmt.Sprintf("Failed to create bootstrap configuration: %v", err), + }) return ctrl.Result{}, err } @@ -386,22 +415,26 @@ func (r *TalosControlPlaneReconciler) bootControlPlane(ctx context.Context, clus }, Spec: clusterv1.MachineSpec{ ClusterName: cluster.Name, - Version: &tcp.Spec.Version, - InfrastructureRef: *infraRef, + Version: tcp.Spec.Version, + InfrastructureRef: infraRef, Bootstrap: clusterv1.Bootstrap{ - ConfigRef: bootstrapRef, + ConfigRef: *bootstrapRef, }, }, } failureDomains := r.getFailureDomain(ctx, cluster) if len(failureDomains) > 0 { - machine.Spec.FailureDomain = &failureDomains[rand.Intn(len(failureDomains))] + machine.Spec.FailureDomain = failureDomains[rand.Intn(len(failureDomains))] } if err := r.Client.Create(ctx, machine); err != nil { - conditions.MarkFalse(tcp, controlplanev1.MachinesCreatedCondition, controlplanev1.MachineGenerationFailedReason, - clusterv1.ConditionSeverityError, "%s", err.Error()) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesCreatedCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.MachineGenerationFailedReason, + Message: fmt.Sprintf("Failed to create machine: %v", err), + }) return ctrl.Result{}, errors.Wrap(err, "Failed to create machine") } @@ -494,7 +527,7 @@ func (r *TalosControlPlaneReconciler) bootstrapCluster(ctx context.Context, tcp return nil } -func (r *TalosControlPlaneReconciler) generateTalosConfig(ctx context.Context, tcp *controlplanev1.TalosControlPlane, spec *cabptv1.TalosConfigSpec) (*corev1.ObjectReference, error) { +func (r *TalosControlPlaneReconciler) generateTalosConfig(ctx context.Context, tcp *controlplanev1.TalosControlPlane, spec *cabptv1.TalosConfigSpec) (*clusterv1.ContractVersionedObjectReference, error) { owner := metav1.OwnerReference{ APIVersion: controlplanev1.GroupVersion.String(), Kind: "TalosControlPlane", @@ -516,12 +549,10 @@ func (r *TalosControlPlaneReconciler) generateTalosConfig(ctx context.Context, t return nil, errors.Wrap(err, "Failed to create bootstrap configuration") } - bootstrapRef := &corev1.ObjectReference{ - APIVersion: cabptv1.GroupVersion.String(), - Kind: "TalosConfig", - Name: bootstrapConfig.GetName(), - Namespace: bootstrapConfig.GetNamespace(), - UID: bootstrapConfig.GetUID(), + bootstrapRef := &clusterv1.ContractVersionedObjectReference{ + APIGroup: cabptv1.GroupVersion.Group, + Kind: "TalosConfig", + Name: bootstrapConfig.GetName(), } return bootstrapRef, nil @@ -563,11 +594,11 @@ func (r *TalosControlPlaneReconciler) updateStatus(ctx context.Context, tcp *con } lowestVersion := collections.FromMachineList(&ownedMachines).LowestVersion() - if lowestVersion != nil { - tcp.Status.Version = lowestVersion + if lowestVersion != "" { + tcp.Status.Version = &lowestVersion } - c, err := r.Tracker.GetClient(ctx, util.ObjectKey(cluster)) + c, err := r.ClusterCache.GetClient(ctx, util.ObjectKey(cluster)) if err != nil { r.Log.Info("failed to get kubeconfig for the cluster", "error", err) @@ -595,7 +626,10 @@ func (r *TalosControlPlaneReconciler) updateStatus(ctx context.Context, tcp *con // if we were able to fetch some resources via control plane endpoint, // workload cluster control plane endpoint is available tcp.Status.Initialized = true - conditions.MarkTrue(tcp, controlplanev1.AvailableCondition) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.AvailableCondition), + Status: metav1.ConditionTrue, + }) for _, node := range nodes.Items { if util.IsNodeReady(&node) { @@ -703,11 +737,19 @@ func (r *TalosControlPlaneReconciler) reconcileEtcdMembers(ctx context.Context, } if err := r.etcdHealthcheck(ctx, tcp, machines.Items); err != nil { - conditions.MarkFalse(tcp, controlplanev1.EtcdClusterHealthyCondition, controlplanev1.EtcdClusterUnhealthyReason, - clusterv1.ConditionSeverityWarning, "%s", err.Error()) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.EtcdClusterHealthyCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.EtcdClusterUnhealthyReason, + Message: fmt.Sprintf("Failed to perform etcd healthcheck: %v", err), + }) + errs = kerrors.NewAggregate([]error{errs, err}) } else { - conditions.MarkTrue(tcp, controlplanev1.EtcdClusterHealthyCondition) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.EtcdClusterHealthyCondition), + Status: metav1.ConditionTrue, + }) } if errs != nil { @@ -725,24 +767,41 @@ func (r *TalosControlPlaneReconciler) reconcileNodeHealth(ctx context.Context, c reason = controlplanev1.ControlPlaneComponentsUnhealthyReason } - conditions.MarkFalse(tcp, controlplanev1.ControlPlaneComponentsHealthyCondition, reason, - clusterv1.ConditionSeverityWarning, "%s", err.Error()) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ControlPlaneComponentsHealthyCondition), + Status: metav1.ConditionFalse, + Reason: reason, + Message: fmt.Sprintf("Failed to perform control plane healthcheck: %v", err), + }) return ctrl.Result{RequeueAfter: 10 * time.Second}, err } else { - conditions.MarkTrue(tcp, controlplanev1.ControlPlaneComponentsHealthyCondition) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ControlPlaneComponentsHealthyCondition), + Status: metav1.ConditionTrue, + }) } return ctrl.Result{}, nil } func (r *TalosControlPlaneReconciler) reconcileConditions(ctx context.Context, cluster *clusterv1.Cluster, tcp *controlplanev1.TalosControlPlane, machines *clusterv1.MachineList) (result ctrl.Result, err error) { - if !conditions.Has(tcp, controlplanev1.AvailableCondition) { - conditions.MarkFalse(tcp, controlplanev1.AvailableCondition, controlplanev1.WaitingForTalosBootReason, clusterv1.ConditionSeverityInfo, "") + if !conditions.Has(tcp, string(controlplanev1.AvailableCondition)) { + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.AvailableCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.WaitingForTalosBootReason, + Message: "Waiting for Talos to bootstrap", + }) } - if !conditions.Has(tcp, controlplanev1.MachinesBootstrapped) { - conditions.MarkFalse(tcp, controlplanev1.MachinesBootstrapped, controlplanev1.WaitingForMachinesReason, clusterv1.ConditionSeverityInfo, "") + if !conditions.Has(tcp, string(controlplanev1.MachinesBootstrapped)) { + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesBootstrapped), + Status: metav1.ConditionFalse, + Reason: controlplanev1.WaitingForMachinesReason, + Message: "Waiting for machines to bootstrap", + }) } return ctrl.Result{}, nil @@ -763,15 +822,20 @@ func (r *TalosControlPlaneReconciler) reconcileMachines(ctx context.Context, clu needRollout := controlPlane.MachinesNeedingRollout() if len(needRollout) > 0 { logger.Info("rolling out control plane machines", "needRollout", needRollout.Names()) - conditions.MarkFalse(controlPlane.TCP, - controlplanev1.MachinesSpecUpToDateCondition, - controlplanev1.RollingUpdateInProgressReason, - clusterv1.ConditionSeverityWarning, "Rolling %d replicas with outdated spec (%d replicas up to date)", len(needRollout), len(controlPlane.Machines)-len(needRollout)) + conditions.Set(controlPlane.TCP, metav1.Condition{ + Type: string(controlplanev1.MachinesSpecUpToDateCondition), + Status: metav1.ConditionFalse, + Reason: controlplanev1.RollingUpdateInProgressReason, + Message: fmt.Sprintf("Rolling %d replicas with outdated spec (%d replicas up to date)", len(needRollout), len(controlPlane.Machines)-len(needRollout)), + }) return r.upgradeControlPlane(ctx, cluster, tcp, controlPlane, needRollout) } else { - if conditions.Has(controlPlane.TCP, controlplanev1.MachinesSpecUpToDateCondition) { - conditions.MarkTrue(controlPlane.TCP, controlplanev1.MachinesSpecUpToDateCondition) + if conditions.Has(controlPlane.TCP, string(controlplanev1.MachinesSpecUpToDateCondition)) { + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesSpecUpToDateCondition), + Status: metav1.ConditionTrue, + }) } } @@ -800,28 +864,46 @@ func (r *TalosControlPlaneReconciler) reconcileMachines(ctx context.Context, clu default: if !reflect.ValueOf(tcp.Spec.ControlPlaneConfig.InitConfig).IsZero() { tcp.Status.Bootstrapped = true - conditions.MarkTrue(tcp, controlplanev1.MachinesBootstrapped) + + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesBootstrapped), + Status: metav1.ConditionTrue, + }) } if !tcp.Status.Bootstrapped { if err := r.bootstrapCluster(ctx, tcp, machines.Items); err != nil { - conditions.MarkFalse(tcp, controlplanev1.MachinesBootstrapped, controlplanev1.WaitingForTalosBootReason, clusterv1.ConditionSeverityInfo, "%s", err.Error()) + conditions.Set(controlPlane.TCP, metav1.Condition{ + Type: string(controlplanev1.MachinesBootstrapped), + Status: metav1.ConditionFalse, + Reason: controlplanev1.WaitingForTalosBootReason, + Message: fmt.Sprintf("Failed to bootstrap cluster: %v", err), + }) logger.Info("bootstrap failed, retrying in 20 seconds", "error", err) return ctrl.Result{RequeueAfter: time.Second * 20}, nil } - conditions.MarkTrue(tcp, controlplanev1.MachinesBootstrapped) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesBootstrapped), + Status: metav1.ConditionTrue, + }) tcp.Status.Bootstrapped = true } - if conditions.Has(tcp, controlplanev1.MachinesReadyCondition) { - conditions.MarkTrue(tcp, controlplanev1.ResizedCondition) + if conditions.Has(tcp, string(controlplanev1.MachinesReadyCondition)) { + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.ResizedCondition), + Status: metav1.ConditionTrue, + }) } - conditions.MarkTrue(tcp, controlplanev1.MachinesCreatedCondition) + conditions.Set(tcp, metav1.Condition{ + Type: string(controlplanev1.MachinesCreatedCondition), + Status: metav1.ConditionTrue, + }) } return ctrl.Result{}, nil @@ -829,24 +911,30 @@ func (r *TalosControlPlaneReconciler) reconcileMachines(ctx context.Context, clu func patchTalosControlPlane(ctx context.Context, patchHelper *patch.Helper, tcp *controlplanev1.TalosControlPlane, opts ...patch.Option) error { // Always update the readyCondition by summarizing the state of other conditions. - conditions.SetSummary(tcp, - conditions.WithConditions( - controlplanev1.MachinesCreatedCondition, - controlplanev1.ResizedCondition, - controlplanev1.MachinesReadyCondition, - controlplanev1.AvailableCondition, - controlplanev1.MachinesBootstrapped, - ), + err := conditions.SetSummaryCondition( + tcp, + tcp, + clusterv1.ReadyCondition, + conditions.ForConditionTypes{ + string(controlplanev1.MachinesCreatedCondition), + string(controlplanev1.ResizedCondition), + string(controlplanev1.MachinesReadyCondition), + string(controlplanev1.AvailableCondition), + string(controlplanev1.MachinesBootstrapped), + }, ) + if err != nil { + return errors.Wrap(err, "failed to set summary Ready condition") + } opts = append(opts, - patch.WithOwnedConditions{Conditions: []clusterv1.ConditionType{ - controlplanev1.MachinesCreatedCondition, - clusterv1.ReadyCondition, - controlplanev1.ResizedCondition, - controlplanev1.MachinesReadyCondition, - controlplanev1.AvailableCondition, - controlplanev1.MachinesBootstrapped, + patch.WithOwnedConditions{Conditions: []string{ + string(controlplanev1.MachinesCreatedCondition), + string(clusterv1.ReadyCondition), + string(controlplanev1.ResizedCondition), + string(controlplanev1.MachinesReadyCondition), + string(controlplanev1.AvailableCondition), + string(controlplanev1.MachinesBootstrapped), }}, ) diff --git a/controllers/upgrade.go b/controllers/upgrade.go index fd90ccd..1aeab2a 100644 --- a/controllers/upgrade.go +++ b/controllers/upgrade.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" controlplanev1 "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3" diff --git a/go.mod b/go.mod index fd6f365..b511b4d 100644 --- a/go.mod +++ b/go.mod @@ -2,54 +2,50 @@ module github.com/siderolabs/cluster-api-control-plane-provider-talos go 1.24.0 -// compatibility with kube-apiserver v0.32.3, should be dropped once kube-apiserver dependency is updated -replace github.com/google/cel-go => github.com/google/cel-go v0.22.0 +replace github.com/siderolabs/cluster-api-bootstrap-provider-talos => github.com/kommodity-io/cluster-api-bootstrap-provider-talos v0.6.11-0.20250916073917-c40e6b4106f7 + +replace github.com/siderolabs/capi-utils => github.com/kommodity-io/capi-utils v0.0.0-20250916072405-6dc21bd3e9fe require ( github.com/coreos/go-semver v0.3.1 github.com/go-logr/logr v1.4.3 github.com/gobuffalo/flect v1.0.3 github.com/google/uuid v1.6.0 - github.com/onsi/gomega v1.36.3 + github.com/onsi/gomega v1.38.0 github.com/pkg/errors v0.9.1 - github.com/siderolabs/capi-utils v0.0.0-20250812174642-8d7036d74b13 - github.com/siderolabs/cluster-api-bootstrap-provider-talos v0.6.10 + github.com/siderolabs/capi-utils v0.0.0-20250916072405-6dc21bd3e9fe + github.com/siderolabs/cluster-api-bootstrap-provider-talos v0.6.11-0.20250916073917-c40e6b4106f7 github.com/siderolabs/crypto v0.6.3 github.com/siderolabs/gen v0.8.5 github.com/siderolabs/go-retry v0.3.3 github.com/siderolabs/talos/pkg/machinery v1.11.0 github.com/spf13/pflag v1.0.7 github.com/stretchr/testify v1.10.0 - golang.org/x/sync v0.15.0 + golang.org/x/sync v0.16.0 google.golang.org/grpc v1.74.2 google.golang.org/protobuf v1.36.6 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.32.3 - k8s.io/apiextensions-apiserver v0.32.3 - k8s.io/apimachinery v0.32.3 - k8s.io/apiserver v0.32.3 - k8s.io/client-go v0.32.3 - k8s.io/component-base v0.32.3 + k8s.io/api v0.33.3 + k8s.io/apiextensions-apiserver v0.33.3 + k8s.io/apimachinery v0.33.3 + k8s.io/apiserver v0.33.3 + k8s.io/client-go v0.33.3 + k8s.io/component-base v0.33.3 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 - sigs.k8s.io/cluster-api v1.10.4 - sigs.k8s.io/controller-runtime v0.20.4 + sigs.k8s.io/cluster-api v1.11.1 + sigs.k8s.io/controller-runtime v0.21.0 ) require ( cel.dev/expr v0.24.0 // indirect - dario.cat/mergo v1.0.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect - github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/ProtonMail/go-crypto v1.2.0 // indirect github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect github.com/ProtonMail/gopenpgp/v2 v2.8.3 // indirect github.com/adrg/xdg v0.5.3 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -73,32 +69,28 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-viper/mapstructure/v2 v2.3.0 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.26.0 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-github/v53 v53.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/josharian/native v1.1.0 // indirect github.com/jsimonetti/rtnetlink/v2 v2.0.5 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mdlayher/ethtool v0.4.0 // indirect github.com/mdlayher/genetlink v1.3.2 // indirect github.com/mdlayher/netlink v1.7.2 // indirect github.com/mdlayher/socket v0.5.1 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -109,14 +101,13 @@ require ( github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sagikazarmark/locafero v0.7.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect - github.com/shopspring/decimal v1.4.0 // indirect github.com/siderolabs/go-api-signature v0.3.7 // indirect github.com/siderolabs/go-pointer v1.0.1 // indirect github.com/siderolabs/net v0.4.0 // indirect @@ -128,36 +119,37 @@ require ( github.com/spf13/viper v1.20.1 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/valyala/fastjson v1.6.4 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect go.opentelemetry.io/otel/metric v1.36.0 // indirect go.opentelemetry.io/otel/sdk v1.36.0 // indirect go.opentelemetry.io/otel/trace v1.36.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.38.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + golang.org/x/crypto v0.40.0 // indirect golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect - golang.org/x/net v0.40.0 // indirect + golang.org/x/net v0.42.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.25.0 // indirect + golang.org/x/term v0.33.0 // indirect + golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/cluster-bootstrap v0.32.3 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect + k8s.io/cluster-bootstrap v0.33.3 // indirect + k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index bbb8bb8..bc1b15a 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,6 @@ github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -44,13 +42,10 @@ github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8F github.com/containernetworking/cni v1.2.3/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.26 h1:xiiEkVB1Dwolb24pkeDUDBfygV9/XsOSq79yFCrhptY= -github.com/coredns/corefile-migration v1.0.26/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= +github.com/coredns/corefile-migration v1.0.27 h1:WIIw5sU0LfGgoGnhdrYdVcto/aWmJoGA/C62iwkU0JM= +github.com/coredns/corefile-migration v1.0.27/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosi-project/runtime v1.10.7 h1:/wPv9zNLVB/eicNoHW0x0z9OdQp4gzHzJsp7uwPPVSo= github.com/cosi-project/runtime v1.10.7/go.mod h1:TceKaCgUFF2+JLTFMtHvp12ARshvUeg34eY6TngkZa4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -100,22 +95,20 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk= -github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= -github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -128,18 +121,10 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -151,8 +136,6 @@ github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= @@ -163,6 +146,12 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/kommodity-io/capi-utils v0.0.0-20250916072405-6dc21bd3e9fe h1:dgiNb3zlrZhUMIq3KFB/Za+A0BciIsOBm1fWsS3QvzQ= +github.com/kommodity-io/capi-utils v0.0.0-20250916072405-6dc21bd3e9fe/go.mod h1:c3tLQ9Hz1+2OBC9cE1zm/JoU6+mGpR9sOqr6gPYEugU= +github.com/kommodity-io/cluster-api-bootstrap-provider-talos v0.6.11-0.20250916073917-c40e6b4106f7 h1:IuqMZjLKabIufPJGJnsVkSNgBwE3xMLjQDY4yCkHjHc= +github.com/kommodity-io/cluster-api-bootstrap-provider-talos v0.6.11-0.20250916073917-c40e6b4106f7/go.mod h1:gUKXgBkQvSCCanRpsJyrUwoCIcPXFkRoBJEvfXRjsxA= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -170,6 +159,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mdlayher/ethtool v0.4.0 h1:jjMGNSQfqauwFCtSzcqpa57R0AJdxKdQgbQ9mAOtM4Q= @@ -191,10 +182,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0= -github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM= -github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= -github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= +github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww= @@ -212,12 +203,12 @@ github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2/go.mod h1 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= @@ -233,10 +224,6 @@ github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/siderolabs/capi-utils v0.0.0-20250812174642-8d7036d74b13 h1:Lp2DlMoZJuQyNhzonn4l5J6WUQfk0c7zxHiHX1yl03I= -github.com/siderolabs/capi-utils v0.0.0-20250812174642-8d7036d74b13/go.mod h1:GUoGble9zPNKxMuQYKGyn4YisjK3l5MTDAe/fJi8X9w= -github.com/siderolabs/cluster-api-bootstrap-provider-talos v0.6.10 h1:haDwcWQeH2KeEAaNI2n+YKvCW4yKIKduKzJyvoO/nFA= -github.com/siderolabs/cluster-api-bootstrap-provider-talos v0.6.10/go.mod h1:XvHobhX81U5CIjctm5K2ehg3RVJ+jiw/jCL33Ym+j8I= github.com/siderolabs/crypto v0.6.3 h1:9eGHzAJQg7FvPcjVANLQKnepc0nrl5IkLJ3FxhMvsQw= github.com/siderolabs/crypto v0.6.3/go.mod h1:LEhGuXlvwElMgh+rYjCFw6JgfOgyaC+sqsl/YwWU+EM= github.com/siderolabs/gen v0.8.5 h1:xlWXTynnGD/epaj7uplvKvmAkBH+Fp51bLnw1JC0xME= @@ -253,10 +240,6 @@ github.com/siderolabs/protoenc v0.2.2 h1:vVQDrTjV+QSOiroWTca6h2Sn5XWYk7VSUPav5J0 github.com/siderolabs/protoenc v0.2.2/go.mod h1:gtkHkjSCFEceXUHUzKDpnuvXu1mab9D3pVxTnQN+z+o= github.com/siderolabs/talos/pkg/machinery v1.11.0 h1:4OYGCyKJ5+jot9gP7hSRfX3rfy/fibcfJPljDATyWeg= github.com/siderolabs/talos/pkg/machinery v1.11.0/go.mod h1:/GdYEC36ejnEqxvGyYngAB8R+ilSqu2ZBW79Vc273Mo= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= @@ -285,47 +268,23 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= -github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk= -github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.4.0 h1:TU77id3TnN/zKr7CO/uk+fBCwF2jGcMuw2B/FMAzYIk= -go.etcd.io/bbolt v1.4.0/go.mod h1:AsD+OCi/qPN1giOX1aiLAha3o1U8rAz65bvN4j0sRuk= -go.etcd.io/etcd/api/v3 v3.5.20 h1:aKfz3nPZECWoZJXMSH9y6h2adXjtOHaHTGEVCuCmaz0= -go.etcd.io/etcd/api/v3 v3.5.20/go.mod h1:QqKGViq4KTgOG43dr/uH0vmGWIaoJY3ggFi6ZH0TH/U= -go.etcd.io/etcd/client/pkg/v3 v3.5.20 h1:sZIAtra+xCo56gdf6BR62to/hiie5Bwl7hQIqMzVTEM= -go.etcd.io/etcd/client/pkg/v3 v3.5.20/go.mod h1:qaOi1k4ZA9lVLejXNvyPABrVEe7VymMF2433yyRQ7O0= -go.etcd.io/etcd/client/v2 v2.305.16 h1:kQrn9o5czVNaukf2A2At43cE9ZtWauOtf9vRZuiKXow= -go.etcd.io/etcd/client/v2 v2.305.16/go.mod h1:h9YxWCzcdvZENbfzBTFCnoNumr2ax3F19sKMqHFmXHE= -go.etcd.io/etcd/client/v3 v3.5.20 h1:jMT2MwQEhyvhQg49Cec+1ZHJzfUf6ZgcmV0GjPv0tIQ= -go.etcd.io/etcd/client/v3 v3.5.20/go.mod h1:J5lbzYRMUR20YolS5UjlqqMcu3/wdEvG5VNBhzyo3m0= -go.etcd.io/etcd/pkg/v3 v3.5.16 h1:cnavs5WSPWeK4TYwPYfmcr3Joz9BH+TZ6qoUtz6/+mc= -go.etcd.io/etcd/pkg/v3 v3.5.16/go.mod h1:+lutCZHG5MBBFI/U4eYT5yL7sJfnexsoM20Y0t2uNuY= -go.etcd.io/etcd/raft/v3 v3.5.16 h1:zBXA3ZUpYs1AwiLGPafYAKKl/CORn/uaxYDwlNwndAk= -go.etcd.io/etcd/raft/v3 v3.5.16/go.mod h1:P4UP14AxofMJ/54boWilabqqWoW9eLodl6I5GdGzazI= -go.etcd.io/etcd/server/v3 v3.5.16 h1:d0/SAdJ3vVsZvF8IFVb1k8zqMZ+heGcNfft71ul9GWE= -go.etcd.io/etcd/server/v3 v3.5.16/go.mod h1:ynhyZZpdDp1Gq49jkUg5mfkDWZwXnn3eIqCqtJnrD/s= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= @@ -334,20 +293,26 @@ go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFw go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= +go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -361,8 +326,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -370,8 +335,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -386,15 +351,15 @@ golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -403,16 +368,14 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79 h1:iOye66xuaAK0WnkPuhQPUFy8eJcmwUXqGGP3om6IxX8= google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79/go.mod h1:HKJDgKsFUnv5VAGeQjz8kxcgDP0HoE0iZNp0OdZNlhE= google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 h1:1ZwqphdOdWYXsUHgMpU/101nCtf/kSp9hOrcvFsnl10= @@ -428,42 +391,44 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= -k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= -k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= -k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= -k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= -k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8= -k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc= -k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= -k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= -k8s.io/cluster-bootstrap v0.32.3 h1:AqIpsUhB6MUeaAsl1WvaUw54AHRd2hfZrESlKChtd8s= -k8s.io/cluster-bootstrap v0.32.3/go.mod h1:CHbBwgOb6liDV6JFUTkx5t85T2xidy0sChBDoyYw344= -k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= -k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= +k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8= +k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE= +k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= +k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= +k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA= +k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= +k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= +k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA= +k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg= +k8s.io/cluster-bootstrap v0.33.3 h1:u2NTxJ5CFSBFXaDxLQoOWMly8eni31psVso+caq6uwI= +k8s.io/cluster-bootstrap v0.33.3/go.mod h1:p970f8u8jf273zyQ5raD8WUu2XyAl0SAWOY82o7i/ds= +k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= +k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.10.4 h1:5mdyWLGbbwOowWrjqM/J9N600QnxTohu5J1/1YR6g7c= -sigs.k8s.io/cluster-api v1.10.4/go.mod h1:68GJs286ZChsncp+TxYNj/vhy2NWokiPtH4+SA0afs0= -sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU= -sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/cluster-api v1.11.1 h1:7CyGCTxv1p3Y2kRe1ljTj/w4TcdIdWNj0CTBc4i1aBo= +sigs.k8s.io/cluster-api v1.11.1/go.mod h1:zyrjgJ5RbXhwKcAdUlGPNK5YOHpcmxXvur+5I8lkMUQ= +sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= +sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 37cb4d9..9544aba 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -391,8 +391,8 @@ func (suite *IntegrationSuite) Test05ScaleControlPlaneToZero() { return err } - if !conditions.Has(&tcp, controlplanev1.ResizedCondition) && - conditions.GetMessage(&tcp, controlplanev1.ResizedCondition) != "Cannot scale down control plane nodes to 0" { + if !conditions.Has(&tcp, string(controlplanev1.ResizedCondition)) && + conditions.GetMessage(&tcp, string(controlplanev1.ResizedCondition)) != "Cannot scale down control plane nodes to 0" { return retry.ExpectedErrorf("node resized conditions error status hasn't updated") } diff --git a/main.go b/main.go index 900d26d..41f9faf 100644 --- a/main.go +++ b/main.go @@ -23,8 +23,8 @@ import ( "k8s.io/component-base/logs" logsv1 "k8s.io/component-base/logs/api/v1" "k8s.io/klog/v2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/controllers/remote" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/util/flags" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" @@ -141,41 +141,33 @@ func main() { os.Exit(1) } - // Set up a ClusterCacheTracker to provide to controllers - // requiring a connection to a remote cluster - log := ctrl.Log.WithName("remote").WithName("ClusterCacheTracker") - - tracker, err := remote.NewClusterCacheTracker(mgr, remote.ClusterCacheTrackerOptions{ - SecretCachingClient: secretCachingClient, - ControllerName: "cacppt", - Log: &log, - ClientUncachedObjects: []client.Object{ - &corev1.ConfigMap{}, - &corev1.Secret{}, - &corev1.Pod{}, - &appsv1.Deployment{}, - &appsv1.DaemonSet{}, + clusterCache, err := clustercache.SetupWithManager(context.Background(), mgr, clustercache.Options{ + SecretClient: secretCachingClient, + Client: clustercache.ClientOptions{ + Cache: clustercache.ClientCacheOptions{ + DisableFor: []client.Object{ + &corev1.ConfigMap{}, + &corev1.Secret{}, + &corev1.Pod{}, + &appsv1.Deployment{}, + &appsv1.DaemonSet{}, + }, + }, }, + }, controller.Options{ + MaxConcurrentReconciles: 10, }) + if err != nil { setupLog.Error(err, "unable to create cluster cache tracker") os.Exit(1) } - - if err := (&remote.ClusterCacheReconciler{ - Client: mgr.GetClient(), - Tracker: tracker, - }).SetupWithManager(context.Background(), mgr, controller.Options{MaxConcurrentReconciles: 10}); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "ClusterCacheReconciler") - os.Exit(1) - } - if err = (&controllers.TalosControlPlaneReconciler{ - Client: mgr.GetClient(), - APIReader: mgr.GetAPIReader(), - Log: ctrl.Log.WithName("controllers").WithName("TalosControlPlane"), - Tracker: tracker, - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + APIReader: mgr.GetAPIReader(), + Log: ctrl.Log.WithName("controllers").WithName("TalosControlPlane"), + Scheme: mgr.GetScheme(), + ClusterCache: clusterCache, }).SetupWithManager(mgr, controller.Options{MaxConcurrentReconciles: 10}); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TalosControlPlane") os.Exit(1)