Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
Signed-off-by: Ansu Varghese <[email protected]>
  • Loading branch information
aavarghese committed Apr 29, 2021
1 parent fb3eef2 commit ae0050d
Show file tree
Hide file tree
Showing 59 changed files with 9 additions and 758 deletions.
18 changes: 9 additions & 9 deletions pkg/common/scheduler/statefulset/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,14 @@ func (s *StatefulSetScheduler) Schedule(vpod scheduler.VPod) ([]duckv1alpha1.Pla
placements := vpod.GetPlacements()
spreadVal := int32(0)

// The scheduler
// Policy: MaxFillup
// The scheduler when policy type is
// Policy: MaxFillup (schedulePolicy == false)
// - allocates as many vreplicas as possible to the same pod(s)
// - allocates remaining vreplicas to new pods
// Policy: EvenSpread
// - allocates vreplicas to new pods until
// - allocates remaining vreplicas to existing pods
// Policy: EvenSpread (schedulePolicy == true)
// - divides up vreplicas equally between the zones and
// - allocates as many vreplicas as possible to existing pods while not going over the equal spread value
// - allocates remaining vreplicas to new pods created in new zones still satisfying equal spread

// Exact number of vreplicas => do nothing
tr := scheduler.GetTotalVReplicas(placements)
Expand Down Expand Up @@ -177,12 +178,11 @@ func (s *StatefulSetScheduler) Schedule(vpod scheduler.VPod) ([]duckv1alpha1.Pla
// Need more => scale up
logger.Infow("scaling up", zap.Int32("vreplicas", tr), zap.Int32("new vreplicas", vpod.GetVReplicas()))
placements, left := s.addReplicas(state, vpod.GetVReplicas()-tr, placements, spreadVal)
logger.Infow("scheduling not done", zap.Any("placement", placements), zap.Int32("left", left))
if left > 0 {
s.pending[vpod.GetKey()] = left

// Give time for the autoscaler to do its job
logger.Info("scheduling failed (not enough pod replicas)", zap.Any("placement", placements), zap.Int32("pending reps:", s.pendingVReplicas()))
logger.Info("scheduling failed (not enough pod replicas)", zap.Any("placement", placements), zap.Int32("left:", left))

s.pending[vpod.GetKey()] = left

// Trigger the autoscaler
if s.autoscaler != nil {
Expand Down
24 changes: 0 additions & 24 deletions vendor/github.com/google/mako/go/quickstore/BUILD

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/google/mako/internal/go/common/BUILD

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/github.com/grpc-ecosystem/grpc-gateway/internal/BUILD.bazel

This file was deleted.

85 changes: 0 additions & 85 deletions vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/BUILD.bazel

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS

This file was deleted.

31 changes: 0 additions & 31 deletions vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp/OWNERS

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS

This file was deleted.

25 changes: 0 additions & 25 deletions vendor/k8s.io/client-go/rest/OWNERS

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/k8s.io/client-go/tools/auth/OWNERS

This file was deleted.

Loading

0 comments on commit ae0050d

Please sign in to comment.