Skip to content

Commit

Permalink
On removal of backend config name from service annotaion, ensure no e…
Browse files Browse the repository at this point in the history
…xisting settings are affected
  • Loading branch information
rramkumar1 committed Jun 19, 2018
1 parent 460d2e0 commit 6dc1241
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/controller/translator/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ func (t *Translator) getServicePort(id utils.ServicePortID) (*utils.ServicePort,
if t.ctx.BackendConfigEnabled {
beConfig, err = backendconfig.GetBackendConfigForServicePort(t.ctx.BackendConfigInformer.GetIndexer(), svc, port)
if err != nil {
if err == backendconfig.ErrNoBackendConfigForPort {
beConfig = &backendconfigv1beta1.BackendConfig{}
} else {
// If we could not find a backend config name for the current
// service port, then do not return an error. Removing a reference
// to a backend config from the service annotation is a valid
// step that a user could take.
if err != backendconfig.ErrNoBackendConfigForPort {
return svcPort, errors.ErrSvcBackendConfig{ServicePortID: id, Err: err}
}
}
Expand Down

0 comments on commit 6dc1241

Please sign in to comment.