Skip to content

Commit

Permalink
Merge pull request #94 from jovizhangwei/ask
Browse files Browse the repository at this point in the history
Add SERVICE_FORCE_BACKEND_ENI env for serverless kubernetes
  • Loading branch information
k8s-ci-robot committed Sep 23, 2019
2 parents 3ee3c73 + 6bc3bd9 commit 96531fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud-controller-manager/controller/service/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"sort"
"strings"
"sync"
"os"
)

type Context struct{ ctx sync.Map }
Expand Down Expand Up @@ -42,6 +43,9 @@ func ServiceModeLocal(svc *v1.Service) bool {
}

func IsENIBackendType(svc *v1.Service) bool {
if os.Getenv("SERVICE_FORCE_BACKEND_ENI") == "true" {
return true
}
return svc.Annotations[utils.BACKEND_TYPE_LABEL] == utils.BACKEND_TYPE_ENI
}

Expand Down

0 comments on commit 96531fb

Please sign in to comment.