From e30311f344cd4cb728a0a83ad15dce1989a889c0 Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Thu, 12 Dec 2024 09:33:31 +0900 Subject: [PATCH] fix: correct typo in AutoscalerReference type name - Fix spelling of AutoscalerReference (was AutoscalerRefernce) in type definition and struct field Signed-off-by: kahirokunn --- pkg/apis/flagger/v1beta1/canary.go | 4 ++-- pkg/canary/deployment_fixture_test.go | 2 +- pkg/canary/scaled_object_reconciler_test.go | 2 +- pkg/controller/scheduler_deployment_fixture_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/apis/flagger/v1beta1/canary.go b/pkg/apis/flagger/v1beta1/canary.go index f5797e876..8c5ac5393 100644 --- a/pkg/apis/flagger/v1beta1/canary.go +++ b/pkg/apis/flagger/v1beta1/canary.go @@ -74,7 +74,7 @@ type CanarySpec struct { // AutoscalerRef references an autoscaling resource // +optional - AutoscalerRef *AutoscalerRefernce `json:"autoscalerRef,omitempty"` + AutoscalerRef *AutoscalerReference `json:"autoscalerRef,omitempty"` // Reference to NGINX ingress resource // +optional @@ -458,7 +458,7 @@ type LocalObjectReference struct { Name string `json:"name"` } -type AutoscalerRefernce struct { +type AutoscalerReference struct { // API version of the scaler // +required APIVersion string `json:"apiVersion,omitempty"` diff --git a/pkg/canary/deployment_fixture_test.go b/pkg/canary/deployment_fixture_test.go index 0ebf07eea..7ed0ec482 100644 --- a/pkg/canary/deployment_fixture_test.go +++ b/pkg/canary/deployment_fixture_test.go @@ -396,7 +396,7 @@ func newDeploymentControllerTestCanary(cc canaryConfigs) *flaggerv1.Canary { APIVersion: "apps/v1", Kind: "Deployment", }, - AutoscalerRef: &flaggerv1.AutoscalerRefernce{ + AutoscalerRef: &flaggerv1.AutoscalerReference{ Name: "podinfo", APIVersion: "autoscaling/v2beta2", Kind: "HorizontalPodAutoscaler", diff --git a/pkg/canary/scaled_object_reconciler_test.go b/pkg/canary/scaled_object_reconciler_test.go index 65b1d460a..d70a8b75a 100644 --- a/pkg/canary/scaled_object_reconciler_test.go +++ b/pkg/canary/scaled_object_reconciler_test.go @@ -99,7 +99,7 @@ func Test_setPrimaryScaledObjectQueries(t *testing.T) { TargetRef: flaggerv1.LocalObjectReference{ Name: "podinfo", }, - AutoscalerRef: &flaggerv1.AutoscalerRefernce{ + AutoscalerRef: &flaggerv1.AutoscalerReference{ Name: "podinfo", }, }, diff --git a/pkg/controller/scheduler_deployment_fixture_test.go b/pkg/controller/scheduler_deployment_fixture_test.go index 57357567b..8b789940c 100644 --- a/pkg/controller/scheduler_deployment_fixture_test.go +++ b/pkg/controller/scheduler_deployment_fixture_test.go @@ -296,7 +296,7 @@ func newDeploymentTestCanary() *flaggerv1.Canary { APIVersion: "apps/v1", Kind: "Deployment", }, - AutoscalerRef: &flaggerv1.AutoscalerRefernce{ + AutoscalerRef: &flaggerv1.AutoscalerReference{ Name: "podinfo", APIVersion: "autoscaling/v2beta2", Kind: "HorizontalPodAutoscaler", @@ -358,7 +358,7 @@ func newDeploymentTestCanaryAB() *flaggerv1.Canary { APIVersion: "apps/v1", Kind: "Deployment", }, - AutoscalerRef: &flaggerv1.AutoscalerRefernce{ + AutoscalerRef: &flaggerv1.AutoscalerReference{ Name: "podinfo", APIVersion: "autoscaling/v2beta2", Kind: "HorizontalPodAutoscaler",