|
|
|
@ -113,10 +113,11 @@ func TestServiceDiscoveryAdd(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.default.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.default.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -132,6 +133,7 @@ func TestServiceDiscoveryAdd(t *testing.T) {
|
|
|
|
|
"__address__": "testservice-external.default.svc:31900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ExternalName",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "31900",
|
|
|
|
|
"__meta_kubernetes_service_external_name": "FooExternalName",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -178,17 +180,19 @@ func TestServiceDiscoveryUpdate(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.default.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport0",
|
|
|
|
|
"__address__": "testservice.default.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport0",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "UDP",
|
|
|
|
|
"__address__": "testservice.default.svc:30901",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport1",
|
|
|
|
|
"__address__": "testservice.default.svc:30901",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport1",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30901",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -223,10 +227,11 @@ func TestServiceDiscoveryNamespaces(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.ns1.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.ns1.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -239,10 +244,11 @@ func TestServiceDiscoveryNamespaces(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.ns2.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.ns2.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -273,10 +279,11 @@ func TestServiceDiscoveryOwnNamespace(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -307,10 +314,11 @@ func TestServiceDiscoveryAllNamespaces(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
@ -323,10 +331,11 @@ func TestServiceDiscoveryAllNamespaces(t *testing.T) {
|
|
|
|
|
Targets: []model.LabelSet{
|
|
|
|
|
{
|
|
|
|
|
"__meta_kubernetes_service_port_protocol": "TCP",
|
|
|
|
|
"__address__": "testservice.non-own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__address__": "testservice.non-own-ns.svc:30900",
|
|
|
|
|
"__meta_kubernetes_service_type": "ClusterIP",
|
|
|
|
|
"__meta_kubernetes_service_cluster_ip": "10.0.0.1",
|
|
|
|
|
"__meta_kubernetes_service_port_name": "testport",
|
|
|
|
|
"__meta_kubernetes_service_port_number": "30900",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Labels: model.LabelSet{
|
|
|
|
|