github.com/cilium/cilium@v1.16.2/pkg/hubble/relay/defaults/defaults.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package defaults 5 6 import ( 7 "fmt" 8 "time" 9 10 ciliumDefaults "github.com/cilium/cilium/pkg/defaults" 11 hubbledefaults "github.com/cilium/cilium/pkg/hubble/defaults" 12 ) 13 14 const ( 15 // ClusterName is the default cluster name 16 ClusterName = ciliumDefaults.ClusterName 17 // DialTimeout is the timeout that is used when establishing a new 18 // connection. 19 DialTimeout = 30 * time.Second 20 // HealthCheckInterval is the time interval between health checks. 21 HealthCheckInterval = 5 * time.Second 22 // GopsPort is the default port for gops to listen on. 23 GopsPort = 9893 24 // PprofAddress is the default port for pprof to listen on. 25 PprofAddress = "localhost" 26 // PprofPort is the default port for pprof to listen on. 27 PprofPort = 6062 28 // RetryTimeout is the duration to wait between reconnection attempts. 29 RetryTimeout = 30 * time.Second 30 // PeerTarget is the address of the peer service. 31 PeerTarget = "unix://" + ciliumDefaults.HubbleSockPath 32 // PeerServiceName is the name of the peer service, should it exist. 33 PeerServiceName = "hubble-peer" 34 35 // SortBufferMaxLen is the max number of flows that can be buffered for 36 // sorting before being sen to the client. 37 SortBufferMaxLen = 100 38 // SortBufferDrainTimeout is the rate at which flows are drained from the 39 // sorting buffer when it is not full. 40 SortBufferDrainTimeout = 1 * time.Second 41 // ErrorAggregationWindow is the time window during which errors with the 42 // same message are coalesced. 43 ErrorAggregationWindow = 10 * time.Second 44 // PeerUpdateInterval is the time interval in which relay is checking for 45 // newly joined peers for long running requests 46 PeerUpdateInterval = 2 * time.Second 47 ) 48 49 var ( 50 // ListenAddress is the address on which the Hubble Relay server listens 51 // for incoming gRPC requests. 52 ListenAddress = fmt.Sprintf(":%d", hubbledefaults.RelayPort) 53 54 // HealthListenAddress is the address on which the Hubble Relay gRPC health 55 // server listens on 56 HealthListenAddress = fmt.Sprintf(":%d", 4222) 57 )