|
|
@ -80,6 +80,7 @@ func TestLoadBalancerClass(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
|
|
|
|
s.Data["device_ips"] = []byte(`["100.99.98.97", "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf"]`)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
want := &corev1.Service{
|
|
|
|
want := &corev1.Service{
|
|
|
@ -104,6 +105,12 @@ func TestLoadBalancerClass(t *testing.T) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "100.99.98.97",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -306,6 +313,7 @@ func TestAnnotationIntoLB(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
|
|
|
|
s.Data["device_ips"] = []byte(`["100.99.98.97", "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf"]`)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
want := &corev1.Service{
|
|
|
|
want := &corev1.Service{
|
|
|
@ -364,6 +372,12 @@ func TestAnnotationIntoLB(t *testing.T) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "100.99.98.97",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -425,6 +439,7 @@ func TestLBIntoAnnotation(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_id"] = []byte("ts-id-1234")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
s.Data["device_fqdn"] = []byte("tailscale.device.name.")
|
|
|
|
|
|
|
|
s.Data["device_ips"] = []byte(`["100.99.98.97", "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf"]`)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
expectReconciled(t, sr, "default", "test")
|
|
|
|
want := &corev1.Service{
|
|
|
|
want := &corev1.Service{
|
|
|
@ -449,6 +464,12 @@ func TestLBIntoAnnotation(t *testing.T) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
Hostname: "tailscale.device.name",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "100.99.98.97",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IP: "2c0a:8083:94d4:2012:3165:34a5:3616:5fdf",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|