Skip to content

Commit

Permalink
add feature flag around exposed negs
Browse files Browse the repository at this point in the history
  • Loading branch information
agau4779 committed Jun 19, 2018
1 parent 769948d commit 0b7923f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pkg/annotations/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ var (

// NEGExposed is true if the service exposes NEGs
func (svc *Service) NEGExposed() bool {
if !flags.F.Features.NEGExposed {
return false
}

v, ok := svc.v[ExposeNEGAnnotationKey]
return ok && len(v) > 0
}
Expand Down
7 changes: 5 additions & 2 deletions pkg/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ type Features struct {
Http2 bool
// NEG enables using NetworkEndpointGroups instead of IGs as backends
NEG bool
// NEGExposed enables using standalone (exposed) NEGs
NEGExposed bool
}

var DefaultFeatures = &Features{
Http2: true,
NEG: true,
Http2: true,
NEG: true,
NEGExposed: true,
}

func EnabledFeatures() *Features {
Expand Down

0 comments on commit 0b7923f

Please sign in to comment.