mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
envoyconfig: fix metrics ingress listener name (#2124)
This commit is contained in:
parent
9718d27ba6
commit
008bda99e2
3 changed files with 6 additions and 4 deletions
|
@ -26,6 +26,7 @@ import (
|
|||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/hashutil"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/urlutil"
|
||||
"github.com/pomerium/pomerium/pkg/cryptutil"
|
||||
|
@ -238,8 +239,9 @@ func (b *Builder) buildMetricsListener(cfg *config.Config) (*envoy_config_listen
|
|||
host = ""
|
||||
}
|
||||
|
||||
li := newEnvoyListener("metrics-ingress")
|
||||
li.Address = buildAddress(fmt.Sprintf("%s:%s", host, port), 9902)
|
||||
addr := buildAddress(fmt.Sprintf("%s:%s", host, port), 9902)
|
||||
li := newEnvoyListener(fmt.Sprintf("metrics-ingress-%d", hashutil.MustHash(addr)))
|
||||
li.Address = addr
|
||||
li.FilterChains = []*envoy_config_listener_v3.FilterChain{filterChain}
|
||||
return li, nil
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ func Test_buildMetricsHTTPConnectionManagerFilter(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
testutil.AssertProtoJSONEqual(t, `
|
||||
{
|
||||
"name": "metrics-ingress",
|
||||
"name": "metrics-ingress-1566242852377945326",
|
||||
"perConnectionBufferLimitBytes": 32768,
|
||||
"address": {
|
||||
"socketAddress": {
|
||||
|
|
|
@ -204,7 +204,7 @@ func (mgr *Manager) DeltaAggregatedResources(
|
|||
return ctx.Err()
|
||||
case outgoing <- res:
|
||||
log.Info(changeCtx).
|
||||
Str("nounce", res.Nonce).
|
||||
Str("nonce", res.Nonce).
|
||||
Str("type", res.TypeUrl).
|
||||
Msg("send update")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue