Skip to content

Commit a30fa26

Browse files
authored
feat(k8s): add support to show up the zone in the pool infos of a clu… (#3879)
1 parent ab815a8 commit a30fa26

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

internal/namespaces/k8s/v1/custom_cluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ func clusterGetBuilder(c *core.Command) *core.Command {
260260
MaxSize uint32 `json:"max_size"`
261261
Autoscaling bool `json:"autoscaling"`
262262
Autohealing bool `json:"autohealing"`
263+
Zone scw.Zone `json:"zone"`
263264
}
264265

265266
customPools := []customPool{}
@@ -276,6 +277,7 @@ func clusterGetBuilder(c *core.Command) *core.Command {
276277
MaxSize: pool.MaxSize,
277278
Autoscaling: pool.Autoscaling,
278279
Autohealing: pool.Autohealing,
280+
Zone: pool.Zone,
279281
})
280282
}
281283

internal/namespaces/k8s/v1/testdata/test-get-cluster-simple.golden

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ UsernamePrefix -
4343
GroupsPrefix -
4444

4545
Pools:
46-
ID NAME STATUS VERSION NODE TYPE MIN SIZE SIZE MAX SIZE AUTOSCALING AUTOHEALING
47-
1da2aa9e-463c-422a-b523-11274412dd5d default scaling 1.27.1 dev1_m 0 1 1 false false
46+
ID NAME STATUS VERSION NODE TYPE MIN SIZE SIZE MAX SIZE AUTOSCALING AUTOHEALING ZONE
47+
1da2aa9e-463c-422a-b523-11274412dd5d default scaling 1.27.1 dev1_m 0 1 1 false false fr-par-1
4848
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
4949
{
5050
"id": "e96a93a2-c36f-42bb-b7e1-bebf52db7956",
@@ -107,7 +107,8 @@ ID NAME STATUS VERSION NODE TYPE MIN
107107
"size": 1,
108108
"max_size": 1,
109109
"autoscaling": false,
110-
"autohealing": false
110+
"autohealing": false,
111+
"zone": "fr-par-1"
111112
}
112113
]
113114
}

0 commit comments

Comments
 (0)