Skip to content

Commit abb56b6

Browse files
authored
fix(lb): display correct label (#3268)
1 parent f9484ba commit abb56b6

29 files changed

+65629
-17839
lines changed

internal/namespaces/lb/v1/custom_lb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func lbMarshalerFunc(i interface{}, opt *human.MarshalOpt) (string, error) {
3737
},
3838
{
3939
FieldName: "Instances",
40-
Title: "Backends",
40+
Title: "LB Instances",
4141
},
4242
}
4343

internal/namespaces/lb/v1/testdata/test-add-backend-servers-with-instance-id-public-ip.cassette.yaml

Lines changed: 6773 additions & 3140 deletions
Large diffs are not rendered by default.

internal/namespaces/lb/v1/testdata/test-add-backend-servers-with-instance-id-public-ip.golden

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
3-
ID 11668e84-c1b3-44d7-99a0-4dbf0356e771
3+
ID 6dc47536-1924-49cb-b498-19b8c964ef16
44
Name cli-test
55
ForwardProtocol tcp
66
ForwardPort 80
77
ForwardPortAlgorithm roundrobin
88
StickySessions none
99
StickySessionsCookieName -
1010
SendProxyV2 false
11+
TimeoutServer 5m0s
12+
TimeoutConnect 5s
13+
TimeoutTunnel 15m0s
1114
OnMarkedDownAction on_marked_down_action_none
1215
ProxyProtocol proxy_protocol_unknown
1316
CreatedAt few seconds ago
@@ -22,10 +25,10 @@ CheckMaxRetries 5
2225
CheckSendProxy false
2326

2427
Pool:
25-
[212.47.249.224]
28+
[163.172.158.242]
2629

2730
Lb:
28-
ID eefaad34-0240-409c-b061-4a65e15e8746
31+
ID 7b4dd418-07f8-4c77-8f95-5754b1f264a6
2932
Name cli-test
3033
Description cli-test
3134
Status ready
@@ -44,14 +47,14 @@ Zone fr-par-1
4447

4548
IPs:
4649
ID IP ADDRESS ORGANIZATION ID PROJECT ID LB ID REVERSE REGION ZONE
47-
b8c43d89-7237-4982-862d-230c28acaecd 51.159.74.78 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 eefaad34-0240-409c-b061-4a65e15e8746 51-159-74-78.lb.fr-par.scw.cloud fr-par fr-par-1
50+
c2ab13f8-4a47-4c31-8aad-513ff4c75ac2 51.159.74.67 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 7b4dd418-07f8-4c77-8f95-5754b1f264a6 51-159-74-67.lb.fr-par.scw.cloud fr-par fr-par-1
4851

49-
Backends:
52+
LB Instances:
5053
ID STATUS IP ADDRESS CREATED AT UPDATED AT REGION ZONE
51-
c4758b0e-8741-4498-920a-6ed7463e925a pending 10.65.66.73 few seconds ago few seconds ago fr-par fr-par-1
54+
9ba0c233-7ed4-41f5-85ff-3788034b8ad3 pending 10.76.22.49 few seconds ago few seconds ago fr-par fr-par-1
5255
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
5356
{
54-
"id": "11668e84-c1b3-44d7-99a0-4dbf0356e771",
57+
"id": "6dc47536-1924-49cb-b498-19b8c964ef16",
5558
"name": "cli-test",
5659
"forward_protocol": "tcp",
5760
"forward_port": 80,
@@ -68,18 +71,18 @@ c4758b0e-8741-4498-920a-6ed7463e925a pending 10.65.66.73 few seconds ago few
6871
"check_timeout": 1000
6972
},
7073
"pool": [
71-
"212.47.249.224"
74+
"163.172.158.242"
7275
],
7376
"lb": {
74-
"id": "eefaad34-0240-409c-b061-4a65e15e8746",
77+
"id": "7b4dd418-07f8-4c77-8f95-5754b1f264a6",
7578
"name": "cli-test",
7679
"description": "cli-test",
7780
"status": "ready",
7881
"instances": [
7982
{
80-
"id": "c4758b0e-8741-4498-920a-6ed7463e925a",
83+
"id": "9ba0c233-7ed4-41f5-85ff-3788034b8ad3",
8184
"status": "pending",
82-
"ip_address": "10.65.66.73",
85+
"ip_address": "10.76.22.49",
8386
"created_at": "1970-01-01T00:00:00.0Z",
8487
"updated_at": "1970-01-01T00:00:00.0Z",
8588
"region": "fr-par",
@@ -90,12 +93,12 @@ c4758b0e-8741-4498-920a-6ed7463e925a pending 10.65.66.73 few seconds ago few
9093
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
9194
"ip": [
9295
{
93-
"id": "b8c43d89-7237-4982-862d-230c28acaecd",
94-
"ip_address": "51.159.74.78",
96+
"id": "c2ab13f8-4a47-4c31-8aad-513ff4c75ac2",
97+
"ip_address": "51.159.74.67",
9598
"organization_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
9699
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
97-
"lb_id": "eefaad34-0240-409c-b061-4a65e15e8746",
98-
"reverse": "51-159-74-78.lb.fr-par.scw.cloud",
100+
"lb_id": "7b4dd418-07f8-4c77-8f95-5754b1f264a6",
101+
"reverse": "51-159-74-67.lb.fr-par.scw.cloud",
99102
"region": "fr-par",
100103
"zone": "fr-par-1"
101104
}
@@ -125,7 +128,7 @@ c4758b0e-8741-4498-920a-6ed7463e925a pending 10.65.66.73 few seconds ago few
125128
"max_retries": null,
126129
"max_connections": null,
127130
"timeout_queue": null,
128-
"timeout_server": null,
129-
"timeout_connect": null,
130-
"timeout_tunnel": null
131+
"timeout_server": 300000,
132+
"timeout_connect": 5000,
133+
"timeout_tunnel": 900000
131134
}

internal/namespaces/lb/v1/testdata/test-add-backend-servers-with-instance-id.cassette.yaml

Lines changed: 6399 additions & 1841 deletions
Large diffs are not rendered by default.

internal/namespaces/lb/v1/testdata/test-add-backend-servers-with-instance-id.golden

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
3-
ID f62accb5-2a14-4ae6-91a5-d788f56e2d24
3+
ID 4a7a517a-7c69-4843-a0c9-59e45aa27691
44
Name cli-test
55
ForwardProtocol tcp
66
ForwardPort 80
77
ForwardPortAlgorithm roundrobin
88
StickySessions none
99
StickySessionsCookieName -
1010
SendProxyV2 false
11+
TimeoutServer 5m0s
12+
TimeoutConnect 5s
13+
TimeoutTunnel 15m0s
1114
OnMarkedDownAction on_marked_down_action_none
1215
ProxyProtocol proxy_protocol_unknown
1316
CreatedAt few seconds ago
@@ -22,10 +25,10 @@ CheckMaxRetries 5
2225
CheckSendProxy false
2326

2427
Pool:
25-
[10.68.52.83]
28+
[10.194.176.113]
2629

2730
Lb:
28-
ID 8db4d8b0-7c22-4a89-89c4-5d4ffbed7506
31+
ID 38da8dac-cb81-4eed-9794-7d1332b40e4c
2932
Name cli-test
3033
Description cli-test
3134
Status ready
@@ -43,15 +46,15 @@ Region fr-par
4346
Zone fr-par-1
4447

4548
IPs:
46-
ID IP ADDRESS ORGANIZATION ID PROJECT ID LB ID REVERSE REGION ZONE
47-
b84b4597-4784-4572-8148-9a41c64fc7a1 51.159.9.249 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 8db4d8b0-7c22-4a89-89c4-5d4ffbed7506 51-159-9-249.lb.fr-par.scw.cloud fr-par fr-par-1
49+
ID IP ADDRESS ORGANIZATION ID PROJECT ID LB ID REVERSE REGION ZONE
50+
612e4e01-f432-4983-a670-c0179fe6d3eb 51.159.113.72 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5 38da8dac-cb81-4eed-9794-7d1332b40e4c 51-159-113-72.lb.fr-par.scw.cloud fr-par fr-par-1
4851

49-
Backends:
50-
ID STATUS IP ADDRESS CREATED AT UPDATED AT REGION ZONE
51-
4b3cb95e-4a9e-4b85-8170-868b3990362e pending 10.69.104.35 few seconds ago few seconds ago fr-par fr-par-1
52+
LB Instances:
53+
ID STATUS IP ADDRESS CREATED AT UPDATED AT REGION ZONE
54+
0d8ae695-99af-4cef-ab6e-f2e63bc38e1e pending 10.72.28.99 few seconds ago few seconds ago fr-par fr-par-1
5255
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
5356
{
54-
"id": "f62accb5-2a14-4ae6-91a5-d788f56e2d24",
57+
"id": "4a7a517a-7c69-4843-a0c9-59e45aa27691",
5558
"name": "cli-test",
5659
"forward_protocol": "tcp",
5760
"forward_port": 80,
@@ -68,18 +71,18 @@ ID STATUS IP ADDRESS CREATED AT UP
6871
"check_timeout": 1000
6972
},
7073
"pool": [
71-
"10.68.52.83"
74+
"10.194.176.113"
7275
],
7376
"lb": {
74-
"id": "8db4d8b0-7c22-4a89-89c4-5d4ffbed7506",
77+
"id": "38da8dac-cb81-4eed-9794-7d1332b40e4c",
7578
"name": "cli-test",
7679
"description": "cli-test",
7780
"status": "ready",
7881
"instances": [
7982
{
80-
"id": "4b3cb95e-4a9e-4b85-8170-868b3990362e",
83+
"id": "0d8ae695-99af-4cef-ab6e-f2e63bc38e1e",
8184
"status": "pending",
82-
"ip_address": "10.69.104.35",
85+
"ip_address": "10.72.28.99",
8386
"created_at": "1970-01-01T00:00:00.0Z",
8487
"updated_at": "1970-01-01T00:00:00.0Z",
8588
"region": "fr-par",
@@ -90,12 +93,12 @@ ID STATUS IP ADDRESS CREATED AT UP
9093
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
9194
"ip": [
9295
{
93-
"id": "b84b4597-4784-4572-8148-9a41c64fc7a1",
94-
"ip_address": "51.159.9.249",
96+
"id": "612e4e01-f432-4983-a670-c0179fe6d3eb",
97+
"ip_address": "51.159.113.72",
9598
"organization_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
9699
"project_id": "564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
97-
"lb_id": "8db4d8b0-7c22-4a89-89c4-5d4ffbed7506",
98-
"reverse": "51-159-9-249.lb.fr-par.scw.cloud",
100+
"lb_id": "38da8dac-cb81-4eed-9794-7d1332b40e4c",
101+
"reverse": "51-159-113-72.lb.fr-par.scw.cloud",
99102
"region": "fr-par",
100103
"zone": "fr-par-1"
101104
}
@@ -125,7 +128,7 @@ ID STATUS IP ADDRESS CREATED AT UP
125128
"max_retries": null,
126129
"max_connections": null,
127130
"timeout_queue": null,
128-
"timeout_server": null,
129-
"timeout_connect": null,
130-
"timeout_tunnel": null
131+
"timeout_server": 300000,
132+
"timeout_connect": 5000,
133+
"timeout_tunnel": 900000
131134
}

0 commit comments

Comments
 (0)