diff --git a/agent/agent.go b/agent/agent.go index 3f6a25ae3dcb..7217f54a27f0 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -321,8 +321,6 @@ func LocalConfig(cfg *config.RuntimeConfig) local.Config { NodeID: cfg.NodeID, NodeName: cfg.NodeName, TaggedAddresses: map[string]string{}, - ProxyBindMinPort: cfg.ConnectProxyBindMinPort, - ProxyBindMaxPort: cfg.ConnectProxyBindMaxPort, } for k, v := range cfg.TaggedAddresses { lc.TaggedAddresses[k] = v diff --git a/agent/config/builder.go b/agent/config/builder.go index cf3acd5332a1..aa82582b488b 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -805,8 +805,6 @@ func (b *Builder) Build() (rt RuntimeConfig, err error) { ConnectEnabled: connectEnabled, ConnectCAProvider: connectCAProvider, ConnectCAConfig: connectCAConfig, - ConnectProxyBindMinPort: proxyMinPort, - ConnectProxyBindMaxPort: proxyMaxPort, ConnectSidecarMinPort: sidecarMinPort, ConnectSidecarMaxPort: sidecarMaxPort, DataDir: b.stringVal(c.DataDir), diff --git a/agent/config/runtime.go b/agent/config/runtime.go index de618c279073..83c5c9fd6058 100644 --- a/agent/config/runtime.go +++ b/agent/config/runtime.go @@ -531,16 +531,6 @@ type RuntimeConfig struct { // and servers in a cluster for correct connect operation. ConnectEnabled bool - // ConnectProxyBindMinPort is the inclusive start of the range of ports - // allocated to the agent for starting proxy listeners on where no explicit - // port is specified. - ConnectProxyBindMinPort int - - // ConnectProxyBindMaxPort is the inclusive end of the range of ports - // allocated to the agent for starting proxy listeners on where no explicit - // port is specified. - ConnectProxyBindMaxPort int - // ConnectSidecarMinPort is the inclusive start of the range of ports // allocated to the agent for asigning to sidecar services where no port is // specified. diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 66b7122449d8..570fc7ee2903 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -4921,14 +4921,12 @@ func TestFullConfig(t *testing.T) { }, }, }, - AutoEncryptTLS: true, - AutoEncryptAllowTLS: true, - ConnectEnabled: true, - ConnectProxyBindMinPort: 2000, - ConnectProxyBindMaxPort: 3000, - ConnectSidecarMinPort: 8888, - ConnectSidecarMaxPort: 9999, - ConnectCAProvider: "consul", + AutoEncryptTLS: true, + AutoEncryptAllowTLS: true, + ConnectEnabled: true, + ConnectSidecarMinPort: 8888, + ConnectSidecarMaxPort: 9999, + ConnectCAProvider: "consul", ConnectCAConfig: map[string]interface{}{ "RotationPeriod": "90h", "LeafCertTTL": "1h", @@ -5748,8 +5746,6 @@ func TestSanitize(t *testing.T) { "ConnectCAConfig": {}, "ConnectCAProvider": "", "ConnectEnabled": false, - "ConnectProxyBindMaxPort": 0, - "ConnectProxyBindMinPort": 0, "ConnectSidecarMaxPort": 0, "ConnectSidecarMinPort": 0, "ConnectTestCALeafRootChangeSpread": "0s", diff --git a/agent/local/state.go b/agent/local/state.go index afc6e4b3b6c3..6290b6cada9c 100644 --- a/agent/local/state.go +++ b/agent/local/state.go @@ -33,8 +33,6 @@ type Config struct { NodeID types.NodeID NodeName string TaggedAddresses map[string]string - ProxyBindMinPort int - ProxyBindMaxPort int } // ServiceState describes the state of a service record. diff --git a/agent/local/testing.go b/agent/local/testing.go index 6ca9d12aea89..3f998da54cca 100644 --- a/agent/local/testing.go +++ b/agent/local/testing.go @@ -10,10 +10,7 @@ import ( // TestState returns a configured *State for testing. func TestState(t testing.T) *State { - result := NewState(Config{ - ProxyBindMinPort: 20000, - ProxyBindMaxPort: 20500, - }, log.New(os.Stderr, "", log.LstdFlags), &token.Store{}) + result := NewState(Config{}, log.New(os.Stderr, "", log.LstdFlags), &token.Store{}) result.TriggerSyncChanges = func() {} return result }