Skip to content

Commit fc4dfc2

Browse files
authored
fix(k8s): fix k8s get json output case (#1477)
Signed-off-by: Patrik Cyvoct <[email protected]>
1 parent da016fe commit fc4dfc2

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

internal/namespaces/k8s/v1/custom_cluster.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ func clusterGetBuilder(c *core.Command) *core.Command {
102102
}
103103

104104
type customPool struct {
105-
ID string
106-
Name string
107-
Status k8s.PoolStatus
108-
Version string
109-
NodeType string
110-
MinSize uint32
111-
Size uint32
112-
MaxSize uint32
113-
Autoscaling bool
114-
Autohealing bool
105+
ID string `json:"id"`
106+
Name string `json:"name"`
107+
Status k8s.PoolStatus `json:"status"`
108+
Version string `json:"version"`
109+
NodeType string `json:"node_type"`
110+
MinSize uint32 `json:"min_size"`
111+
Size uint32 `json:"size"`
112+
MaxSize uint32 `json:"max_size"`
113+
Autoscaling bool `json:"autoscaling"`
114+
Autohealing bool `json:"autohealing"`
115115
}
116116

117117
customPools := []customPool{}

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ c610deed-139b-4950-aff7-8e2ccd895507 default scaling 1.17.3 dev1_m 0
7575
"admission_plugins": [],
7676
"pools": [
7777
{
78-
"ID": "c610deed-139b-4950-aff7-8e2ccd895507",
79-
"Name": "default",
80-
"Status": "scaling",
81-
"Version": "1.17.3",
82-
"NodeType": "dev1_m",
83-
"MinSize": 0,
84-
"Size": 1,
85-
"MaxSize": 1,
86-
"Autoscaling": false,
87-
"Autohealing": false
78+
"id": "c610deed-139b-4950-aff7-8e2ccd895507",
79+
"name": "default",
80+
"status": "scaling",
81+
"version": "1.17.3",
82+
"node_type": "dev1_m",
83+
"min_size": 0,
84+
"size": 1,
85+
"max_size": 1,
86+
"autoscaling": false,
87+
"autohealing": false
8888
}
8989
]
9090
}

0 commit comments

Comments
 (0)