Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
randytqwjp committed Nov 28, 2024
1 parent c056d82 commit b47578c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/controller/tortoise_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ func (r *TortoiseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_
}
tortoise = tortoiseService.UpdateTortoiseAutoscalingPolicyInStatus(tortoise, hpa, now)
scalingActive := r.HpaService.checkHpaMetricStatus(ctx, hpa)

Check failure on line 188 in internal/controller/tortoise_controller.go

View workflow job for this annotation

GitHub Actions / Test

r.HpaService.checkHpaMetricStatus undefined (type *hpa.Service has no field or method checkHpaMetricStatus)
if scalingActive == false && tortoise.Spec.UpdateMode != autoscalingv1beta3.UpdateModeOff {
if scalingActive == false && tortoise.Spec.UpdateMode == autoscalingv1beta3.UpdateModeAuto {
//switch to emergency mode
if tortoise.Spec.UpdateMode == autoscalingv1beta3.UpdateModeAuto {
tortoise.Spec.UpdateMode = autoscalingv1beta3.UpdateModeEmergency
}
tortoise.Spec.UpdateMode = autoscalingv1beta3.UpdateModeEmergency
}
if scalingActive == true && tortoise.Spec.UpdateMode == autoscalingv1beta3.UpdateModeEmergency {
tortoise.Spec.UpdateMode = autoscalingv1beta3.UpdateModeAuto
Expand Down

0 comments on commit b47578c

Please sign in to comment.