Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to primaryScalerReplicas is ignored if no other changes inside the canary #1674

Open
yarosq opened this issue Jul 9, 2024 · 0 comments

Comments

@yarosq
Copy link

yarosq commented Jul 9, 2024

Describe the bug

Updates to autoscalerRef.primaryScalerReplicas are ignored

  autoscalerRef:
    apiVersion: autoscaling/v2
    kind: HorizontalPodAutoscaler
    name: service-deployment
    primaryScalerReplicas:
      maxReplicas: 4
      minReplicas: 4

To Reproduce

  1. Create canary with autoscalerRef defined
  autoscalerRef:
    apiVersion: autoscaling/v2
    kind: HorizontalPodAutoscaler
    name: service-deployment
    primaryScalerReplicas:
      maxReplicas: 2
      minReplicas: 2
  1. Update maxReplicas/minReplicas
  autoscalerRef:
    apiVersion: autoscaling/v2
    kind: HorizontalPodAutoscaler
    name: service-deployment
    primaryScalerReplicas:
      maxReplicas: 4
      minReplicas: 4

-->

Result:
Primary hpa is not updated and only 2 pod instance are running

kubectl get hpa service-deployment-primary --template='.spec.maxReplicas: {{.spec.maxReplicas}}{{"\n"}}.spec.minReplicas: {{.spec.minReplicas}}'
.spec.maxReplicas: 2
.spec.minReplicas: 2

Expected behavior

Primary hpa resource should be updated and primary pods scaled to 4 instances

Workaround

  • we can patch the canary with pod annotation but this will trigger the canary release which is not ideal.
  • we can update primary hpa manually but I expect this to happens automatically

Additional context

  • Flagger version: 1.35.0
  • Kubernetes version: 1.27
  • Service Mesh provider: Linkerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant