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:
@@ -47,7 +47,7 @@ func (ln *listener) Accept() (net.Conn, error) {
|
||||
}
|
||||
|
||||
if ln.admission != nil &&
|
||||
!ln.admission.Admit(ctx, ln.Addr().Network(), clientAddr.String(), admission.WithService(ln.service)) {
|
||||
!ln.admission.Admit(ctx, clientAddr.Network(), clientAddr.String(), admission.WithService(ln.service)) {
|
||||
c.Close()
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user