mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: add Coder service prefix to tailnet (#14943)
re: #14715 This PR introduces the Coder service prefix: `fd60:627a:a42b::/48` and refactors our existing code as calling the Tailscale service prefix explicitly (rather than implicitly). Removes the unused `Addresses` agent option. All clients today assume they can compute the Agent's IP address based on its UUID, so an agent started with a custom address would break things.
This commit is contained in:
@@ -120,7 +120,7 @@ func TestPGCoordinatorSingle_AgentInvalidIP(t *testing.T) {
|
||||
defer agent.Close(ctx)
|
||||
agent.UpdateNode(&proto.Node{
|
||||
Addresses: []string{
|
||||
netip.PrefixFrom(agpl.IP(), 128).String(),
|
||||
agpl.TailscaleServicePrefix.RandomPrefix().String(),
|
||||
},
|
||||
PreferredDerp: 10,
|
||||
})
|
||||
@@ -147,7 +147,7 @@ func TestPGCoordinatorSingle_AgentInvalidIPBits(t *testing.T) {
|
||||
defer agent.Close(ctx)
|
||||
agent.UpdateNode(&proto.Node{
|
||||
Addresses: []string{
|
||||
netip.PrefixFrom(agpl.IPFromUUID(agent.ID), 64).String(),
|
||||
netip.PrefixFrom(agpl.TailscaleServicePrefix.AddrFromUUID(agent.ID), 64).String(),
|
||||
},
|
||||
PreferredDerp: 10,
|
||||
})
|
||||
@@ -174,7 +174,7 @@ func TestPGCoordinatorSingle_AgentValidIP(t *testing.T) {
|
||||
defer agent.Close(ctx)
|
||||
agent.UpdateNode(&proto.Node{
|
||||
Addresses: []string{
|
||||
netip.PrefixFrom(agpl.IPFromUUID(agent.ID), 128).String(),
|
||||
agpl.TailscaleServicePrefix.PrefixFromUUID(agent.ID).String(),
|
||||
},
|
||||
PreferredDerp: 10,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user