Skip to content
Snippets Groups Projects
  1. Mar 03, 2023
  2. Jan 28, 2023
  3. Jan 17, 2023
  4. Jan 12, 2023
  5. Jan 11, 2023
  6. Dec 14, 2022
  7. Dec 06, 2022
  8. Oct 24, 2022
  9. Oct 20, 2022
  10. Oct 13, 2022
  11. Oct 11, 2022
  12. Sep 29, 2022
  13. Sep 21, 2022
  14. Sep 13, 2022
  15. Sep 08, 2022
    • Alex Ellis (OpenFaaS Ltd)'s avatar
      Use Desired Replicas when scaling from zero · 8e711b3a
      Alex Ellis (OpenFaaS Ltd) authored
      
      During some exploratory testing, I ran into an issue where
      the gateway would attempt to scale a deployment from zero
      replicas to min, despite there already being min replicas.
      
      Why?
      
      The scaling logic was looking for Available replicas when
      it should have looked for Desired replicas. So when a
      deployment had zero ready replicas due to readiness checks
      failing, the gateway was attempting to scale from zero
      to min.
      
      This logic has been corrected and separated from the
      a holding pattern where the gateway waits for a ready
      replica.
      
      Tested with KinD and an edited function which had a
      readiness probe, which was failing and no ready
      replicas. As desired, the gateway did not scale to min.
      
      However, when setting desired replicas to zero, the
      gateway did scale up as expected.
      
      This change also modifies all print statements for
      "seconds" and makes them use 4 decimal places instead of
      the default which was a longer, more verbose string for
      the logs.
      
      Signed-off-by: default avatarAlex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
      8e711b3a
Loading