Skip to content

Commit

Permalink
Merge pull request #14 from robscott/rs/output-fixes
Browse files Browse the repository at this point in the history
Some small fixes for output format
  • Loading branch information
robscott committed Apr 23, 2019
2 parents 311014e + 863798d commit 18d479f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pkg/capacity/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type listPod struct {
Namespace string `json:"namespace"`
CPU *listResourceOutput `json:"cpu"`
Memory *listResourceOutput `json:"memory"`
Containers []listContainer `json:"containers"`
Containers []listContainer `json:"containers,omitempty"`
}

type listContainer struct {
Expand All @@ -44,16 +44,16 @@ type listContainer struct {

type listResourceOutput struct {
Requests string `json:"requests"`
RequestsPct string `json:"requests_pct"`
RequestsPct string `json:"requestsPercent"`
Limits string `json:"limits"`
LimitsPct string `json:"limits_pct"`
LimitsPct string `json:"limitsPercent"`
Utilization string `json:"utilization,omitempty"`
UtilizationPct string `json:"utilization_pct,omitempty"`
UtilizationPct string `json:"utilizationPercent,omitempty"`
}

type listClusterMetrics struct {
Nodes []*listNodeMetric `json:"nodes"`
ClusterTotals *listClusterTotals `json:"cluster_totals"`
ClusterTotals *listClusterTotals `json:"clusterTotals"`
}

type listClusterTotals struct {
Expand Down
1 change: 0 additions & 1 deletion pkg/capacity/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (tp *tablePrinter) Print() {

for _, nm := range sortedNodeMetrics {
tp.printNodeLine(nm.name, nm)
tp.printLine(&tableLine{})

if tp.showPods || tp.showContainers {
podMetrics := nm.getSortedPodMetrics(tp.sortBy)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of kube-capacity",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("kube-capacity version 0.3.0")
fmt.Println("kube-capacity version 0.3.1")
},
}

0 comments on commit 18d479f

Please sign in to comment.