fix(admission): use client network, fail-open on nil gRPC client, close http resources
- Use client address network instead of listener network in admission wrapper - Return true (allow) when gRPC admission plugin client is nil to fail-open - Add Close() to httpPlugin to close idle HTTP connections - Close httpLoader in localAdmission.Close() - Remove dead commented-out code in periodReload
This commit is contained in:
@@ -45,7 +45,7 @@ func NewGRPCPlugin(name string, addr string, opts ...plugin.Option) admission.Ad
|
||||
|
||||
func (p *grpcPlugin) Admit(ctx context.Context, network, addr string, opts ...admission.Option) bool {
|
||||
if p.client == nil {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
var options admission.Options
|
||||
|
||||
Reference in New Issue
Block a user