deislabs / osiris

A general purpose, scale-to-zero component for Kubernetes
MIT License
463 stars 51 forks source link

Add support for deployments initially scaled to zero #40

Closed vbehar closed 4 years ago

vbehar commented 4 years ago

When using a deployment initially scaled to zero replicas, Osiris won't automatically scale it up when needed. This is because the associated service is not updated with the right endpoints until there is a least 1 pod event.

To fix it I just added an initial call to the syncEndpoints func when running the endpoints manager, so that the service will be initially configured with Osiris activator endpoint.

codecov-io commented 4 years ago

Codecov Report

Merging #40 into master will decrease coverage by 0.32%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage    58.1%   57.78%   -0.33%     
==========================================
  Files          11       11              
  Lines         623      623              
==========================================
- Hits          362      360       -2     
- Misses        232      234       +2     
  Partials       29       29
Impacted Files Coverage Δ
pkg/net/http/httputil/reverseproxy.go 72.22% <0%> (-0.8%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 71f8b90...e738058. Read the comment docs.

krancour commented 4 years ago

@vbehar nice improvement. LGTM