From 2b9c390b78fb3ef3a51137bf8ace4142a380cea9 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Thu, 21 Nov 2024 09:18:23 -0700 Subject: [PATCH] Bump CAPI to v1.9.0-rc.1 --- Makefile | 10 +- Tiltfile | 2 +- api/v1beta1/azuremachine_types.go | 3 +- .../azuremanagedcluster_webhook_test.go | 2 +- .../azuremanagedcontrolplane_webhook_test.go | 2 +- api/v1beta1/azuremanagedmachinepool_types.go | 3 +- .../azuremanagedmachinepool_webhook_test.go | 2 +- api/v1beta1/zz_generated.deepcopy.go | 5 +- azure/errors.go | 8 + azure/scope/machine.go | 3 +- azure/scope/machinepool.go | 3 +- azure/scope/machinepoolmachine.go | 3 +- .../resourcehealth/resourcehealth_test.go | 2 +- ...ster.x-k8s.io_azureasomanagedclusters.yaml | 2 +- ...8s.io_azureasomanagedclustertemplates.yaml | 2 +- ...x-k8s.io_azureasomanagedcontrolplanes.yaml | 2 +- ..._azureasomanagedcontrolplanetemplates.yaml | 2 +- ....x-k8s.io_azureasomanagedmachinepools.yaml | 2 +- ...o_azureasomanagedmachinepooltemplates.yaml | 2 +- ...uster.x-k8s.io_azureclusteridentities.yaml | 12 +- ...ucture.cluster.x-k8s.io_azureclusters.yaml | 22 +- ...luster.x-k8s.io_azureclustertemplates.yaml | 10 +- ...ter.x-k8s.io_azuremachinepoolmachines.yaml | 13 +- ...re.cluster.x-k8s.io_azuremachinepools.yaml | 14 +- ...ucture.cluster.x-k8s.io_azuremachines.yaml | 14 +- ...luster.x-k8s.io_azuremachinetemplates.yaml | 8 +- ...cluster.x-k8s.io_azuremanagedclusters.yaml | 2 +- ...x-k8s.io_azuremanagedclustertemplates.yaml | 2 +- ...er.x-k8s.io_azuremanagedcontrolplanes.yaml | 16 +- ....io_azuremanagedcontrolplanetemplates.yaml | 8 +- ...ter.x-k8s.io_azuremanagedmachinepools.yaml | 20 +- ...s.io_azuremanagedmachinepooltemplates.yaml | 12 +- config/rbac/role.yaml | 290 ++---------------- controllers/asosecret_controller.go | 10 +- .../azureasomanagedcluster_controller.go | 8 +- .../azureasomanagedcontrolplane_controller.go | 6 +- .../azureasomanagedmachinepool_controller.go | 10 +- controllers/azurecluster_controller.go | 6 +- controllers/azurecluster_controller_test.go | 5 +- controllers/azurejson_machine_controller.go | 6 +- .../azurejson_machinepool_controller.go | 6 +- .../azurejson_machinetemplate_controller.go | 6 +- controllers/azuremachine_controller.go | 15 +- controllers/azuremachine_controller_test.go | 10 +- controllers/azuremanagedcluster_controller.go | 6 +- .../azuremanagedcontrolplane_controller.go | 6 +- .../azuremanagedmachinepool_controller.go | 6 +- controllers/helpers.go | 4 +- controllers/helpers_test.go | 2 +- .../20210222-azure-machinepool-machine.md | 106 +++---- exp/api/v1beta1/azuremachinepool_types.go | 3 +- .../v1beta1/azuremachinepool_webhook_test.go | 2 +- .../v1beta1/azuremachinepoolmachine_types.go | 3 +- exp/api/v1beta1/zz_generated.deepcopy.go | 5 +- .../azuremachinepool_controller.go | 11 +- .../azuremachinepoolmachine_controller.go | 9 +- go.mod | 56 ++-- go.sum | 178 +++++------ main.go | 31 +- test/e2e/config/azure-dev.yaml | 34 +- test/e2e/data/shared/v1beta1/metadata.yaml | 3 + 61 files changed, 378 insertions(+), 678 deletions(-) diff --git a/Makefile b/Makefile index 5b25f24dc11..c2da900f20c 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ ifneq ($(abspath $(ROOT_DIR)),$(GOPATH)/src/sigs.k8s.io/cluster-api-provider-azu endif # Binaries. -CONTROLLER_GEN_VER := v0.15.0 +CONTROLLER_GEN_VER := v0.16.0 CONTROLLER_GEN_BIN := controller-gen CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER) @@ -135,11 +135,7 @@ CODESPELL_BIN := codespell CODESPELL_DIST_DIR := codespell_dist CODESPELL := $(TOOLS_BIN_DIR)/$(CODESPELL_DIST_DIR)/$(CODESPELL_BIN) -# This is a commit from CR main (22.05.2024). -# Intentionally using a commit from main to use a setup-envtest version -# that uses binaries from controller-tools, not GCS. -# CR PR: https://github.com/kubernetes-sigs/controller-runtime/pull/2811 -SETUP_ENVTEST_VER := v0.0.0-20240522175850-2e9781e9fc60 +SETUP_ENVTEST_VER := release-0.19 SETUP_ENVTEST_BIN := setup-envtest SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER)) SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest @@ -325,7 +321,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create ./hack/create-custom-cloud-provider-config.sh # Deploy CAPI - timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done" + timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.0-rc.1/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done" # Deploy CAAPH timeout --foreground 300 bash -c "until curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases/download/v0.2.5/addon-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -; do sleep 5; done" diff --git a/Tiltfile b/Tiltfile index aa9a4927a37..2ae1fb5c871 100644 --- a/Tiltfile +++ b/Tiltfile @@ -20,7 +20,7 @@ settings = { "deploy_cert_manager": True, "preload_images_for_kind": True, "kind_cluster_name": "capz", - "capi_version": "v1.8.5", + "capi_version": "v1.9.0-rc.1", "caaph_version": "v0.2.5", "cert_manager_version": "v1.16.1", "kubernetes_version": "v1.28.3", diff --git a/api/v1beta1/azuremachine_types.go b/api/v1beta1/azuremachine_types.go index 6d78c8335f7..04a8a70c7c6 100644 --- a/api/v1beta1/azuremachine_types.go +++ b/api/v1beta1/azuremachine_types.go @@ -21,7 +21,6 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/errors" ) const ( @@ -219,7 +218,7 @@ type AzureMachineStatus struct { // can be added as events to the Machine object and/or logged in the // controller's output. // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` + FailureReason *string `json:"failureReason,omitempty"` // ErrorMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable diff --git a/api/v1beta1/azuremanagedcluster_webhook_test.go b/api/v1beta1/azuremanagedcluster_webhook_test.go index e97807aacb9..57e4e6abcf1 100644 --- a/api/v1beta1/azuremanagedcluster_webhook_test.go +++ b/api/v1beta1/azuremanagedcluster_webhook_test.go @@ -158,7 +158,7 @@ func TestAzureManagedCluster_ValidateCreateFailure(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { if tc.featureGateEnabled != nil { - defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)() + utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled) } g := NewWithT(t) _, err := tc.amc.ValidateCreate() diff --git a/api/v1beta1/azuremanagedcontrolplane_webhook_test.go b/api/v1beta1/azuremanagedcontrolplane_webhook_test.go index e24a9c24e7d..d0b179f19a4 100644 --- a/api/v1beta1/azuremanagedcontrolplane_webhook_test.go +++ b/api/v1beta1/azuremanagedcontrolplane_webhook_test.go @@ -1682,7 +1682,7 @@ func TestAzureManagedControlPlane_ValidateCreateFailure(t *testing.T) { t.Run(tc.name, func(t *testing.T) { g := NewWithT(t) if tc.featureGateEnabled != nil { - defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)() + utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled) } mcpw := &azureManagedControlPlaneWebhook{ Client: client, diff --git a/api/v1beta1/azuremanagedmachinepool_types.go b/api/v1beta1/azuremanagedmachinepool_types.go index d7ae6c82c2d..077cfb01344 100644 --- a/api/v1beta1/azuremanagedmachinepool_types.go +++ b/api/v1beta1/azuremanagedmachinepool_types.go @@ -19,7 +19,6 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" ) const ( @@ -464,7 +463,7 @@ type AzureManagedMachinePoolStatus struct { // can be added as events to the Machine object and/or logged in the // controller's output. // +optional - ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"` + ErrorReason *string `json:"errorReason,omitempty"` // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the diff --git a/api/v1beta1/azuremanagedmachinepool_webhook_test.go b/api/v1beta1/azuremanagedmachinepool_webhook_test.go index f3b0603fb02..8f6d1be5ba4 100644 --- a/api/v1beta1/azuremanagedmachinepool_webhook_test.go +++ b/api/v1beta1/azuremanagedmachinepool_webhook_test.go @@ -1328,7 +1328,7 @@ func TestAzureManagedMachinePool_ValidateCreateFailure(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { if tc.featureGateEnabled != nil { - defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)() + utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled) } g := NewWithT(t) mw := &azureManagedMachinePoolWebhook{} diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 0ba9340795f..b523662a8d0 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -25,7 +25,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/errors" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -985,7 +984,7 @@ func (in *AzureMachineStatus) DeepCopyInto(out *AzureMachineStatus) { } if in.FailureReason != nil { in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) + *out = new(string) **out = **in } if in.FailureMessage != nil { @@ -1918,7 +1917,7 @@ func (in *AzureManagedMachinePoolStatus) DeepCopyInto(out *AzureManagedMachinePo *out = *in if in.ErrorReason != nil { in, out := &in.ErrorReason, &out.ErrorReason - *out = new(errors.MachineStatusError) + *out = new(string) **out = **in } if in.ErrorMessage != nil { diff --git a/azure/errors.go b/azure/errors.go index 849801bf4e5..0d719e80037 100644 --- a/azure/errors.go +++ b/azure/errors.go @@ -62,6 +62,14 @@ const ( TransientErrorType ReconcileErrorType = "Transient" // TerminalErrorType cannot be recovered, will not be requeued. TerminalErrorType ReconcileErrorType = "Terminal" + // UnsupportedChange is returned when a change is not supported. + UnsupportedChange = "UnsupportedChange" + // InvalidConfiguration is returned when a configuration is invalid. + InvalidConfiguration = "InvalidConfiguration" + // CreateError is returned when an error occurs during creation. + CreateError = "CreateError" + // UpdateError is returned when an error occurs during update. + UpdateError = "UpdateError" ) // Error returns the error message for a ReconcileError. diff --git a/azure/scope/machine.go b/azure/scope/machine.go index 8e96dae2179..d6a96964f36 100644 --- a/azure/scope/machine.go +++ b/azure/scope/machine.go @@ -29,7 +29,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" @@ -603,7 +602,7 @@ func (m *MachineScope) SetFailureMessage(v error) { } // SetFailureReason sets the AzureMachine status failure reason. -func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError) { +func (m *MachineScope) SetFailureReason(v string) { m.AzureMachine.Status.FailureReason = &v } diff --git a/azure/scope/machinepool.go b/azure/scope/machinepool.go index b6e42282f12..c636bfb982b 100644 --- a/azure/scope/machinepool.go +++ b/azure/scope/machinepool.go @@ -33,7 +33,6 @@ import ( "k8s.io/klog/v2" "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" @@ -648,7 +647,7 @@ func (m *MachinePoolScope) SetFailureMessage(v error) { } // SetFailureReason sets the AzureMachinePool status failure reason. -func (m *MachinePoolScope) SetFailureReason(v capierrors.MachineStatusError) { +func (m *MachinePoolScope) SetFailureReason(v string) { m.AzureMachinePool.Status.FailureReason = &v } diff --git a/azure/scope/machinepoolmachine.go b/azure/scope/machinepoolmachine.go index 1f26c7f05b6..dcc63de6a25 100644 --- a/azure/scope/machinepoolmachine.go +++ b/azure/scope/machinepoolmachine.go @@ -28,7 +28,6 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/controllers/remote" - capierrors "sigs.k8s.io/cluster-api/errors" expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" @@ -277,7 +276,7 @@ func (s *MachinePoolMachineScope) SetFailureMessage(v error) { } // SetFailureReason sets the AzureMachinePoolMachine status failure reason. -func (s *MachinePoolMachineScope) SetFailureReason(v capierrors.MachineStatusError) { +func (s *MachinePoolMachineScope) SetFailureReason(v string) { s.AzureMachinePoolMachine.Status.FailureReason = &v } diff --git a/azure/services/resourcehealth/resourcehealth_test.go b/azure/services/resourcehealth/resourcehealth_test.go index 2c871d6e104..2d6353f52a7 100644 --- a/azure/services/resourcehealth/resourcehealth_test.go +++ b/azure/services/resourcehealth/resourcehealth_test.go @@ -126,7 +126,7 @@ func TestReconcileResourceHealth(t *testing.T) { }{scopeMock, filtererMock} } - defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.AKSResourceHealth, !tc.featureDisabled)() + utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.AKSResourceHealth, !tc.featureDisabled) err := s.Reconcile(context.TODO()) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml index c846cc1f558..faf8e67c5a7 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml index 8e50e0335fe..dd87ca9febe 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml index 3ee7e2f643d..81cef000084 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedcontrolplanes.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml index 9c7a6432b9e..a4b15260ab9 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedcontrolplanetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml index f2a97082b00..8f2926527d0 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedmachinepools.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml index d9271b4039a..04346259888 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureasomanagedmachinepooltemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml index 5082fe4ca42..4afea2bbf52 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureclusteridentities.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -75,7 +75,6 @@ spec: a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. - A nil or empty selector indicates that AzureCluster cannot use this AzureClusterIdentity from any namespace. properties: @@ -152,7 +151,6 @@ spec: ResourceID is the Azure resource ID for the User Assigned MSI resource. Only applicable when type is UserAssignedMSI. - Deprecated: This field no longer has any effect. type: string tenantID: @@ -200,20 +198,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml index f7bc94783b0..e431fddbf45 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -93,7 +93,6 @@ spec: - PublicCloud: "AzurePublicCloud" - USGovernmentCloud: "AzureUSGovernmentCloud" - Note that values other than the default must also be accompanied by corresponding changes to the aso-controller-settings Secret to configure ASO to refer to the non-Public cloud. ASO currently does not support referring to multiple different clouds in a single installation. The following fields must @@ -102,10 +101,8 @@ spec: - AZURE_RESOURCE_MANAGER_ENDPOINT - AZURE_RESOURCE_MANAGER_AUDIENCE - See the [ASO docs] for more details. - [ASO docs]: https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/ type: string bastionSpec: @@ -597,11 +594,11 @@ spec: attributes: additionalProperties: type: string - description: Attributes is a free form map of attributes an + description: attributes is a free form map of attributes an infrastructure provider might use or require. type: object controlPlane: - description: ControlPlane determines if this failure domain + description: controlPlane determines if this failure domain is suitable for use by control plane machines. type: boolean type: object @@ -627,7 +624,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- @@ -1358,20 +1354,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string @@ -1390,11 +1386,11 @@ spec: attributes: additionalProperties: type: string - description: Attributes is a free form map of attributes an + description: attributes is a free form map of attributes an infrastructure provider might use or require. type: object controlPlane: - description: ControlPlane determines if this failure domain + description: controlPlane determines if this failure domain is suitable for use by control plane machines. type: boolean type: object diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml index 55af109a657..7469beecf31 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azureclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -66,7 +66,6 @@ spec: - PublicCloud: "AzurePublicCloud" - USGovernmentCloud: "AzureUSGovernmentCloud" - Note that values other than the default must also be accompanied by corresponding changes to the aso-controller-settings Secret to configure ASO to refer to the non-Public cloud. ASO currently does not support referring to multiple different clouds in a single installation. The following fields must @@ -75,10 +74,8 @@ spec: - AZURE_RESOURCE_MANAGER_ENDPOINT - AZURE_RESOURCE_MANAGER_AUDIENCE - See the [ASO docs] for more details. - [ASO docs]: https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/ type: string bastionSpec: @@ -459,11 +456,11 @@ spec: attributes: additionalProperties: type: string - description: Attributes is a free form map of attributes + description: attributes is a free form map of attributes an infrastructure provider might use or require. type: object controlPlane: - description: ControlPlane determines if this failure + description: controlPlane determines if this failure domain is suitable for use by control plane machines. type: boolean type: object @@ -489,7 +486,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml index 6c08ac25292..465a0a38689 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremachinepoolmachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -109,20 +109,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string @@ -138,7 +138,6 @@ spec: reconciling the MachinePool and will contain a more verbose string suitable for logging and human consumption. - Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. @@ -149,7 +148,6 @@ spec: reconciling the MachinePool machine and will contain a succinct value suitable for machine interpretation. - Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. @@ -216,7 +214,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml index 63bf19b5ff0..247c8a5f57d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremachinepools.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -818,20 +818,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string @@ -847,7 +847,6 @@ spec: reconciling the MachinePool and will contain a more verbose string suitable for logging and human consumption. - This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is @@ -857,7 +856,6 @@ spec: spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. - Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. @@ -868,7 +866,6 @@ spec: reconciling the MachinePool and will contain a succinct value suitable for machine interpretation. - This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is @@ -878,7 +875,6 @@ spec: spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. - Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml index 81785dfa62b..7b1ae6d7d74 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -765,20 +765,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string @@ -794,7 +794,6 @@ spec: reconciling the Machine and will contain a more verbose string suitable for logging and human consumption. - This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is @@ -804,7 +803,6 @@ spec: spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. - Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. @@ -815,7 +813,6 @@ spec: reconciling the Machine and will contain a succinct value suitable for machine interpretation. - This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is @@ -825,7 +822,6 @@ spec: spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. - Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml index b6f4f956063..ecdb2f0064f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremachinetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -51,26 +51,22 @@ spec: ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta. - ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience. - During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package. - In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable. - In future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited. properties: @@ -78,7 +74,7 @@ spec: additionalProperties: type: string description: |- - Annotations is an unstructured key value map stored with a resource that may be + annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml index 63913baf0b7..8af867af52b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml index e47f2e1d6df..fa1371e55fd 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml index 793746a4144..087a21869c3 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedcontrolplanes.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -272,7 +272,6 @@ spec: - PublicCloud: "AzurePublicCloud" - USGovernmentCloud: "AzureUSGovernmentCloud" - Note that values other than the default must also be accompanied by corresponding changes to the aso-controller-settings Secret to configure ASO to refer to the non-Public cloud. ASO currently does not support referring to multiple different clouds in a single installation. The following fields must @@ -281,10 +280,8 @@ spec: - AZURE_RESOURCE_MANAGER_ENDPOINT - AZURE_RESOURCE_MANAGER_AUDIENCE - See the [ASO docs] for more details. - [ASO docs]: https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/ type: string controlPlaneEndpoint: @@ -330,7 +327,6 @@ spec: AKSExtension represents the configuration for an AKS cluster extension. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/aks/cluster-extensions properties: aksAssignedIdentityType: @@ -430,7 +426,6 @@ spec: FleetsMember is the spec for the fleet this cluster is a member of. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/templates/microsoft.containerservice/2023-03-15-preview/fleets/members properties: group: @@ -504,7 +499,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- @@ -921,20 +915,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml index 63f4e72dd41..e4dcb51a875 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedcontrolplanetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -269,7 +269,6 @@ spec: - PublicCloud: "AzurePublicCloud" - USGovernmentCloud: "AzureUSGovernmentCloud" - Note that values other than the default must also be accompanied by corresponding changes to the aso-controller-settings Secret to configure ASO to refer to the non-Public cloud. ASO currently does not support referring to multiple different clouds in a single installation. The following fields must @@ -278,10 +277,8 @@ spec: - AZURE_RESOURCE_MANAGER_ENDPOINT - AZURE_RESOURCE_MANAGER_AUDIENCE - See the [ASO docs] for more details. - [ASO docs]: https://azure.github.io/azure-service-operator/guide/aso-controller-settings-options/ type: string disableLocalAccounts: @@ -307,7 +304,6 @@ spec: AKSExtension represents the configuration for an AKS cluster extension. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/aks/cluster-extensions properties: aksAssignedIdentityType: @@ -410,7 +406,6 @@ spec: FleetsMember is the spec for the fleet this cluster is a member of. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/templates/microsoft.containerservice/2023-03-15-preview/fleets/members properties: group: @@ -483,7 +478,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml index 6ece0da501d..1ed4282f15a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedmachinepools.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -99,7 +99,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/aks/enable-host-encryption type: boolean enableFIPS: @@ -195,7 +194,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/rest/api/aks/agent-pools/create-or-update?tabs=HTTP#kubeletdisktype enum: - OS @@ -213,7 +211,6 @@ spec: Must be at least 1. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview#temporary-disk minimum: 1 type: integer @@ -456,7 +453,6 @@ spec: TransparentHugePageDefrag specifies whether the kernel should make aggressive use of memory compaction to make more hugepages available. See also [Linux doc]. - [Linux doc]: https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge for more details. enum: - always @@ -470,7 +466,6 @@ spec: TransparentHugePageEnabled specifies various modes of Transparent Hugepages. See also [Linux doc]. - [Linux doc]: https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge for more details. enum: - always @@ -484,7 +479,6 @@ spec: Immutable. See also [AKS doc], [K8s doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/configure-azure-cni#configure-maximum---new-clusters [K8s doc]: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ type: integer @@ -507,7 +501,6 @@ spec: Node labels represent the labels for all of the nodes present in node pool. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/use-labels type: object nodePublicIPPrefixID: @@ -528,7 +521,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/cluster-configuration#ephemeral-os enum: - Ephemeral @@ -541,7 +533,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/rest/api/aks/agent-pools/create-or-update?tabs=HTTP#ostype enum: - Linux @@ -605,7 +596,6 @@ spec: Taints specifies the taints for nodes present in this agent pool. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/use-multiple-node-pools#setting-node-pool-taints items: description: Taint represents a Kubernetes taint. @@ -659,20 +649,20 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- - Severity provides an explicit classification of Reason code, so the users or machines can immediately + severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. type: string status: - description: Status of the condition, one of True, False, Unknown. + description: status of the condition, one of True, False, Unknown. type: string type: description: |- - Type of condition in CamelCase or in foo.example.com/CamelCase. + type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml index 8aab129395f..f88410495a5 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.0 name: azuremanagedmachinepooltemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -82,7 +82,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/en-us/azure/aks/enable-host-encryption type: boolean enableFIPS: @@ -180,7 +179,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/rest/api/aks/agent-pools/create-or-update?tabs=HTTP#kubeletdisktype enum: - OS @@ -198,7 +196,6 @@ spec: Must be at least 1. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview#temporary-disk minimum: 1 type: integer @@ -442,7 +439,6 @@ spec: TransparentHugePageDefrag specifies whether the kernel should make aggressive use of memory compaction to make more hugepages available. See also [Linux doc]. - [Linux doc]: https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge for more details. enum: - always @@ -456,7 +452,6 @@ spec: TransparentHugePageEnabled specifies various modes of Transparent Hugepages. See also [Linux doc]. - [Linux doc]: https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge for more details. enum: - always @@ -470,7 +465,6 @@ spec: Immutable. See also [AKS doc], [K8s doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/configure-azure-cni#configure-maximum---new-clusters [K8s doc]: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ type: integer @@ -493,7 +487,6 @@ spec: Node labels represent the labels for all of the nodes present in node pool. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/use-labels type: object nodePublicIPPrefixID: @@ -514,7 +507,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/cluster-configuration#ephemeral-os enum: - Ephemeral @@ -527,7 +519,6 @@ spec: Immutable. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/rest/api/aks/agent-pools/create-or-update?tabs=HTTP#ostype enum: - Linux @@ -588,7 +579,6 @@ spec: Taints specifies the taints for nodes present in this agent pool. See also [AKS doc]. - [AKS doc]: https://learn.microsoft.com/azure/aks/use-multiple-node-pools#setting-node-pool-taints items: description: Taint represents a Kubernetes taint. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index eb76b94f586..a4c42a4c62a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -60,10 +60,13 @@ rules: - clusters verbs: - create + - get + - list + - patch + - watch - apiGroups: - cluster.x-k8s.io resources: - - clusters - clusters/status verbs: - get @@ -76,10 +79,14 @@ rules: - machinepools verbs: - create + - get + - list + - patch + - update + - watch - apiGroups: - cluster.x-k8s.io resources: - - machinepools - machinepools/status verbs: - get @@ -101,45 +108,7 @@ rules: - containerservice.azure.com resources: - fleetsmembers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - containerservice.azure.com - resources: - - fleetsmembers/status - verbs: - - get - - list - - watch -- apiGroups: - - containerservice.azure.com - resources: - managedclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - containerservice.azure.com - resources: - - managedclusters/status - verbs: - - get - - list - - watch -- apiGroups: - - containerservice.azure.com - resources: - managedclustersagentpools verbs: - create @@ -152,6 +121,8 @@ rules: - apiGroups: - containerservice.azure.com resources: + - fleetsmembers/status + - managedclusters/status - managedclustersagentpools/status verbs: - get @@ -169,186 +140,17 @@ rules: - infrastructure.cluster.x-k8s.io resources: - azureasomanagedclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedclusters/finalizers - verbs: - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azureasomanagedcontrolplanes - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedcontrolplanes/finalizers - verbs: - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedcontrolplanes/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azureasomanagedmachinepools - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedmachinepools/finalizers - verbs: - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureasomanagedmachinepools/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azureclusteridentities - azureclusteridentities/status - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azureclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azureclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azuremachinepoolmachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremachinepoolmachines/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azuremachinepools - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremachinepools/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azuremachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremachines/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremachinetemplates - - azuremachinetemplates/status - verbs: - - get - - list - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - azuremanagedclusters + - azuremanagedcontrolplanes + - azuremanagedmachinepools verbs: - create - delete @@ -360,27 +162,24 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - azuremanagedclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremanagedcontrolplanes + - azureasomanagedclusters/finalizers + - azureasomanagedcontrolplanes/finalizers + - azureasomanagedmachinepools/finalizers verbs: - - create - - delete - - get - - list - - patch - update - - watch - apiGroups: - infrastructure.cluster.x-k8s.io resources: + - azureasomanagedclusters/status + - azureasomanagedcontrolplanes/status + - azureasomanagedmachinepools/status + - azureclusters/status + - azuremachinepoolmachines/status + - azuremachinepools/status + - azuremachines/status + - azuremanagedclusters/status - azuremanagedcontrolplanes/status + - azuremanagedmachinepools/status verbs: - get - patch @@ -388,23 +187,12 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - azuremanagedmachinepools + - azuremachinetemplates + - azuremachinetemplates/status verbs: - - create - - delete - get - list - - patch - - update - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - azuremanagedmachinepools/status - verbs: - - get - - patch - - update - apiGroups: - kubernetesconfiguration.azure.com resources: @@ -453,30 +241,6 @@ rules: - get - list - watch -- apiGroups: - - network.azure.com - resources: - - privateendpoints - - virtualnetworks - - virtualnetworkssubnets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - network.azure.com - resources: - - privateendpoints/status - - virtualnetworks/status - - virtualnetworkssubnets/status - verbs: - - get - - list - - watch - apiGroups: - resources.azure.com resources: diff --git a/controllers/asosecret_controller.go b/controllers/asosecret_controller.go index 74b8851b674..79dfb328859 100644 --- a/controllers/asosecret_controller.go +++ b/controllers/asosecret_controller.go @@ -68,8 +68,8 @@ func (asos *ASOSecretReconciler) SetupWithManager(ctx context.Context, mgr ctrl. return ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1.AzureCluster{}). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, asos.WatchFilterValue)). - WithEventFilter(predicates.ResourceIsNotExternallyManaged(log)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, asos.WatchFilterValue)). + WithEventFilter(predicates.ResourceIsNotExternallyManaged(mgr.GetScheme(), log)). Named("ASOSecret"). Owns(&corev1.Secret{}). // Add a watch on ASO secrets owned by an AzureManagedControlPlane @@ -82,7 +82,7 @@ func (asos *ASOSecretReconciler) SetupWithManager(ctx context.Context, mgr ctrl. &infrav1.AzureManagedControlPlane{}, &handler.EnqueueRequestForObject{}, builder.WithPredicates( - predicates.ResourceNotPausedAndHasFilterLabel(log, asos.WatchFilterValue), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, asos.WatchFilterValue), ), ). // Add a watch on clusterv1.Cluster object for unpause notifications. @@ -90,8 +90,8 @@ func (asos *ASOSecretReconciler) SetupWithManager(ctx context.Context, mgr ctrl. &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1.GroupVersion.WithKind(infrav1.AzureClusterKind), mgr.GetClient(), &infrav1.AzureCluster{})), builder.WithPredicates( - predicates.ClusterUnpaused(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, asos.WatchFilterValue), + predicates.ClusterUnpaused(mgr.GetScheme(), log), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, asos.WatchFilterValue), ), ). Complete(asos) diff --git a/controllers/azureasomanagedcluster_controller.go b/controllers/azureasomanagedcluster_controller.go index 99a32c4abd3..22e95ca9752 100644 --- a/controllers/azureasomanagedcluster_controller.go +++ b/controllers/azureasomanagedcluster_controller.go @@ -78,8 +78,8 @@ func (r *AzureASOManagedClusterReconciler) SetupWithManager(ctx context.Context, c, err := ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1alpha.AzureASOManagedCluster{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, r.WatchFilterValue)). - WithEventFilter(predicates.ResourceIsNotExternallyManaged(log)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceIsNotExternallyManaged(mgr.GetScheme(), log)). // Watch clusters for pause/unpause notifications Watches( &clusterv1.Cluster{}, @@ -87,7 +87,7 @@ func (r *AzureASOManagedClusterReconciler) SetupWithManager(ctx context.Context, util.ClusterToInfrastructureMapFunc(ctx, infrav1alpha.GroupVersion.WithKind(infrav1alpha.AzureASOManagedClusterKind), mgr.GetClient(), &infrav1alpha.AzureASOManagedCluster{}), ), builder.WithPredicates( - predicates.ResourceHasFilterLabel(log, r.WatchFilterValue), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), ClusterUpdatePauseChange(log), ), ). @@ -95,7 +95,7 @@ func (r *AzureASOManagedClusterReconciler) SetupWithManager(ctx context.Context, &infrav1alpha.AzureASOManagedControlPlane{}, handler.EnqueueRequestsFromMapFunc(asoManagedControlPlaneToManagedClusterMap(r.Client)), builder.WithPredicates( - predicates.ResourceHasFilterLabel(log, r.WatchFilterValue), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), predicate.Funcs{ CreateFunc: func(ev event.CreateEvent) bool { controlPlane := ev.Object.(*infrav1alpha.AzureASOManagedControlPlane) diff --git a/controllers/azureasomanagedcontrolplane_controller.go b/controllers/azureasomanagedcontrolplane_controller.go index 3d3fbcfcb75..f7644698a38 100644 --- a/controllers/azureasomanagedcontrolplane_controller.go +++ b/controllers/azureasomanagedcontrolplane_controller.go @@ -72,12 +72,12 @@ func (r *AzureASOManagedControlPlaneReconciler) SetupWithManager(ctx context.Con c, err := ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1alpha.AzureASOManagedControlPlane{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). Watches(&clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(clusterToAzureASOManagedControlPlane), builder.WithPredicates( - predicates.ResourceHasFilterLabel(log, r.WatchFilterValue), - ClusterPauseChangeAndInfrastructureReady(log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), + ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log), ), ). // User errors that CAPZ passes through agentPoolProfiles on create must be fixed in the diff --git a/controllers/azureasomanagedmachinepool_controller.go b/controllers/azureasomanagedmachinepool_controller.go index 1994569d966..99f631498c9 100644 --- a/controllers/azureasomanagedmachinepool_controller.go +++ b/controllers/azureasomanagedmachinepool_controller.go @@ -78,14 +78,14 @@ func (r *AzureASOManagedMachinePoolReconciler) SetupWithManager(ctx context.Cont c, err := ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1alpha.AzureASOManagedMachinePool{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). Watches( &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(clusterToAzureASOManagedMachinePools), builder.WithPredicates( - predicates.ResourceHasFilterLabel(log, r.WatchFilterValue), - predicates.Any(log, - predicates.ClusterControlPlaneInitialized(log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), + predicates.Any(mgr.GetScheme(), log, + predicates.ClusterControlPlaneInitialized(mgr.GetScheme(), log), ClusterUpdatePauseChange(log), ), ), @@ -96,7 +96,7 @@ func (r *AzureASOManagedMachinePoolReconciler) SetupWithManager(ctx context.Cont infrav1alpha.GroupVersion.WithKind(infrav1alpha.AzureASOManagedMachinePoolKind)), ), builder.WithPredicates( - predicates.ResourceHasFilterLabel(log, r.WatchFilterValue), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), ), ). Build(r) diff --git a/controllers/azurecluster_controller.go b/controllers/azurecluster_controller.go index 8f36e10caf9..8a477348578 100644 --- a/controllers/azurecluster_controller.go +++ b/controllers/azurecluster_controller.go @@ -87,15 +87,15 @@ func (acr *AzureClusterReconciler) SetupWithManager(ctx context.Context, mgr ctr return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(&infrav1.AzureCluster{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, acr.WatchFilterValue)). - WithEventFilter(predicates.ResourceIsNotExternallyManaged(log)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, acr.WatchFilterValue)). + WithEventFilter(predicates.ResourceIsNotExternallyManaged(mgr.GetScheme(), log)). // Add a watch on clusterv1.Cluster object for pause/unpause notifications. Watches( &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1.GroupVersion.WithKind(infrav1.AzureClusterKind), mgr.GetClient(), &infrav1.AzureCluster{})), builder.WithPredicates( ClusterUpdatePauseChange(log), - predicates.ResourceHasFilterLabel(log, acr.WatchFilterValue), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, acr.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azurecluster_controller_test.go b/controllers/azurecluster_controller_test.go index 74e0f9c04cf..2407acc6c4e 100644 --- a/controllers/azurecluster_controller_test.go +++ b/controllers/azurecluster_controller_test.go @@ -34,7 +34,6 @@ import ( "k8s.io/client-go/tools/record" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" - capierrors "sigs.k8s.io/cluster-api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -51,7 +50,7 @@ import ( type TestClusterReconcileInput struct { createAzureClusterService func(*scope.ClusterScope) (*azureClusterService, error) azureClusterOptions func(ac *infrav1.AzureCluster) - clusterScopeFailureReason capierrors.ClusterStatusError + clusterScopeFailureReason string cache *scope.ClusterCache expectedResult reconcile.Result expectedErr string @@ -182,7 +181,7 @@ func TestAzureClusterReconcileNormal(t *testing.T) { acs.scope = cs }), nil }, - clusterScopeFailureReason: capierrors.CreateClusterError, + clusterScopeFailureReason: azure.CreateError, cache: &scope.ClusterCache{}, }, "should requeue if transient error is received": { diff --git a/controllers/azurejson_machine_controller.go b/controllers/azurejson_machine_controller.go index c4bbb198d8f..7df5345ca6a 100644 --- a/controllers/azurejson_machine_controller.go +++ b/controllers/azurejson_machine_controller.go @@ -75,7 +75,7 @@ func (r *AzureJSONMachineReconciler) SetupWithManager(ctx context.Context, mgr c WithOptions(options). For(&infrav1.AzureMachine{}). WithEventFilter(filterUnclonedMachinesPredicate{log: log}). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). Owns(&corev1.Secret{}). // Add a watch on Clusters to requeue when the infraRef is set. This is needed because the infraRef is not initially // set in Clusters created from a ClusterClass. @@ -83,8 +83,8 @@ func (r *AzureJSONMachineReconciler) SetupWithManager(ctx context.Context, mgr c &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureMachineMapper), builder.WithPredicates( - predicates.ClusterUnpausedAndInfrastructureReady(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue), + predicates.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azurejson_machinepool_controller.go b/controllers/azurejson_machinepool_controller.go index b92382d87a1..3cf418680ba 100644 --- a/controllers/azurejson_machinepool_controller.go +++ b/controllers/azurejson_machinepool_controller.go @@ -69,7 +69,7 @@ func (r *AzureJSONMachinePoolReconciler) SetupWithManager(ctx context.Context, m return ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1exp.AzureMachinePool{}). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). Owns(&corev1.Secret{}). // Add a watch on Clusters to requeue when the infraRef is set. This is needed because the infraRef is not initially // set in Clusters created from a ClusterClass. @@ -77,8 +77,8 @@ func (r *AzureJSONMachinePoolReconciler) SetupWithManager(ctx context.Context, m &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureMachinePoolMapper), builder.WithPredicates( - predicates.ClusterUnpausedAndInfrastructureReady(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue), + predicates.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azurejson_machinetemplate_controller.go b/controllers/azurejson_machinetemplate_controller.go index f00dd284333..2c1e4184bec 100644 --- a/controllers/azurejson_machinetemplate_controller.go +++ b/controllers/azurejson_machinetemplate_controller.go @@ -71,7 +71,7 @@ func (r *AzureJSONTemplateReconciler) SetupWithManager(ctx context.Context, mgr return ctrl.NewControllerManagedBy(mgr). WithOptions(options). For(&infrav1.AzureMachineTemplate{}). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue)). Owns(&corev1.Secret{}). // Add a watch on Clusters to requeue when the infraRef is set. This is needed because the infraRef is not initially // set in Clusters created from a ClusterClass. @@ -79,8 +79,8 @@ func (r *AzureJSONTemplateReconciler) SetupWithManager(ctx context.Context, mgr &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureMachineTemplateMapper), builder.WithPredicates( - predicates.ClusterUnpausedAndInfrastructureReady(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, r.WatchFilterValue), + predicates.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azuremachine_controller.go b/controllers/azuremachine_controller.go index 1e50a13a80f..6466fabf3b2 100644 --- a/controllers/azuremachine_controller.go +++ b/controllers/azuremachine_controller.go @@ -25,7 +25,6 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/client-go/tools/record" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" @@ -99,7 +98,7 @@ func (amr *AzureMachineReconciler) SetupWithManager(ctx context.Context, mgr ctr return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(&infrav1.AzureMachine{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, amr.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amr.WatchFilterValue)). // watch for changes in CAPI Machine resources Watches( &clusterv1.Machine{}, @@ -115,8 +114,8 @@ func (amr *AzureMachineReconciler) SetupWithManager(ctx context.Context, mgr ctr &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureMachineMapper), builder.WithPredicates( - ClusterPauseChangeAndInfrastructureReady(log), - predicates.ResourceHasFilterLabel(log, amr.WatchFilterValue), + ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amr.WatchFilterValue), ), ). Complete(r) @@ -277,7 +276,7 @@ func (amr *AzureMachineReconciler) reconcileNormal(ctx context.Context, machineS if errors.As(err, &reconcileError) && reconcileError.IsTerminal() { amr.Recorder.Eventf(machineScope.AzureMachine, corev1.EventTypeWarning, "SKUNotFound", errors.Wrap(err, "failed to initialize machine cache").Error()) log.Error(err, "Failed to initialize machine cache") - machineScope.SetFailureReason(capierrors.InvalidConfigurationMachineError) + machineScope.SetFailureReason(azure.InvalidConfiguration) machineScope.SetFailureMessage(err) machineScope.SetNotReady() return reconcile.Result{}, nil @@ -289,7 +288,7 @@ func (amr *AzureMachineReconciler) reconcileNormal(ctx context.Context, machineS cond := conditions.Get(machineScope.AzureMachine, infrav1.VMIdentitiesReadyCondition) if cond != nil && cond.Status == corev1.ConditionFalse && cond.Reason == infrav1.UserAssignedIdentityMissingReason { amr.Recorder.Eventf(machineScope.AzureMachine, corev1.EventTypeWarning, infrav1.UserAssignedIdentityMissingReason, "VM is unhealthy") - machineScope.SetFailureReason(capierrors.UnsupportedChangeMachineError) + machineScope.SetFailureReason(azure.UnsupportedChange) machineScope.SetFailureMessage(errors.New("VM identities are not ready")) return reconcile.Result{}, errors.New("VM identities are not ready") } @@ -304,7 +303,7 @@ func (amr *AzureMachineReconciler) reconcileNormal(ctx context.Context, machineS // In this case, we mark it as failed and leave it to MHC for remediation if errors.As(err, &azure.VMDeletedError{}) { amr.Recorder.Eventf(machineScope.AzureMachine, corev1.EventTypeWarning, "VMDeleted", errors.Wrap(err, "failed to reconcile AzureMachine").Error()) - machineScope.SetFailureReason(capierrors.UpdateMachineError) + machineScope.SetFailureReason(azure.UpdateError) machineScope.SetFailureMessage(err) machineScope.SetNotReady() machineScope.SetVMState(infrav1.Deleted) @@ -316,7 +315,7 @@ func (amr *AzureMachineReconciler) reconcileNormal(ctx context.Context, machineS if reconcileError.IsTerminal() { amr.Recorder.Eventf(machineScope.AzureMachine, corev1.EventTypeWarning, "ReconcileError", errors.Wrapf(err, "failed to reconcile AzureMachine").Error()) log.Error(err, "failed to reconcile AzureMachine", "name", machineScope.Name()) - machineScope.SetFailureReason(capierrors.CreateMachineError) + machineScope.SetFailureReason(azure.CreateError) machineScope.SetFailureMessage(err) machineScope.SetNotReady() machineScope.SetVMState(infrav1.Failed) diff --git a/controllers/azuremachine_controller_test.go b/controllers/azuremachine_controller_test.go index 4d4f1d1bb51..d0b91931efc 100644 --- a/controllers/azuremachine_controller_test.go +++ b/controllers/azuremachine_controller_test.go @@ -30,7 +30,6 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -47,7 +46,7 @@ type TestMachineReconcileInput struct { createAzureMachineService func(*scope.MachineScope) (*azureMachineService, error) azureMachineOptions func(am *infrav1.AzureMachine) expectedErr string - machineScopeFailureReason capierrors.MachineStatusError + machineScopeFailureReason string ready bool cache *scope.MachineCache skuCache scope.SKUCacher @@ -185,8 +184,7 @@ func TestAzureMachineReconcileNormal(t *testing.T) { }, "should skip reconciliation if error state is detected on azure machine": { azureMachineOptions: func(am *infrav1.AzureMachine) { - updateError := capierrors.UpdateMachineError - am.Status.FailureReason = &updateError + am.Status.FailureReason = ptr.To(azure.UpdateError) }, createAzureMachineService: getFakeAzureMachineService, }, @@ -219,13 +217,13 @@ func TestAzureMachineReconcileNormal(t *testing.T) { }, "should fail if VM is deleted": { createAzureMachineService: getFakeAzureMachineServiceWithVMDeleted, - machineScopeFailureReason: capierrors.UpdateMachineError, + machineScopeFailureReason: azure.UpdateError, cache: &scope.MachineCache{}, expectedErr: "failed to reconcile AzureMachine", }, "should reconcile if terminal error is received": { createAzureMachineService: getFakeAzureMachineServiceWithTerminalError, - machineScopeFailureReason: capierrors.CreateMachineError, + machineScopeFailureReason: azure.CreateError, cache: &scope.MachineCache{}, }, "should requeue if transient error is received": { diff --git a/controllers/azuremanagedcluster_controller.go b/controllers/azuremanagedcluster_controller.go index 8a08c90f3b8..fbc4b584128 100644 --- a/controllers/azuremanagedcluster_controller.go +++ b/controllers/azuremanagedcluster_controller.go @@ -71,7 +71,7 @@ func (amcr *AzureManagedClusterReconciler) SetupWithManager(ctx context.Context, return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(azManagedCluster). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, amcr.WatchFilterValue)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, amcr.WatchFilterValue)). // watch AzureManagedControlPlane resources Watches( &infrav1.AzureManagedControlPlane{}, @@ -82,8 +82,8 @@ func (amcr *AzureManagedClusterReconciler) SetupWithManager(ctx context.Context, &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1.GroupVersion.WithKind(infrav1.AzureManagedClusterKind), mgr.GetClient(), &infrav1.AzureManagedCluster{})), builder.WithPredicates( - predicates.ClusterUnpaused(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, amcr.WatchFilterValue), + predicates.ClusterUnpaused(mgr.GetScheme(), log), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, amcr.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azuremanagedcontrolplane_controller.go b/controllers/azuremanagedcontrolplane_controller.go index 7f2143008ce..b2982f7636d 100644 --- a/controllers/azuremanagedcontrolplane_controller.go +++ b/controllers/azuremanagedcontrolplane_controller.go @@ -82,7 +82,7 @@ func (amcpr *AzureManagedControlPlaneReconciler) SetupWithManager(ctx context.Co return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(azManagedControlPlane). - WithEventFilter(predicates.ResourceHasFilterLabel(log, amcpr.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amcpr.WatchFilterValue)). // watch AzureManagedCluster resources Watches( &infrav1.AzureManagedCluster{}, @@ -98,8 +98,8 @@ func (amcpr *AzureManagedControlPlaneReconciler) SetupWithManager(ctx context.Co &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(amcpr.ClusterToAzureManagedControlPlane), builder.WithPredicates( - ClusterPauseChangeAndInfrastructureReady(log), - predicates.ResourceHasFilterLabel(log, amcpr.WatchFilterValue), + ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amcpr.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/azuremanagedmachinepool_controller.go b/controllers/azuremanagedmachinepool_controller.go index 96e8595c107..a4c2abb7705 100644 --- a/controllers/azuremanagedmachinepool_controller.go +++ b/controllers/azuremanagedmachinepool_controller.go @@ -100,7 +100,7 @@ func (ammpr *AzureManagedMachinePoolReconciler) SetupWithManager(ctx context.Con return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(azManagedMachinePool). - WithEventFilter(predicates.ResourceHasFilterLabel(log, ammpr.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ammpr.WatchFilterValue)). // watch for changes in CAPI MachinePool resources Watches( &expv1.MachinePool{}, @@ -116,8 +116,8 @@ func (ammpr *AzureManagedMachinePoolReconciler) SetupWithManager(ctx context.Con &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureManagedMachinePoolMapper), builder.WithPredicates( - ClusterPauseChangeAndInfrastructureReady(log), - predicates.ResourceHasFilterLabel(log, ammpr.WatchFilterValue), + ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ammpr.WatchFilterValue), ), ). Complete(r) diff --git a/controllers/helpers.go b/controllers/helpers.go index 0265a4898a7..bfdadf3b0f8 100644 --- a/controllers/helpers.go +++ b/controllers/helpers.go @@ -1073,8 +1073,8 @@ func ClusterUpdatePauseChange(logger logr.Logger) predicate.Funcs { // ClusterPauseChangeAndInfrastructureReady is based on ClusterUnpausedAndInfrastructureReady, but // additionally accepts Cluster pause events. -func ClusterPauseChangeAndInfrastructureReady(log logr.Logger) predicate.Funcs { - return predicates.Any(log, predicates.ClusterCreateInfraReady(log), predicates.ClusterUpdateInfraReady(log), ClusterUpdatePauseChange(log)) +func ClusterPauseChangeAndInfrastructureReady(scheme *runtime.Scheme, log logr.Logger) predicate.Funcs { + return predicates.Any(scheme, log, predicates.ClusterCreateInfraReady(scheme, log), predicates.ClusterUpdateInfraReady(scheme, log), ClusterUpdatePauseChange(log)) //nolint:staticcheck } // GetClusterScoper returns a ClusterScoper for the given cluster using the infra ref pointing to either an AzureCluster or an AzureManagedCluster. diff --git a/controllers/helpers_test.go b/controllers/helpers_test.go index f393dfefced..81d21bc7eaa 100644 --- a/controllers/helpers_test.go +++ b/controllers/helpers_test.go @@ -1560,7 +1560,7 @@ func TestClusterPauseChangeAndInfrastructureReady(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { t.Parallel() - p := ClusterPauseChangeAndInfrastructureReady(logr.New(nil)) + p := ClusterPauseChangeAndInfrastructureReady(&runtime.Scheme{}, logr.New(nil)) var actual bool switch e := test.event.(type) { case event.CreateEvent: diff --git a/docs/proposals/20210222-azure-machinepool-machine.md b/docs/proposals/20210222-azure-machinepool-machine.md index a393d77fc08..87fe211ad0b 100644 --- a/docs/proposals/20210222-azure-machinepool-machine.md +++ b/docs/proposals/20210222-azure-machinepool-machine.md @@ -45,7 +45,7 @@ see-also: - [Conclusions](#conclusions) - [Additional Details](#additional-details) - [Test Plan](#test-plan) -- [Implementation History](#implementation-history) +- [Implementation History](#implementation-history) ## Summary @@ -62,7 +62,7 @@ the underlying infrastructure. - Be able to delete specific AzureMachinePool instances - Rolling updates with max unavailable and max surge - MaxUnavailable is the max number of machines that are allowed to be unavailable at any time - - MaxSurge is the number of machines to surge, add to the current replica count, during an upgrade of the VMSS model + - MaxSurge is the number of machines to surge, add to the current replica count, during an upgrade of the VMSS model - Safely update by cordoning and draining nodes prior to deleting the underlying infrastructure - Be able to take advantage of [Azure's Virtual Machine Scale Set Update Instance API](https://learn.microsoft.com/rest/api/compute/virtualmachinescalesets/updateinstances) to in-place update a VMSS instance rather than delete and recreate the infrastructure, which would result in a much @@ -78,40 +78,40 @@ the underlying infrastructure. Azure Virtual Machine Scale Sets provide [terminate notifications](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). These terminate notifications would be helpful to inform Kubernetes when a node is going to be deleted. Unfortunately, terminate notifications do not provide notifications when an instance is Updated, in this case "Updated" means the -instance is reimaged to match the updated VMSS model by using the [Update Instance API](https://learn.microsoft.com/rest/api/compute/virtualmachinescalesets/updateinstances). -If a VMSS instance were to be reimaged, rather than deleted and recreated the instance will not receive a notification. -Due to the design of terminate notifications the CAPZ controller needs to alert Kubernetes when an instance is being -Updated. Without some way to inform Kubernetes of the specific instance that is to be updated, the underlying -infrastructure may be removed before workloads can be safely migrated from the machine / node. By managing the lifecycle +instance is reimaged to match the updated VMSS model by using the [Update Instance API](https://learn.microsoft.com/rest/api/compute/virtualmachinescalesets/updateinstances). +If a VMSS instance were to be reimaged, rather than deleted and recreated the instance will not receive a notification. +Due to the design of terminate notifications the CAPZ controller needs to alert Kubernetes when an instance is being +Updated. Without some way to inform Kubernetes of the specific instance that is to be updated, the underlying +infrastructure may be removed before workloads can be safely migrated from the machine / node. By managing the lifecycle from CAPZ, we are able to safely delete / upgrade machines / nodes. -In the future, it would be useful to integrate [awesomenix/drainsafe](https://github.com/awesomenix/drainsafe) or +In the future, it would be useful to integrate [awesomenix/drainsafe](https://github.com/awesomenix/drainsafe) or something similar to handle scenarios when Azure will delete or migrate a VMSS instance. Two scenarios come to mind. -1. VMSS is configured to use [Spot instances](https://learn.microsoft.com/azure/virtual-machines/spot-vms) and +1. VMSS is configured to use [Spot instances](https://learn.microsoft.com/azure/virtual-machines/spot-vms) and Azure must evict an instance. -2. Azure must [perform maintenance on an instance](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications). +2. Azure must [perform maintenance on an instance](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications). ## Proposal ### User Stories #### Story 1 - Upgrading the Kubernetes Version of a MachinePool -Alex is an engineer in a large organization which has a MachinePool running 1.18.x and would like to upgrade the +Alex is an engineer in a large organization which has a MachinePool running 1.18.x and would like to upgrade the MachinePool 1.19.x. It is important to Alex that the MachinePool doesn't experience downtime during the upgrade. Alex -has set the MaxUnavailable and MaxSurge values on the AzureMachinePool to limit the number of machines that will be +has set the MaxUnavailable and MaxSurge values on the AzureMachinePool to limit the number of machines that will be unavailable during the upgrade, and the number of extra machines VMSS will add during upgrade. The MachinePool upgrades each machine in the pool by first cordoning and draining, then replacing the machine in the pool. #### Story 2 - Reducing the Number of Replicas in a MachinePool -Alex is an engineer in a large organization which has a MachinePool running. Alex has too many nodes running on the -cluster and would like to reduce the replicas. It is important to Alex that the MachinePool doesn't experience downtime. -Alex decreases the replica count of the MachinePool by 2. The MachinePool deletes 2 machines from the pool by first +Alex is an engineer in a large organization which has a MachinePool running. Alex has too many nodes running on the +cluster and would like to reduce the replicas. It is important to Alex that the MachinePool doesn't experience downtime. +Alex decreases the replica count of the MachinePool by 2. The MachinePool deletes 2 machines from the pool by first cordoning and draining, then deleting the underlying infrastructure. #### Story 3 - Deleting an individual Azure Machine Pool Machine -Alex is an engineer in a large organization which has a MachinePool running with 5 replicas. Alex would like to delete a -specific MachinePool machine. It is important to Alex that the MachinePool doesn't experience downtime while deleting +Alex is an engineer in a large organization which has a MachinePool running with 5 replicas. Alex would like to delete a +specific MachinePool machine. It is important to Alex that the MachinePool doesn't experience downtime while deleting the individual machine. Alex uses `kubectl` to delete the specific MachinePool machine resource. The MachinePool machine is cordoned and drained, then the underlying infrastructure is deleted. The MachinePool still has a replica count of 5, but only has 4 running replicas. The MachinePool creates a new machine to take the place of the deleted instance. @@ -139,17 +139,17 @@ but only has 4 running replicas. The MachinePool creates a new machine to take t ### Implementation Details/Notes/Constraints -The current implementation of CAPZ AzureMachinePool embeds the state of each of the instances in the Scale Set within +The current implementation of CAPZ AzureMachinePool embeds the state of each of the instances in the Scale Set within the status of the AzureMachinePool. ```go // AzureMachinePoolStatus defines the observed state of AzureMachinePool AzureMachinePoolStatus struct { - + /* - Other fields omitted for brevity + Other fields omitted for brevity */ - + // Instances is the VM instance status for each VM in the VMSS // +optional Instances []*AzureMachinePoolInstanceStatus `json:"instances,omitempty"` @@ -160,23 +160,23 @@ AzureMachinePoolInstanceStatus struct { // Version defines the Kubernetes version for the VM Instance // +optional Version string `json:"version"` - + // ProvisioningState is the provisioning state of the Azure virtual machine instance. // +optional ProvisioningState *infrav1.VMState `json:"provisioningState"` - + // ProviderID is the provider identification of the VMSS Instance // +optional ProviderID string `json:"providerID"` - + // InstanceID is the identification of the Machine Instance within the VMSS // +optional InstanceID string `json:"instanceID"` - + // InstanceName is the name of the Machine Instance within the VMSS // +optional InstanceName string `json:"instanceName"` - + // LatestModelApplied indicates the instance is running the most up-to-date VMSS model. A VMSS model describes // the image version the VM is running. If the instance is not running the latest model, it means the instance // may not be running the version of Kubernetes the Machine Pool has specified and needs to be updated. @@ -185,7 +185,7 @@ AzureMachinePoolInstanceStatus struct { ``` #### Existing APIs for Clarity -These are included here to provide a description of the structures as they exist in CAPI and will be leveraged to +These are included here to provide a description of the structures as they exist in CAPI and will be leveraged to extend AzureMachinePool. There are no changes to these structures. They are simply for reference. ```go @@ -196,7 +196,7 @@ type MachineDeploymentStrategy struct { // Default is RollingUpdate. // +optional Type MachineDeploymentStrategyType `json:"type,omitempty"` - + // Rolling update config params. Present only if // MachineDeploymentStrategyType = RollingUpdate. // +optional @@ -219,7 +219,7 @@ type MachineRollingUpdateDeployment struct { // during the update is at least 70% of desired machines. // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - + // The maximum number of machines that can be scheduled above the // desired number of machines. // Value can be an absolute number (ex: 5) or a percentage of @@ -235,7 +235,7 @@ type MachineRollingUpdateDeployment struct { // at any time during the update is at most 130% of desired machines. // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` - + // DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. // Valid values are "Random, "Newest", "Oldest" // When no value is supplied, the default DeletePolicy of MachineSet is used @@ -256,7 +256,7 @@ type AzureMachinePoolSpec struct { // new ones. // +optional Strategy MachineDeploymentStrategy `json:"strategy,omitempty"` - + // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` @@ -275,22 +275,22 @@ type AzureMachinePoolMachineStatus struct { // NodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - + // Version defines the Kubernetes version for the VM Instance // +optional Version string `json:"version"` - + // ProvisioningState is the provisioning state of the Azure virtual machine instance. // +optional ProvisioningState *infrav1.VMState `json:"provisioningState"` - + // InstanceID is the identification of the Machine Instance within the VMSS InstanceID string `json:"instanceID"` - + // InstanceName is the name of the Machine Instance within the VMSS // +optional InstanceName string `json:"instanceName"` - + // FailureReason will be set in the event that there is a terminal problem // reconciling the MachinePool machine and will contain a succinct value suitable // for machine interpretation. @@ -299,8 +299,8 @@ type AzureMachinePoolMachineStatus struct { // can be added as events to the MachinePool object and/or logged in the // controller's output. // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - + FailureReason *string `json:"failureReason,omitempty"` + // FailureMessage will be set in the event that there is a terminal problem // reconciling the MachinePool and will contain a more verbose string suitable // for logging and human consumption. @@ -310,21 +310,21 @@ type AzureMachinePoolMachineStatus struct { // controller's output. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - + // Conditions defines current service state of the AzureMachinePool. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` - + // LongRunningOperationState saves the state for an Azure long running operations so it can be continued on the // next reconciliation loop. // +optional LongRunningOperationState *infrav1.Future `json:"longRunningOperationState,omitempty"` - + // LatestModelApplied indicates the instance is running the most up-to-date VMSS model. A VMSS model describes // the image version the VM is running. If the instance is not running the latest model, it means the instance // may not be running the version of Kubernetes the Machine Pool has specified and needs to be updated. LatestModelApplied bool `json:"latestModelApplied"` - + // Ready is true when the provider resource is ready. // +optional Ready bool `json:"ready"` @@ -336,7 +336,7 @@ type AzureMachinePoolMachineStatus struct { * Create a new AzureMachinePoolMachine controller. * Remove VMSS instance status tracking logic from AzureMachinePool controller and moving it to AzureMachinePoolMachine controller. -* Introduce rate limiting behavior to AzureMachinePool* controllers to ensure Azure API limits are not +* Introduce rate limiting behavior to AzureMachinePool* controllers to ensure Azure API limits are not exceeded. #### Proposed Changes of Responsibility @@ -348,24 +348,24 @@ MachinePoolMachineScope. The responsibilities would be as follows. **AzureMachinePool Responsibilities:** - Create AzureMachinePoolMachine instances when a new VMSS instance is observed. The AzureMachinePoolMachine spec should have the `ProviderID` field set with the observed resource ID. The AzureMachinePool should also be added to the - AzureMachinePoolMachine's OwnerReferences. -- Selection of AzureMachinePoolMachine instances for deletion or upgrade. When a change to the AzureMachinePool model + AzureMachinePoolMachine's OwnerReferences. +- Selection of AzureMachinePoolMachine instances for deletion or upgrade. When a change to the AzureMachinePool model occurs, the `MachinePoolScope` will be responsible for coordinating the rollout of the updated model by selecting AzureMachinePoolMachines to delete or upgrade with respect to MaxUnavailable and the DeletePolicy. - Scale up: AzureMachinePool should increase the number of VMSS replicas if the replica count increases on MachinePool - Scale down: AzureMachinePool should select and delete AzureMachinePoolMachines that are overprovisioned with respect to MaxUnavailable and DeletePolicy from the proposed MachinePool Strategy. -- Upgrade: AzureMachinePool should select the AzureMachinePoolMachines to upgrade, set the - `azureMachinePoolUpdateInstanceAnnotation` on the AzureMachinePoolMachine and wait for the annotation to be removed +- Upgrade: AzureMachinePool should select the AzureMachinePoolMachines to upgrade, set the + `azureMachinePoolUpdateInstanceAnnotation` on the AzureMachinePoolMachine and wait for the annotation to be removed before proceeding with the rolling upgrade. - Clean up. When a AzureMachinePoolMachine is no longer in the list of instances in Azure, but a matching AzureMachinePoolMachine resource exists, delete the AzureMachinePoolMachine. - + **AzureMachinePoolMachine Responsibilities:** -- Update Azure Provisioning State: when creating a new VMSS instance, the AzureMachinePoolMachine controller will poll +- Update Azure Provisioning State: when creating a new VMSS instance, the AzureMachinePoolMachine controller will poll the Azure API until the instance reaches a terminal state. -- Cordon and Drain: when deleting or upgrading the AzureMachinePoolMachine resource, the AzureMachinePoolMachine - controller is responsible for ensuring workload is moved from the node prior to removing the underlying Azure +- Cordon and Drain: when deleting or upgrading the AzureMachinePoolMachine resource, the AzureMachinePoolMachine + controller is responsible for ensuring workload is moved from the node prior to removing the underlying Azure infrastructure. - NodeRef: as a VMSS instance joins the cluster, the AzureMachinePoolMachine controller is responsible for ensuring the node is found and ready before marking the AzureMachinePoolMachine resource as ready. @@ -383,9 +383,9 @@ Create annotations on AzureMachinePool resources to indicate which machine shoul #### Option 1 Cons: - Annotations don't have strong schema -- Controller would be dependent on the application of annotations to inform machine selection, which could be error +- Controller would be dependent on the application of annotations to inform machine selection, which could be error prone and brittle. -- Each machine lifecycle will need to be embedded in the status of the AzureMachinePool to enable cordon and drain +- Each machine lifecycle will need to be embedded in the status of the AzureMachinePool to enable cordon and drain ### Option 2: Separate AzureMachinePool and AzureMachinePoolMachines Introduce a new custom resource, AzureMachinePoolMachine, to represent AzureMachinePool instances rather than persisting diff --git a/exp/api/v1beta1/azuremachinepool_types.go b/exp/api/v1beta1/azuremachinepool_types.go index e1ec02ad7d1..ab9aa71e872 100644 --- a/exp/api/v1beta1/azuremachinepool_types.go +++ b/exp/api/v1beta1/azuremachinepool_types.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/errors" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" ) @@ -283,7 +282,7 @@ type ( // can be added as events to the MachinePool object and/or logged in the // controller's output. // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` + FailureReason *string `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem // reconciling the MachinePool and will contain a more verbose string suitable diff --git a/exp/api/v1beta1/azuremachinepool_webhook_test.go b/exp/api/v1beta1/azuremachinepool_webhook_test.go index e1324deee98..a1b8e5e3dcb 100644 --- a/exp/api/v1beta1/azuremachinepool_webhook_test.go +++ b/exp/api/v1beta1/azuremachinepool_webhook_test.go @@ -722,7 +722,7 @@ func TestAzureMachinePool_ValidateCreateFailure(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { if tc.featureGateEnabled != nil { - defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled)() + utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, *tc.featureGateEnabled) } ampw := &azureMachinePoolWebhook{} _, err := ampw.ValidateCreate(context.Background(), tc.amp) diff --git a/exp/api/v1beta1/azuremachinepoolmachine_types.go b/exp/api/v1beta1/azuremachinepoolmachine_types.go index afd32527f13..bede7e9b06e 100644 --- a/exp/api/v1beta1/azuremachinepoolmachine_types.go +++ b/exp/api/v1beta1/azuremachinepoolmachine_types.go @@ -20,7 +20,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/errors" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" ) @@ -71,7 +70,7 @@ type ( // can be added as events to the MachinePool object and/or logged in the // controller's output. // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` + FailureReason *string `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem // reconciling the MachinePool and will contain a more verbose string suitable diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go index 8ad1a92511b..295bb10fd06 100644 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" apiv1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" cluster_apiapiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/errors" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -217,7 +216,7 @@ func (in *AzureMachinePoolMachineStatus) DeepCopyInto(out *AzureMachinePoolMachi } if in.FailureReason != nil { in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) + *out = new(string) **out = **in } if in.FailureMessage != nil { @@ -391,7 +390,7 @@ func (in *AzureMachinePoolStatus) DeepCopyInto(out *AzureMachinePoolStatus) { } if in.FailureReason != nil { in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) + *out = new(string) **out = **in } if in.FailureMessage != nil { diff --git a/exp/controllers/azuremachinepool_controller.go b/exp/controllers/azuremachinepool_controller.go index edb82b3384e..688c1991da4 100644 --- a/exp/controllers/azuremachinepool_controller.go +++ b/exp/controllers/azuremachinepool_controller.go @@ -32,7 +32,6 @@ import ( "k8s.io/client-go/tools/record" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" @@ -133,7 +132,7 @@ func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mg return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(&infrav1exp.AzureMachinePool{}). - WithEventFilter(predicates.ResourceHasFilterLabel(log, ampr.WatchFilterValue)). + WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ampr.WatchFilterValue)). // watch for changes in CAPI MachinePool resources Watches( &expv1.MachinePool{}, @@ -160,7 +159,7 @@ func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mg handler.EnqueueRequestsFromMapFunc(AzureMachinePoolMachineMapper(mgr.GetScheme(), log)), builder.WithPredicates( MachinePoolMachineHasStateOrVersionChange(log), - predicates.ResourceHasFilterLabel(log, ampr.WatchFilterValue), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ampr.WatchFilterValue), ), ). // Add a watch on clusterv1.Cluster object for unpause & ready notifications. @@ -168,8 +167,8 @@ func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mg &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(azureMachinePoolMapper), builder.WithPredicates( - infracontroller.ClusterPauseChangeAndInfrastructureReady(log), - predicates.ResourceHasFilterLabel(log, ampr.WatchFilterValue), + infracontroller.ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log), + predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ampr.WatchFilterValue), ), ). Complete(r) @@ -310,7 +309,7 @@ func (ampr *AzureMachinePoolReconciler) reconcileNormal(ctx context.Context, mac if errors.As(err, &reconcileError) && reconcileError.IsTerminal() { ampr.Recorder.Eventf(machinePoolScope.AzureMachinePool, corev1.EventTypeWarning, "SKUNotFound", errors.Wrap(err, "failed to initialize machinepool cache").Error()) log.Error(err, "Failed to initialize machinepool cache") - machinePoolScope.SetFailureReason(capierrors.InvalidConfigurationMachineError) + machinePoolScope.SetFailureReason(azure.InvalidConfiguration) machinePoolScope.SetFailureMessage(err) machinePoolScope.SetNotReady() return reconcile.Result{}, nil diff --git a/exp/controllers/azuremachinepoolmachine_controller.go b/exp/controllers/azuremachinepoolmachine_controller.go index 9f7416c844c..96aab4a5a82 100644 --- a/exp/controllers/azuremachinepoolmachine_controller.go +++ b/exp/controllers/azuremachinepoolmachine_controller.go @@ -27,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" @@ -98,14 +97,14 @@ func (ampmr *AzureMachinePoolMachineController) SetupWithManager(ctx context.Con return ctrl.NewControllerManagedBy(mgr). WithOptions(options.Options). For(&infrav1exp.AzureMachinePoolMachine{}). - WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log, ampmr.WatchFilterValue)). + WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, ampmr.WatchFilterValue)). // Add a watch on AzureMachinePool for model changes Watches( &infrav1exp.AzureMachinePool{}, handler.EnqueueRequestsFromMapFunc(AzureMachinePoolToAzureMachinePoolMachines(ctx, mgr.GetClient(), log)), builder.WithPredicates( MachinePoolModelHasChanged(log), - predicates.ResourceNotPausedAndHasFilterLabel(log, ampmr.WatchFilterValue), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, ampmr.WatchFilterValue), ), ). // Add a watch on CAPI Machines for MachinePool Machines @@ -113,7 +112,7 @@ func (ampmr *AzureMachinePoolMachineController) SetupWithManager(ctx context.Con &clusterv1.Machine{}, handler.EnqueueRequestsFromMapFunc(util.MachineToInfrastructureMapFunc(infrav1exp.GroupVersion.WithKind("AzureMachinePoolMachine"))), builder.WithPredicates( - predicates.ResourceNotPausedAndHasFilterLabel(log, ampmr.WatchFilterValue), + predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, ampmr.WatchFilterValue), ), ). Complete(r) @@ -295,7 +294,7 @@ func (ampmr *AzureMachinePoolMachineController) reconcileNormal(ctx context.Cont switch state { case infrav1.Failed: ampmr.Recorder.Eventf(machineScope.AzureMachinePoolMachine, corev1.EventTypeWarning, "FailedVMState", "Azure scale set VM is in failed state") - machineScope.SetFailureReason(capierrors.UpdateMachineError) + machineScope.SetFailureReason(azure.UpdateError) machineScope.SetFailureMessage(errors.Errorf("Azure VM state is %s", state)) case infrav1.Deleting: log.V(4).Info("deleting machine because state is Deleting", "machine", machineScope.Name()) diff --git a/go.mod b/go.mod index 929ca60f644..e67c5b273d5 100644 --- a/go.mod +++ b/go.mod @@ -46,36 +46,40 @@ require ( golang.org/x/mod v0.22.0 golang.org/x/text v0.20.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.30.3 - k8s.io/apimachinery v0.30.3 - k8s.io/client-go v0.30.3 - k8s.io/cluster-bootstrap v0.30.3 - k8s.io/component-base v0.30.3 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 + k8s.io/cluster-bootstrap v0.31.3 + k8s.io/component-base v0.31.3 k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.30.3 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/cloud-provider-azure v1.30.4 - sigs.k8s.io/cluster-api v1.8.5 - sigs.k8s.io/cluster-api/test v1.8.5 - sigs.k8s.io/controller-runtime v0.18.5 + sigs.k8s.io/cluster-api v1.9.0-rc.1 + sigs.k8s.io/cluster-api/test v1.9.0-rc.1 + sigs.k8s.io/controller-runtime v0.19.3 sigs.k8s.io/kind v0.25.0 ) require ( + dario.cat/mergo v1.0.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/moby/term v0.5.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - k8s.io/apiserver v0.30.3 // indirect + github.com/x448/float16 v0.8.4 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + k8s.io/apiserver v0.31.3 // indirect sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29 // indirect sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16 // indirect ) @@ -97,12 +101,12 @@ require ( github.com/BurntSushi/toml v1.4.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect - github.com/adrg/xdg v0.5.0 // indirect + github.com/adrg/xdg v0.5.3 // indirect github.com/alessio/shellescape v1.4.2 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -113,7 +117,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v27.1.1+incompatible // indirect + github.com/docker/docker v27.3.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect @@ -128,7 +132,7 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/gobuffalo/flect v1.0.2 // indirect + github.com/gobuffalo/flect v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect @@ -147,7 +151,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.4.0 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -162,7 +166,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect @@ -178,24 +182,24 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/shopspring/decimal v1.3.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/viper v1.19.0 // 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/xlab/treeprint v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/term v0.26.0 // indirect @@ -209,7 +213,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apiextensions-apiserver v0.30.3 // indirect + k8s.io/apiextensions-apiserver v0.31.3 // indirect k8s.io/cli-runtime v0.30.3 // indirect k8s.io/cloud-provider v0.30.2 // indirect k8s.io/component-helpers v0.30.3 // indirect @@ -221,5 +225,3 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace github.com/google/cel-go => github.com/google/cel-go v0.17.8 diff --git a/go.sum b/go.sum index 98739b57a6d..a5abe6dc228 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= @@ -122,23 +124,22 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= +github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY= -github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4= +github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= +github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= @@ -168,8 +169,8 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= 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.23 h1:Fp4FETmk8sT/IRgnKX2xstC2dL7+QdcU+BL5AYIN3Jw= -github.com/coredns/corefile-migration v1.0.23/go.mod h1:8HyMhuyzx9RLZp8cRc9Uf3ECpEAafHOFxQWUPqktMQI= +github.com/coredns/corefile-migration v1.0.24 h1:NL/zRKijhJZLYlNnMr891DRv5jXgfd3Noons1M6oTpc= +github.com/coredns/corefile-migration v1.0.24/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= @@ -190,8 +191,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -210,14 +211,16 @@ github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0 github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -237,8 +240,8 @@ github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpv github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= 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/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= -github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= +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.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -268,8 +271,8 @@ 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.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= -github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -295,10 +298,8 @@ github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+ github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= @@ -321,10 +322,8 @@ github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +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/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -371,22 +370,20 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP3b/PA= github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -443,20 +440,18 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +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.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -470,9 +465,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -487,6 +480,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7 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/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-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= @@ -494,26 +489,26 @@ github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd 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.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.15 h1:3KpLJir1ZEBrYuV2v+Twaa/e2MdDCEZ/70H+lzEiwsk= -go.etcd.io/etcd/api/v3 v3.5.15/go.mod h1:N9EhGzXq58WuMllgH9ZvnEr7SI9pS0k0+DHZezGp7jM= -go.etcd.io/etcd/client/pkg/v3 v3.5.15 h1:fo0HpWz/KlHGMCC+YejpiCmyWDEuIpnTDzpJLB5fWlA= -go.etcd.io/etcd/client/pkg/v3 v3.5.15/go.mod h1:mXDI4NAOwEiszrHCb0aqfAYNCrZP4e9hRca3d1YK8EU= -go.etcd.io/etcd/client/v2 v2.305.12 h1:0m4ovXYo1CHaA/Mp3X/Fak5sRNIWf01wk/X1/G3sGKI= -go.etcd.io/etcd/client/v2 v2.305.12/go.mod h1:aQ/yhsxMu+Oht1FOupSr60oBvcS9cKXHrzBpDsPTf9E= -go.etcd.io/etcd/client/v3 v3.5.15 h1:23M0eY4Fd/inNv1ZfU3AxrbbOdW79r9V9Rl62Nm6ip4= -go.etcd.io/etcd/client/v3 v3.5.15/go.mod h1:CLSJxrYjvLtHsrPKsy7LmZEE+DK2ktfd2bN4RhBMwlU= -go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= -go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= -go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= -go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= -go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= -go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w= +go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4= +go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw= +go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w= +go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= +go.etcd.io/etcd/client/v3 v3.5.17 h1:o48sINNeWz5+pjy/Z0+HKpj/xSnBkuVhVvXkjEXbqZY= +go.etcd.io/etcd/client/v3 v3.5.17/go.mod h1:j2d4eXTHWkT2ClBgnnEPm/Wuu7jsqku41v9DZ3OtjQo= +go.etcd.io/etcd/pkg/v3 v3.5.13 h1:st9bDWNsKkBNpP4PR1MvM/9NqUPfvYZx/YXegsYEH8M= +go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= +go.etcd.io/etcd/raft/v3 v3.5.13 h1:7r/NKAOups1YnKcfro2RvGGo2PTuizF/xh26Z2CTAzA= +go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= +go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= +go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/jaeger v1.16.0 h1:YhxxmXZ011C0aDZKoNw+juVWAmEfv/0W2XBOv9aHTaA= @@ -551,7 +546,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= @@ -579,14 +573,13 @@ 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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -609,7 +602,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -619,7 +611,6 @@ golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= @@ -629,7 +620,6 @@ 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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -686,15 +676,15 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/dnaeon/go-vcr.v3 v3.2.0 h1:Rltp0Vf+Aq0u4rQXgmXgtgoRDStTnFN83cWgSGSoRzM= gopkg.in/dnaeon/go-vcr.v3 v3.2.0/go.mod h1:2IMOnnlx9I6u9x+YBsM3tAMx6AlOxnJ0pWxQAzZ79Ag= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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= @@ -704,24 +694,24 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= -k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= -k8s.io/apiextensions-apiserver v0.30.3 h1:oChu5li2vsZHx2IvnGP3ah8Nj3KyqG3kRSaKmijhB9U= -k8s.io/apiextensions-apiserver v0.30.3/go.mod h1:uhXxYDkMAvl6CJw4lrDN4CPbONkF3+XL9cacCT44kV4= -k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= -k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.3 h1:QZJndA9k2MjFqpnyYv/PH+9PE0SHhx3hBho4X0vE65g= -k8s.io/apiserver v0.30.3/go.mod h1:6Oa88y1CZqnzetd2JdepO0UXzQX4ZnOekx2/PtEjrOg= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apiextensions-apiserver v0.31.3 h1:+GFGj2qFiU7rGCsA5o+p/rul1OQIq6oYpQw4+u+nciE= +k8s.io/apiextensions-apiserver v0.31.3/go.mod h1:2DSpFhUZZJmn/cr/RweH1cEVVbzFw9YBu4T+U3mf1e4= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.3 h1:+1oHTtCB+OheqFEz375D0IlzHZ5VeQKX1KGXnx+TTuY= +k8s.io/apiserver v0.31.3/go.mod h1:PrxVbebxrxQPFhJk4powDISIROkNMKHibTg9lTRQ0Qg= k8s.io/cli-runtime v0.30.3 h1:aG69oRzJuP2Q4o8dm+f5WJIX4ZBEwrvdID0+MXyUY6k= k8s.io/cli-runtime v0.30.3/go.mod h1:hwrrRdd9P84CXSKzhHxrOivAR9BRnkMt0OeP5mj7X30= -k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= -k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/cloud-provider v0.30.2 h1:yov6r02v7sMUNNvzEz51LtL2krn2c1wsC+dy/8BxKQI= k8s.io/cloud-provider v0.30.2/go.mod h1:w69t2dSjDtI9BYK6SEqj6HmMKIojEk08fXRoUzjFN2I= -k8s.io/cluster-bootstrap v0.30.3 h1:MgxyxMkpaC6mu0BKWJ8985XCOnKU+eH3Iy+biwtDXRk= -k8s.io/cluster-bootstrap v0.30.3/go.mod h1:h8BoLDfdD7XEEIXy7Bx9FcMzxHwz29jsYYi34bM5DKU= -k8s.io/component-base v0.30.3 h1:Ci0UqKWf4oiwy8hr1+E3dsnliKnkMLZMVbWzeorlk7s= -k8s.io/component-base v0.30.3/go.mod h1:C1SshT3rGPCuNtBs14RmVD2xW0EhRSeLvBh7AGk1quA= +k8s.io/cluster-bootstrap v0.31.3 h1:O1Yxk1bLaxZvmQCXLaJjj5iJD+lVMfJdRUuKgbUHPlA= +k8s.io/cluster-bootstrap v0.31.3/go.mod h1:TI6TCsQQB4FfcryWgNO3SLXSKWBqHjx4DfyqSFwixj8= +k8s.io/component-base v0.31.3 h1:DMCXXVx546Rfvhj+3cOm2EUxhS+EyztH423j+8sOwhQ= +k8s.io/component-base v0.31.3/go.mod h1:xME6BHfUOafRgT0rGVBGl7TuSg8Z9/deT7qq6w7qjIU= k8s.io/component-helpers v0.30.3 h1:KPc8l0eGx9Wg2OcKc58k9ozNcVcOInAi3NGiuS2xJ/c= k8s.io/component-helpers v0.30.3/go.mod h1:VOQ7g3q+YbKWwKeACG2BwPv4ftaN8jXYJ5U3xpzuYAE= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -730,8 +720,8 @@ k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a h1:zD1uj3Jf+mD4zmA7W+goE5 k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= k8s.io/kubectl v0.30.3 h1:YIBBvMdTW0xcDpmrOBzcpUVsn+zOgjMYIu7kAq+yqiI= k8s.io/kubectl v0.30.3/go.mod h1:IcR0I9RN2+zzTRUa1BzZCm4oM0NLOawE6RzlDvd1Fpo= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/cloud-provider-azure v1.30.4 h1:KD9wH7JAEnYNLQnk6tT78RHGc2iIx1F5BnNBtpm3uAI= @@ -740,12 +730,12 @@ sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29 h1:qiifAaaBqV3d/EcN9dKJaJI sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29/go.mod h1:ZFAt0qF1kR+w8nBVJK56s6CFvLrlosN1i2c+Sxb7LBk= sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16 h1:Fm/Yjv4nXjUtJ90uXKSKwPwaTWYuDFMhDNNOd77PlOg= sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16/go.mod h1:+kl90flu4+WCP6HBGVYbKVQR+5ztDzUNrWJz8rsnvRU= -sigs.k8s.io/cluster-api v1.8.5 h1:lNA2fPN4fkXEs+oOQlnwxT/4VwRFBpv5kkSoJG8nqBA= -sigs.k8s.io/cluster-api v1.8.5/go.mod h1:pXv5LqLxuIbhGIXykyNKiJh+KrLweSBajVHHitPLyoY= -sigs.k8s.io/cluster-api/test v1.8.5 h1:p2fjSv/exSFgYw+pO6iap1RVJPc0LJ+/A/PAMPl9vhU= -sigs.k8s.io/cluster-api/test v1.8.5/go.mod h1:odnzMkDndCRPCWdwl0CRofyZyY857wN34bUih1MLKIc= -sigs.k8s.io/controller-runtime v0.18.5 h1:nTHio/W+Q4aBlQMgbnC5hZb4IjIidyrizMai9P6n4Rk= -sigs.k8s.io/controller-runtime v0.18.5/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/cluster-api v1.9.0-rc.1 h1:fWrcw3p3nvzUjbQpB/GsTP+LeAVN4wjXV8LFkIZmN7A= +sigs.k8s.io/cluster-api v1.9.0-rc.1/go.mod h1:8rjpkMxLFcA87Y3P6NOi6E9RMZv2uRnN9ppOPAxrTAY= +sigs.k8s.io/cluster-api/test v1.9.0-rc.1 h1:GgNeQ2UhcrvlNMt7maXVEgd6iEpRJIEOmbKMLCwMTU8= +sigs.k8s.io/cluster-api/test v1.9.0-rc.1/go.mod h1:w09AhrOiWTjN9ToL4xaMZLnutMFe78x03POGZ3Fsbeg= +sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= +sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.25.0 h1:ugUvgesHKKA0yKmD6QtYTiEev+kPUpGxdTPbMGf8VTU= diff --git a/main.go b/main.go index ce7484ba5c7..09f642b7274 100644 --- a/main.go +++ b/main.go @@ -41,8 +41,10 @@ import ( "k8s.io/client-go/tools/leaderelection/resourcelock" cgrecord "k8s.io/client-go/tools/record" "k8s.io/klog/v2" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" capifeature "sigs.k8s.io/cluster-api/feature" @@ -418,7 +420,7 @@ func registerControllers(ctx context.Context, mgr manager.Manager) { Timeouts: timeouts, WatchFilterValue: watchFilterValue, CredentialCache: credCache, - }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachineConcurrency}); err != nil { + }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachineConcurrency, SkipNameValidation: ptr.To(true)}); err != nil { setupLog.Error(err, "unable to create controller", "controller", "AzureJSONMachine") os.Exit(1) } @@ -476,7 +478,7 @@ func registerControllers(ctx context.Context, mgr manager.Manager) { Timeouts: timeouts, WatchFilterValue: watchFilterValue, CredentialCache: credCache, - }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachinePoolConcurrency}); err != nil { + }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachinePoolConcurrency, SkipNameValidation: ptr.To(true)}); err != nil { setupLog.Error(err, "unable to create controller", "controller", "AzureJSONMachinePool") os.Exit(1) } @@ -558,23 +560,30 @@ func registerControllers(ctx context.Context, mgr manager.Manager) { setupLog.Error(err, "unable to create secret caching client") os.Exit(1) } - tracker, err := remote.NewClusterCacheTracker( - mgr, - remote.ClusterCacheTrackerOptions{ - SecretCachingClient: secretCachingClient, - Log: &ctrl.Log, - Indexes: []remote.Index{remote.NodeProviderIDIndex}, + clusterCache, err := clustercache.SetupWithManager(ctx, mgr, clustercache.Options{ + SecretClient: secretCachingClient, + Cache: clustercache.CacheOptions{}, + Client: clustercache.ClientOptions{ + UserAgent: remote.DefaultClusterAPIUserAgent("azure-controller"), + Cache: clustercache.ClientCacheOptions{ + DisableFor: []client.Object{ + // Don't cache ConfigMaps or Secrets. + &corev1.ConfigMap{}, + &corev1.Secret{}, + }, + }, }, - ) + WatchFilterValue: watchFilterValue, + }, controller.Options{}) if err != nil { - setupLog.Error(err, "unable to create cluster cache tracker") + setupLog.Error(err, "unable to create cluster cache") os.Exit(1) } if err := (&controllers.AzureASOManagedMachinePoolReconciler{ Client: mgr.GetClient(), WatchFilterValue: watchFilterValue, - Tracker: tracker, + Tracker: clusterCache, }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachinePoolConcurrency}); err != nil { setupLog.Error(err, "unable to create controller", "controller", "AzureASOManagedMachinePool") os.Exit(1) diff --git a/test/e2e/config/azure-dev.yaml b/test/e2e/config/azure-dev.yaml index b9d23ffe4e0..0754ec806ad 100644 --- a/test/e2e/config/azure-dev.yaml +++ b/test/e2e/config/azure-dev.yaml @@ -3,11 +3,11 @@ managementClusterName: capz-e2e images: - name: ${MANAGER_IMAGE} loadBehavior: mustLoad - - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.8.5 + - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.9.0-rc.1 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.8.5 + - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.9.0-rc.1 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.8.5 + - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.9.0-rc.1 loadBehavior: tryLoad - name: registry.k8s.io/cluster-api-helm/cluster-api-helm-controller:v0.2.5 loadBehavior: tryLoad @@ -16,8 +16,8 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v1.7.8 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.8/core-components.yaml" + - name: v1.8.5 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/core-components.yaml" type: "url" contract: v1beta1 replacements: @@ -25,8 +25,8 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" - - name: v1.8.5 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/core-components.yaml + - name: v1.9.0-rc.1 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.0-rc.1/core-components.yaml type: url contract: v1beta1 files: @@ -39,8 +39,8 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v1.7.8 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.8/bootstrap-components.yaml" + - name: v1.8.5 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/bootstrap-components.yaml" type: "url" contract: v1beta1 replacements: @@ -48,8 +48,8 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" - - name: v1.8.5 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/bootstrap-components.yaml + - name: v1.9.0-rc.1 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.0-rc.1/bootstrap-components.yaml type: url contract: v1beta1 files: @@ -61,8 +61,8 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v1.7.8 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.8/control-plane-components.yaml" + - name: v1.8.5 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/control-plane-components.yaml" type: "url" contract: v1beta1 replacements: @@ -70,8 +70,8 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" - - name: v1.8.5 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.5/control-plane-components.yaml + - name: v1.9.0-rc.1 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.0-rc.1/control-plane-components.yaml type: url contract: v1beta1 files: @@ -232,8 +232,8 @@ variables: KUBETEST_CONFIGURATION: "./data/kubetest/conformance.yaml" WINDOWS_CONTAINERD_URL: "${WINDOWS_CONTAINERD_URL:-}" AZURE_CNI_V1_MANIFEST_PATH: "${PWD}/templates/addons/azure-cni-v1.yaml" - OLD_CAPI_UPGRADE_VERSION: "v1.7.8" - LATEST_CAPI_UPGRADE_VERSION: "v1.8.5" + OLD_CAPI_UPGRADE_VERSION: "v1.8.5" + LATEST_CAPI_UPGRADE_VERSION: "v1.9.0-rc.1" OLD_PROVIDER_UPGRADE_VERSION: "v1.16.3" LATEST_PROVIDER_UPGRADE_VERSION: "v1.17.1" OLD_CAAPH_UPGRADE_VERSION: "v0.1.0-alpha.10" diff --git a/test/e2e/data/shared/v1beta1/metadata.yaml b/test/e2e/data/shared/v1beta1/metadata.yaml index bd042aefa4d..4fbe4824614 100644 --- a/test/e2e/data/shared/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/v1beta1/metadata.yaml @@ -1,6 +1,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 9 + contract: v1beta1 - major: 1 minor: 8 contract: v1beta1