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"
|
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||||
|
|
||||||
"github.com/pomerium/pomerium/config"
|
"github.com/pomerium/pomerium/config"
|
||||||
|
"github.com/pomerium/pomerium/internal/hashutil"
|
||||||
"github.com/pomerium/pomerium/internal/log"
|
"github.com/pomerium/pomerium/internal/log"
|
||||||
"github.com/pomerium/pomerium/internal/urlutil"
|
"github.com/pomerium/pomerium/internal/urlutil"
|
||||||
"github.com/pomerium/pomerium/pkg/cryptutil"
|
"github.com/pomerium/pomerium/pkg/cryptutil"
|
||||||
|
@ -238,8 +239,9 @@ func (b *Builder) buildMetricsListener(cfg *config.Config) (*envoy_config_listen
|
||||||
host = ""
|
host = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
li := newEnvoyListener("metrics-ingress")
|
addr := buildAddress(fmt.Sprintf("%s:%s", host, port), 9902)
|
||||||
li.Address = 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}
|
li.FilterChains = []*envoy_config_listener_v3.FilterChain{filterChain}
|
||||||
return li, nil
|
return li, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ func Test_buildMetricsHTTPConnectionManagerFilter(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
testutil.AssertProtoJSONEqual(t, `
|
testutil.AssertProtoJSONEqual(t, `
|
||||||
{
|
{
|
||||||
"name": "metrics-ingress",
|
"name": "metrics-ingress-1566242852377945326",
|
||||||
"perConnectionBufferLimitBytes": 32768,
|
"perConnectionBufferLimitBytes": 32768,
|
||||||
"address": {
|
"address": {
|
||||||
"socketAddress": {
|
"socketAddress": {
|
||||||
|
|
|
@ -204,7 +204,7 @@ func (mgr *Manager) DeltaAggregatedResources(
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
case outgoing <- res:
|
case outgoing <- res:
|
||||||
log.Info(changeCtx).
|
log.Info(changeCtx).
|
||||||
Str("nounce", res.Nonce).
|
Str("nonce", res.Nonce).
|
||||||
Str("type", res.TypeUrl).
|
Str("type", res.TypeUrl).
|
||||||
Msg("send update")
|
Msg("send update")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue