atlassian / smith

Smith is a Kubernetes workflow engine / resource manager
Apache License 2.0
285 stars 24 forks source link

update deployment replicas based on LastAppliedReplicas annotation and running config #349

Closed patrickshan closed 5 years ago

patrickshan commented 5 years ago

This PR includes a change to update deployment replicas based on LastAppliedReplicas annotation and current running config to solve the conflicts between smith and other controllers inside the cluster like HPA.

If deployment spec has the same replicas as number recorded LastAppliedReplicas annotation, it will keep the replicas inside running config. While they are different, it will use the replicas inside the deployment spec instead and also update the annotation to the same value.