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/apis/flagger/v1beta1/zz_generated.deepcopy.go b/pkg/apis/flagger/v1beta1/zz_generated.deepcopy.go index 340fc0439..f5cf1e943 100644 --- a/pkg/apis/flagger/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/flagger/v1beta1/zz_generated.deepcopy.go @@ -152,7 +152,7 @@ func (in *AlertProviderStatus) DeepCopy() *AlertProviderStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AutoscalerRefernce) DeepCopyInto(out *AutoscalerRefernce) { +func (in *AutoscalerReference) DeepCopyInto(out *AutoscalerReference) { *out = *in if in.PrimaryScalerQueries != nil { in, out := &in.PrimaryScalerQueries, &out.PrimaryScalerQueries @@ -169,12 +169,12 @@ func (in *AutoscalerRefernce) DeepCopyInto(out *AutoscalerRefernce) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalerRefernce. -func (in *AutoscalerRefernce) DeepCopy() *AutoscalerRefernce { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalerReference. +func (in *AutoscalerReference) DeepCopy() *AutoscalerReference { if in == nil { return nil } - out := new(AutoscalerRefernce) + out := new(AutoscalerReference) in.DeepCopyInto(out) return out } @@ -469,7 +469,7 @@ func (in *CanarySpec) DeepCopyInto(out *CanarySpec) { out.TargetRef = in.TargetRef if in.AutoscalerRef != nil { in, out := &in.AutoscalerRef, &out.AutoscalerRef - *out = new(AutoscalerRefernce) + *out = new(AutoscalerReference) (*in).DeepCopyInto(*out) } if in.IngressRef != nil { 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",